Jump to content

Parameter every specified number of frames?


NathanVFX

Recommended Posts

I've been trying to write an expression which will hold a value and change every specified number of frames. 

I have a point jitter, and an animated seed so the point will change position every timestep, my goal is to have an expression where the the point will stay in the same position for 8 frames and then change position, and remain in that position for another 8 frames and so on.

I've attached a very basic scene file if its any easier for you to use that, any help is greatly appreciated,

Thanks!

PointJitter.hip

Link to comment
Share on other sites

Hey Nathan,

You can get this fairly easily with an expression like 

ceil($F/8)

ceil will round up the fraction to the next integer, and since we divide by 8 here it will change every 8 frames.

You could put this this expression in your timeshift or you could remove your timeshift altogether and just put the expression in your seed.

Hope this helps.

  • Like 1
Link to comment
Share on other sites

If you haven't already then its a good idea to check out the expression cookbook for a starting point. If you just open the houdini help browser and look for "expression cookbook" it should pop up.

You can also read through the "expression functions" list if you just want an idea of whats possible.

Good luck!

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...