Jump to content

How to compute timewarp from nuke


alex333d

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.

pic_1.jpg

pic_2.jpg

frame_camera_expChan.chan

timewarp.hip

Link to comment
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.

https://www.sidefx.com/forum/topic/6670/#post-31592

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)

Quote

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.

Done. 

I hope this helps!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...