Friday, June 29, 2018

Houville :: Looping RBD Sims



So the concept here was run a sim, reverse it and blend the two together so that the beginning and the end are the same.

Pretty logical right?

Well as you can see from the top gif, when the blend back occurred, chunks would squish through themselves to resolve the different orientations.

After a bit of messing around I realised rather than deal with the chunks, just keep the point data from the sim and use a for-each loop to copy each chunk back onto the corresponding point afterwards.  This resolved the squish but then there was a pop as the orientation attribute was not blended by the blendShape SOP.

The way around that was to use a wrangle that blended @P with a lerp, and then did exactly the same with the @orient attribute.

Plugging that in to the for-each copy chunks loop made everything work as expected :)