Jump to content

How to compute timewarp from nuke

Recommended Posts

I have sim cache in linear timespace and a timewarp curve in .chan file from nuke, and I want to get difference of time change from it to use as a multiplier for increasing velocity in motion blur. For now I`m stuck on my on e solution:  I use slope node  on timewarp to calculate the differences in time change, but I`m not sure that this is a right solution.





Share this post

Link to post
Share on other sites

I'm not super versed in CHOPs, but I've used the following method for calculating timewarps done from hand-keyed geometry caches. Maybe it'll help you, too.


Here's a quote from the post by Jeff Wagner (@old school) on the SideFX Forums since sometimes those links seem to disappear over time. 

(There's a .hip from him in the link)


Read the data in to CHOPs using a Geometry CHOP. Point it at your SOP to reference in your points, Attribute scope left at P.

At this point you have the choice of bringing in the geometry data as Static or Animated.
Static gives you three channels with samples representing each point in the data. The result is your channels will have the same number of samples in time as points in your geometry.
Animated gives you three curves per point over the duration of the scene ($FSTART, $FEND).
You want Animated so turn that on.

Append your Slope chop and set to Acceleration.

Note: You can also bring in the velocity attribute above and change the Attribute scope to v. Then you will need to set the slope chop to Slope…
Or, you can bring in the points P and use two slope chops: One to calcuate velocity and the next to calcuate the acceleration.

Exporting your new attribute to SOPs requires that attribute to already exist. 
Use an Attribute Create to create an attribute called “accel” to be consistent with POPs for no other reason. It should be a vector type and just leave the values at default.

Append a Channel SOP to the attribcreate SOP and change the method to “Animated” to match the Geometry CHOP.
Leave the channel scope to t if you fetched in the Position P attribute or change to v if you decided to fetch the velocity attribute (no real need in this case).
Change the Attribute Scope to accel to match the attribute you just added to the geometry.


I hope this helps!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now