I've just finished cleaning up and, hopefully, optimising the roll object compound. The new compound removes expensive geometry queries in favour of filter and min/max in set. I think it's quicker on larger datasets although the downside is I've had to use more nodes!
The lowest point in Y on the object at simulation start becomes the virtual floor. There are many other ways to do this but it seems like a sensible way to keep the compound fairly general. If you want other objects to contact the same floor then their lowest point in Y also needs to be at floor level.
The Distance to Angle Ratio parameter controls the ratio of angular change to the distance the driving object travels each frame - higher values rotate the object more, lower values slow down the rotation.
Let me know if you have any suggestions, improvements or performance tweaks or if you find any bugs.
Scene: http://www.exch.demon.co.uk/xsi/files/roll_object_scene_v001.rar
Compound: http://www.exch.demon.co.uk/xsi/files/roll_object_compound_v001.rar
Thanks to Helge and Martin Chatterjee for their resources on similar operators:
Helge's Roll Tutorial
Martin's BallRoll SCOP
Tuesday, 19 May 2009
Subscribe to:
Post Comments (Atom)
Despite having a deadline for a major project tomorrow, the entire studio just spent time taking turns at making the elephant do somersaults... A hugely useful, amazing and fun compound!
ReplyDeleteHello!
ReplyDeleteI'm Kang from Korea.
Thanks for your share!!
It's very awesome!