# Pop Force

The Ultimate Houdini node reference

# Visit the Node Bible

### Pop Force

#### The pop force applies forces to your particles

Drag to resize

Summary:

First of all, understand that the "force" attribute is not the same thing as velocity.  Velocity describes how far something will be from it's current position in one second.  Think of "force" adding to your velocity over time.  As an example, let's say that I have a velocity in the y direction a {0,1,0} and a force set to {0,3,0}.  The "new" velocity after one second would be the original v which = {0,1,0} + the force {0,3,0} = {0,4,0}.

Think of the pop force as two components in one node.  One component is a constant force in one particular direction.  The next is a curl noise which changes your velocity over time based on a noise pattern.  In addition, you have the option to control the constant and curl forces with vexpressions.

Drag to resize

Main Parameters:

Activation:

--  This turns the node on/off

Group:

--  This correlates with dop streams and any imported groups from sops

Guide:

--  Provides a visualization of the force being applied.  This does not apply to the noise.

Force:

--  A constant force in one particular direction.  Works well when used in combination with CHOPs

Ignore Mass:

--  Should the particle's mass affect how much the force affects it?  If so, turn this off.  Adding mass makes it more difficult to control, but also provides interesting variety to the simulation.

Use Vexpressions:

-- The vexpressions here are intended to work in conjunction with the Force parameter above.  This is not intended to work with the noise tab settings.  Be sure to click the drop-down for examples on vexpressions you can use here, and for more information about vex, visit Vex Foundations I

Drag to resize

Noise:

----
This noise utilizes a curl noise in vops
----

Amplitude:

--  How much force should be applied to the particles with the noise

Swirl Size:

--  How large the curls ought to be with the curl noise.  For more information about how curl noises work, visit this link:
https://www.cct.lsu.edu/~fharhad/ganbatte/siggraph2007/CD2/content/papers/046-bridson.pdf.  In practice, it's common to use this noise for large, gradual movement in your particles.  Setting a large swirl size will help achieve this.

Swirl Scale:

--  Image this as scaling up the swirls in different directions.  To visualize this better, visit this link:
https://al-ro.github.io/projects/curl/
Then, imagine these swirl patterns be stretched in 3 dimensions (x,y,z).  The swirl scale lets you scale in these directions.

Pulse Length:

-- Over time, the curl noise will change direction.  How quickly it changes its direction is based on the pulse length.  Higher pulse length = direction changes slowly.  Smaller pulse length = direction changes quickly.

---------------------------
The next few parameters deal with adding additional smaller details to the simulation via turbulence.  Turbulence happens with a certain number of iterations (that's what you're adjusting with the turbulence number) and it's easy to think of the "iteration" of something as the number of times this node will repeat a calculation.  In this case, the "turbulence" calculation is calculated multiple times to move the particles around with small details.
--------------------------

Roughness:

--  This is how much force the turbulence is allowed to apply to the particles with each iteration.  In the world of noises, each iteration is considered an "octive," and the more technical definition for roughness would be the relative amplitude for each octive.  The higher this goes, the more impact each iteration of turbulence will have.

Attenuation:

--  According to the docs, "Noise attenuation exponent" which... isn't very helpful.  From my estimation, the "Noise attenuation" multiplies the resulting position by an exponent at the very end.  If you set this to a value of 2, notice how everything goes in the positive x,y,z direction.  That is because it's taking the final position and adding an exponent to (x,y,z).  So, as an example, if the position in x calculated a value of -5 and we put this to the power of 2 (amp=2) then that's like doing -52.  This would give us -5*-5 = 25.  Likewise, everything will go negative if you provide fractional values.

In practice, attenuation isn't usually modified and doesn't seem to have any practical use within the node parameters from what I can tell.  However, in vex, it is possible to utilize amplitude without it becoming uni-directional in either the positive or negative directions.  The process is outlined here:  https://www.keatonwilliamson.com/houdini/noise/about_noise

Offset

--  This allows an offset for the noise, and in practice, offers you a different seed to work with.  In other words, move the offset for a randomly different version of the noise.

Use Vexpressions:

-- Here you can alter the magnitude of these noise parameters using vex.  Be sure to play with the dropdown menu for examples and visit Vex Foundations I if you've never used vex before.

Drag to resize

Bindings:

Bindings can be used to tell which nodes are allowed to work with each other.  Nodes which belong to the same geometry name are allowed to work with each other.

As an example, if you set the binding on a pop source to "goobie" and leave everything else at its defaults, no other node in your dop network will want to work with the popsource because they have a different binding name.  If, however, you go to your solver and change its binding to "goobie" as well - now the pop solver will work with the pop source node.  Lastly, if you set a pop force's binding to "goobie", that will now allow the pop force to interact with the pop source node.  NOTE:  Global forces (ex: the Gravity DOP) do not feature any bindings and will work on all data within the dop network.

Drag to resize

Evaluation Node Path:

In Houdini, you can use ch() expressions within the parameters of this node to do things.  By default the path is set to "."  This means to look at the current node when using the ch() expression.  From the Houdini docs:

"For nodes with local expressions, this controls where ch() style expressions in VEX are evaluated with respect to. By making this ., you can ensure relative references work. It is important to promote this if you are embedding a node inside an HDA you are also exporting the local expressions."

Drag to resize

Inputs:

This section deals with a situation which you might run into while using vexpressions.  In vex, you must specify which input to access data from for most functions.  This means 0 = first input 1 = second input, and so-on.  In DOPs, you don't have the ability to plug into those inputs.  Instead, you specify where that data comes from here in the input tab.

Take this example:  Let's say that you want to access a point attribute from the geometry that's plugged into the first input of your dop network.  You could say something like this:

v@myAttribute = point(0,"Cd",44)

This function can translate to - "I'm looking for a point attribute, read this data from geometry input #0 (which corresponds with input 1 in the inputs tab), I'm looking for an attribute called "Cd", and I want to read this attribute from point #44."

And then, within the Input tab, you can say that the first input argument (which is 0) corresponds to the first context geometry.