Jump to content

Time Dependancy (a Simulation Sop)


Recommended Posts

I'm working on a sop that preforms a simulation (ala the old particle sop). I have an init frame that resets the sim and I've set:

OP_Node::flags().timeDep = 1;

This all works fine when I play though the frames sequentially. If I jump forward in the time bar 20 frames, right now it only cooks the 20th frame and doesn't automatically cook all the frames in between (like the particle sop does). I'm guessing there's an easy solution, probably a flag similar to the one I've set above? just havn't found it yet. Or is this something I need to hand hold a bit more (ie keep track of uncooked frames and tell houdini to cook those in order)

thanks!

d

Link to comment
Share on other sites

Hi Daniel,

The normal mode of operations for SOPs is that someone (the viewer, the renderer ROP, etc...) requests a geometry at a specific time. This time is passed in to the cook method in the context data. So I think you have to manually keep track of the last time you cooked and then call your simulation incrementally until you get to the requested cook time. If you have a good way of caching data, all the better.

Hope that helps,

George.

Link to comment
Share on other sites

you have to manually keep track of the last time you cooked and then call your simulation incrementally until you get  to the requested cook time.

25564[/snapback]

Also have a user-specified "reset frame" (eg frame 1) where the simulation goes to its initial state. And if you're not doing caching then you'll have to think a bit about how you want to handle the case where the user clicks frame 1 then 20 then 10.

Cheers!

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