PDA

View Full Version : How to attach TP to dynamic clones position


dflamholc
02-09-2012, 08:42 AM
Hi all,
I'd love to get this to work, but I've completely hit the wall with my limited xpresso skills..

In short what I'm trying to achieve is to emit particles into group 1a, then swap that group to 1b at frame 50 and clone my dynamic coins on to this new group (1b)... (it's works this far)

at this point however I'd like to make the group-1b particles to stay attached to their respective dynamic clones, so that I at a later stage can change that group to 1c and swap out the clones, as they later fall out of the bucket and pass a certain position, where they're supposed to change shape.

In the images I attach below I have managed to get all the particles for group 1b to attach themselves to only 1 of the dynamic clones. one can see them in the Close Up shot - there are 255 particles all bunched up - but they do follow the dynamic movement of that geometry, which gives me hope that there is a solution!

I know the xpresso probably looks a bit dim at this point, but this is how far i managed to bring it. i don't seem to be able to iterate through all the clones and give each particle a unique clone to attach to...

http://imageshack.us/f/337/xpressosetup.jpg/
http://imageshack.us/f/96/cubunchedtpgroup.jpg/
http://imageshack.us/f/404/overviewdg.jpg/
http://imageshack.us/f/692/mediumshotbunchedpartic.jpg/

sorry for the longwinded cry for help ;)

any pointers greatly appreciated!

cheers /d

TimC
02-14-2012, 05:17 AM
The problem is that the particles have no relationship with the clones. I would create a new group of particles and link them to the clone position. You could move your current particles to the clone position, it's up to you (I just find creating a new group would keep things easier to control)

If you count the number of clones, then create one particle for each clone. Give the particle a number (using a custom data channel) that corresponds to the cloner index. Then use PGetData to retrieve the particle number and use the MG Data node to find the clone position, PSetData to link them together.

Hope that helps.

Cheers
Tim

p.s. You might get a one frame lag, but if you cache the dynamics it should solve that problem.

dflamholc
02-14-2012, 08:19 AM
Tim,

Thanks so much for taking the time to answer in such detail - this helped heaps!
in fact it helped completely ;)

for starters, i had no idea one could set custom data channels, so just that is a huge tip

as i'm on a project with a rather insane workload attached to a minimalistic deadline, i had to (for the time begin) solve the above problem in a different, much simpler, but also much less controlled, way;
basically just set up the scene so that I could swap the clones by animating the mograph instance object to reference a different object at a certain point in time.. obviously setting the instance to 1, not to get a trail and with a random effector with a time offset to not have all the clones swap at the same time.. (i'll being going back to that scene with TP now though...)

Thanks again and just to add that your site helloluxx is an awesome source of info! :thumbsup:

Cheers. david

TimC
02-14-2012, 08:39 AM
Thanks!

Glad to help.

Cheers
Tim

mazab
02-14-2012, 09:22 AM
You could also take a look into the thinkingMograph setup from here if you want to: http://zabiegly.com/xpresso/

CGTalk Moderation
02-14-2012, 09:22 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.