Resample / stretch a particle cache with CHOP

   3424   4   1
User Avatar
Member
123 posts
Joined: May 2015
Offline
Hi,

I'm trying to resample a cache I made from a packed RBD simulation, that I use afterwards with a Transform Pieces on another, matching, packed geo.

My issue is that I've been asked to slow down the animation, and since this wasn't planned and I didn't add any subframes at sim time, I can't just use a timeshift with a $F/2 expression or something.

So I was thinking about CHOP.

Slowing down the translation animation is easy, a simple stretch/resample combo will do the job. But I can't for the life of me figure out how to slow down rotation…

As I understand it, the information is written as orient and orient is constrained between -1 and 1 for each of the four channels. when a full 360 turn has to be made, the particle goes from like -1 to 1 orient in one frame to simulate the behavior.
I can “Count” how and when this occurs, but I have no idea how to use this to properly stretch the source animation and keep the switch from -1 to 1 happening in 1 frame.

Now I could - and probably will - resimulate with subframes, but I'd really like to know how to properly resample and stretch all animation channels of a cached particle simulation…

Help? :p
User Avatar
Member
258 posts
Joined:
Offline
Timeblend works without sub frame data, it will just be a linear interpolation.
User Avatar
Member
13 posts
Joined: May 2015
Offline
Hmmm.. maybe qLib has something for this.

https://vimeo.com/116094755 [vimeo.com]
User Avatar
Member
123 posts
Joined: May 2015
Offline
Hey, thanks for the replies.

I tried using Timeblend, but it wouldn't work. Or rather, it works perfectly on Position, but for some reasons it doesn't seem to apply to Orientation.

In the end I came up with a few solutions involving timeshift voodoo, attribute vop, SLERP and SPLINE.
Better yet, I was able to dynamically retime my cached simulations - slow, speed, rollback, etc - rather than just plain Slow by X%.

In the below example, I just set the cache to CTEMP. Shouldn't take too much place anyway.

Attachments:
rbd_resample.hip (342.7 KB)

User Avatar
Member
258 posts
Joined:
Offline
Hey…that's a cool file.
  • Quick Links