Process POP Wrangle only once per frame in a multi sub-step POP solver?

   2964   3   1
User Avatar
Member
43 posts
Joined: Dec. 2010
Offline
Hey there, I have a situation where I am using a POP wrangle inside a DOP network to set some attributes on my particles using a fairly expensive volumesample() VEX call, that is sampling a volume from another SOP network.
The problem is I have up to 10 sub-steps in the sim but only need that POP wrangle to run and set my attributes once per frame, not at every sub-step within the frame.

Is there any way to tell the POP wrangle to only execute on the first sub-step of the simulation frame?
Or more broadly, is there a way to read in my SOP volume geometry to my DOP network evaluated at a discreet time that I specify (ie. at a whole integer frame) so that Houdini doesn't re-cook the incoming SOP geometry at every sub-step, but just the one time within that frame?

I tried setting this expression on the POP wrangle Activation parameter, that would only evaluate to 1 on a whole integer frame but that didn't work (the referenced SOP network still cooks at every substep):

$T=($F-1)/$FPS)
(this evaluates to 1 on integer frames like 1, but evaluated to 0 on inbetween frames like 1.5)


I have used proprietary fx tools in the past that allowed a geometry data graph node to be referenced and evaluated at any specified time, and I was wondering if there is a way to do the same in Houdini?
I had a quick look at the SOP Geometry node in the DOP network, which looked promising as it has a time parameter that can be set, but I couldn't get it to read in my geo into DOPS, I'm sure I'm just not using it correctly..

I hope my question isn't worded too confusingly, I'm still new to the software and loving it
Thanks for any help!
MC
User Avatar
Member
7759 posts
Joined: Sept. 2011
Offline
gasintermittentsolve allows the input solvers to run only once per timestep.
User Avatar
Member
43 posts
Joined: Dec. 2010
Offline
Thanks, that did the trick!
MC
User Avatar
Member
1 posts
Joined: Dec. 2017
Offline
if (rint(@Frame) == @Frame) {
// do something…
}
  • Quick Links