PDA

View Full Version : Forces question


flapells
02-03-2007, 09:34 AM
I'm doing a shot for a TV show of a building being destroyed and falling to pieces as if being demolished. Using XSI v5.1 Essentials and it's rigid bodies dynamics and getting some great results. However, to refine the simulation I want to apply varying amounts of gravity to different stages of the building. I know that it's possible to apply the 'gravity' force to the 'force controller' of each object allowing this sort of control which is great. The manual illustrates how you copy the force onto each objects force controller (one object at a time), is there a way of applying the same thing to lots of objects simultaneously (ie almost 1500) to save the time of doing them one by one.

Thanks for any help

Chris Taylor

AnIm
02-03-2007, 10:57 AM
hi Chris

I ve made a very simple script for you that can help

just select all your rigid bodies you want to apply force to and your force (make sure your force is last selected)
run this script (jscript)


for (var i=0;i<selection.count - 1;i++)
{
fGroup = selection(i).Properties("Force Controller").NestedObjects("forces")
fGroup.AddMember(selection(selection.count - 1));
logmessage(selection(i) + " ....OK")
}


now your force should be added to force controller of all selected RBs

have a nice day

Tomas

flapells
02-03-2007, 11:26 AM
Thanks so much Tomas, that worked a treat.

Chris Taylor

CGTalk Moderation
02-03-2007, 11:26 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.