Jump to content

Missing first frame caused by Trail / Point Velocity operators


wreath

Recommended Posts

Hey guys, I usually use either point velocity or trail sop to calculate speed, when your animation starts at frame 1 and you have a cache starting at 1, it causes first frame to be missing (i know it requires a frame before to calculate speed) its easy to cache +1 frame earlier then global animation start but what i want to ask is if there is any simple solution for already cached files? 

Link to comment
Share on other sites

If the movement is smooth enough (ie. low acceleration), and geometry being consistent from one frame to the other (no deletion of points or particles, or reordering of point numbers), you could get the vel for the first frame by copying it from the second one, and then keep the trail sop results :

- plug your Trail SOP to compute vel.

- use a timeshift node to get the second frame (or $F+1)

- transfer the vel of the time-offseted stream to the initial stream (with point wrangle, plugin the cache in first input and the timeshift in second input, with the code v@vel = point(1, "vel", @ptnum);)

- use a switch node to take the first frame on the point wrangle, and the remaining frames from your cache (you could also put an if statement in point wrangle : if ($Frame == 1) { v@vel = point(1,"vel",@ptnum);}

 

  • Thanks 1
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...