Jump to content
Sign in to follow this  
typerhack

addpoint(VEX) help adding permanent point

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

Share this post


Link to post
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

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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. 

Edited by StepbyStepVFX
  • Like 1

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×