Delay Sim on Frame in Houdini

Houdini Switch node added to Disintegration Scene to Delay the Sim

Houdini Switch node added to Disintegration Scene to Delay the Sim

In my previous tutorials, I demonstrated how to do a disintegration and growth effect, but the visual effects start happening on frame 1. So you never actually get to render the original geometry and it ends up rendering the deformed or changed geometry on frame 1. In this post, I’ll demonstrate how to delay the effect inside the SOP Solver.

This came as a request in the comment section on the video page and I thought it was best to create a blog post to explain it for clarity.

Although I have used the previous project file from the Disintegration and Growth scene, this Delay Sim can be applied to any kind of simulation. It doesn’t have to be a SOP Solver.

If condition in the Houdini Switch parameter to decide when to Start the Delayed Simulation

If condition in the Houdini Switch parameter to decide when to Start the Delayed Simulation

All you need is a switch node to delay the simulation by passing in the “Prev Frame” data directly to the output or return the deformed geometry to the output. The decision is made by an expression that I added to the switch node.

if($F==1, 0, 1)

This is an IF statement that is used to decide which path to return to the output.

$F==1

This is the condition which is testing if the current frame ($F) is equal to 1. If this is true then this function returns the 2nd parameter, which in this cause I have the value 0. The third parameter return the value 1 when the condition is false.

A switch node in Houdini can accept multiple inputs from many different nodes and the value of the “Select Input” decides which path to use to output from the switch node. Therefore by returning 0 and 1 from this if statement:

if($F==1, 0, 1) 
Houdini Switch node added to Growth Scene to Delay the Sim

Houdini Switch node added to Growth Scene to Delay the Sim

I can delay the entire SOP Solver sim by return the exact original frame, that has no change to the geometry.