Jump to content

addpoint(VEX) help adding permanent point


typerhack

Recommended Posts

Greetings,

I am trying to use addpoint() every 24 frame and i wanted it to stay in the geometry. The problem is that the newly added point is only available in that specific frame. I want to add a point every 24 frame. and make it permanent. is there a way to add permanent point ever 24 frame? any help would be appreciated.

Thanks,

 

P.S:

the code is like this:

if (@Frame%24==0) {
    int index = addpoint(0,@P);
    int setPtAttrib = setpointattrib(0, "move", index, 1, "set");
}

 

Edited by typerhack
Link to comment
Share on other sites

The way Houdini works is that it evaluates nodes from top to bottom of your node-graph (well, in SOPs : not talking about DOP or PDG...). Therefore, each frame, your graph is re-evaluated independently of the previous frame.... until you use a SOP Solver node.

The SOP Solver node allows you (when you dive inside him), to access (i) the incoming stream of nodes, evaluated at this particular frame and (ii) the same stream of nodes, evaluated at the previous frame.

Therefore, you can perform your code on the incoming stream, make your tests and create geometry, and then merge it to the geometry of the previous frame. It allows you to keep changes you made on the geometry on previous frames (because each frame you can merge what you are doing with the results of previous frames).

Here some docs : https://www.sidefx.com/docs/houdini/nodes/sop/solver.html

Edited by StepbyStepVFX
  • Like 2
Link to comment
Share on other sites

On 1/12/2020 at 12:16 PM, StepbyStepVFX said:

The way Houdini works is that it evaluates nodes from top to bottom of your node-graph (well, in SOPs : not talking about DOP or PDG...). Therefore, each frame, your graph is re-evaluated independently of the previous frame.... until you use a SOP Solver node.

The SOP Solver node allows you (when you dive inside him), to access (i) the incoming stream of nodes, evaluated at this particular frame and (ii) the same stream of nodes, evaluated at the previous frame.

Therefore, you can perform your code on the incoming stream, make your tests and create geometry, and then merge it to the geometry of the previous frame. It allows you to keep changes you made on the geometry on previous frames (because each frame you can merge what you are doing with the results of previous frames).

Here some docs : https://www.sidefx.com/docs/houdini/nodes/sop/solver.html

Thank you for the response, that helped to solve the problem. If you don't mind i have another question. is there a way to stop the solver at specific frame and start another one to simulate on the result of last simulation?

Link to comment
Share on other sites

10 hours ago, StepbyStepVFX said:

Well, I don’t really understand the need so hard to orient you in the right direction, but maybe with a bunch of switch nodes and timeshift node ? 
Really depends on what you need to achieve. 

Thank you that helped a lot!

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