Houdini 17.0 Nodes VOP nodes

Constant VOP node

Outputs a constant value of any VEX data type.

On this page

This operator outputs a constant value of any VEX data type.

Use this operator type to create a value that is not going to change between different instantiations of the VEX operator defined by the VOP network. For example, if a shading function required multiplying a value by 2, or finding the cross product of a vector and { 0, 1, 0 }, the values 2 and { 0, 1, 0 } would most easily be represented by a Constant VOP. If the value 2 or { 0, 1, 0 } might change depending on the properties of the material being shaded, a Parameter VOP should be used instead.

Unlike this operator, the Parameter VOP allows the specification of a different value for each instantiation of the OP type that uses this VOP network. For example, if you want the surface color to be accessed by a Surface shader (SHOP) using this VOP network, make the color a Parameter VOP instead of a Constant.

Outputs

Constant Value

The value specified by the parameters of this operator.

Parameters

Constant Type

Specifies the VEX data type of the value output by this operator. In some cases there is more than one way to represent a VEX data type. For example, the vector type can be represented by 3 float values, or a single color value. This parameter also specifies how the VEX value should be represented. This determines which parameter to use to define the value output from this operator.

Default Values

Represents the value of the constant in the VEX function.

Constant Name

The name of the constant defined by this operator, both in the generated VEX code and on the operator tile’s output.

Outputs

Constant Value

The value specified by the parameters of this operator.

Examples

The following examples include this node.

Stadium Crowd Example Example for Crowd Solver dynamics node

Crowd example showing a stadium setup

The setup creates a stadium crowd. The rotating cheer_bbox object is used as a bounding box for the agents. When they are inside it it will trigger a transition from a sitting to a cheering state. After a few seconds the cheering crowd sits back down by transitioning into a sitting state.

Note

The animation clips need to be baked out before playing the scene. This should happen automatically if example is created from Crowds shelf. Otherwise save scene file to a location of your choice and click Render on '/obj/bake_cycles' ropnet to write out the files. The default path for the files is ${HIP}/agents.

Tip

To only see a section of the crowd for quicker preview there’s a switch node in /obj/crowdsource/switch_all_subsection. When 0 it will show all agents, when set to 1 will only show a small section.

Street Crowd Example Example for Crowd Solver dynamics node

Crowd example showing a street setup with two agent groups

The setup creates two groups of agents. The yellow agents are zombies which follow a path of the street. The blue agents are living pedestrians that wander around until they come into proximity of the zombies and then they swtich into a running state.

Triggers to change agent states are setup in the crowd_sim dopnet. The zombies group uses proximity to the stoplights and the color of the light to transition into a standing state when lights are red. The living group transition into a running state when they get close to the zombie agents.

Note

The animation clips need to be baked out before playing the scene. This should happen automatically if example is created from Crowds shelf. Otherwise save scene file to a location of your choice and click Render on '/obj/bake_cycles' ropnet to write out the files. The default path for the files is ${HIP}/agents.

FlipColumn Example for FLIP Solver dynamics node

This example demonstrates how a mixture of fluid colours can have their colour changed by a collision with a static object.

FlipFluidWire Example for FLIP Solver dynamics node

This example demonstrates the use of the Flip Solver and the Fluid Force DOP. The Fluid Force DOP is used to apply a drag force on a wire object according to the motions of a flip fluid. The drag force is only applied at locations where fluid exists in the fluid object.

SpinningFlipCollision Example for FLIP Solver dynamics node

This scene shows how to create FLIP fluids based on the velocity of geometry by generating new particles from points scattered on the original geometry based on the velocity vectors. It also shows how to set up the original geometry to act as a collision object for the fluid.

DiffuseSmoke Example for Gas Diffuse dynamics node

This example demonstrates how to diffuse the density of a smoke simulation using the Gas Diffuse DOP.

grass

This example simulates grass being pushed down by an RBD object. Fur Objects are used to represent the blades of grass and Wire Objects are used to simulate the motion. When a single Fur Object is used to represent the grass, neighbouring blades of grass will have similar motion. Additional objects with different stiffness values can be used to make the motion less uniform. When "Complex Mode" is enabled, two objects are used to represent the grass. The stiffness of each set of curves can be controlled by adjusting the "Angular Spring Constant" and "Linear Spring Constant" parameters on the corresponding Wire Objects.

FluidGlass Example for Particle Fluid Solver dynamics node

This example demonstrates how to get a smooth fluid stream to pour into a glass.

CurveForce Example for POP Curve Force dynamics node

This example demonstrates the use of the POP Curve Force node to control the flow of a particle sim AND a flip fluid sim.

2dfluid Example for Smoke Object dynamics node

Demonstrates exporting a 2d fluid into COPs where it can be saved to disk as a sequence of image files to then be used as texture maps, displacement maps, etc.

BreakWire Example for Wire Solver dynamics node

This example demonstrates how to break wire constraints on a per point basis. The wire solver is set up to constrain certain points if it finds an attribute named 'pintoanimation'.

MotionVector Example for Mantra render node

The example demonstrates how to generate a motion vector layer for post-velocity compositing. Load the example and render 5 frames. Then in the image viewer, switch from 'C' (colour) to 'motion_vector' to see the results.

RampReference

This example demonstrates the use of ramps and referenced ramps which are animated over time.

Down Hill Lava Flow Example for Material shader node

In this file we create a downhill lava flow with crust gathering and hardening at the base of the slope. All of the animation is achieved through the shader itself, and all of the geometry is completely static.

Note

Most of the parameters for the lava material are overridden by point attributes created in the surface nodes.

FirePit Example for Material shader node

Note

No geometry is animated in this file. All animation is achieved by animating the textures

Flames are grids so that UV textures can easily be applied, they are then warped around a metaball using a magnet SOP. The flames are then assigned to either a yellow or blue Flames texture. The Flames' opacity mask wrap is set to Decal to prevent the texture from repeating and showing a single pixel ring at the top of the flame geometry. I'm also using a mask file named flameOpacMap.jpg to enhance the flames' shape at the top. The noise offset has been animated over $T with an greater emphasis on the Y axis so that the flames look like they are rising. This is the same reason the Noise jitter is larger for the Y axis as well.

The coals are spheres that have been copy stamped onto a deformed grid. Using Attribute Create surface nodes I am able to override and copy stamp the lava texture’s parameters at the SOP level so that local variables, such as $BBY, can be used to animate the texture. This way the texture’s crust and its crust values can be used only to form the tops of the coals. This reserves the lava aspect of the texture to be used on the bottoms of the coals. The lava intensity (Kd attribute) is then stamped and animated to create the look of embers on the bottom of coals glowing.

StyleDisplacement Example for Material shader node

This is an example file showing an object made up of two quads, one with a bump map, the other with true displacement. This object is duplicated, and the second copy uses a style sheet to reverse the material assignments on the two quads.

RandomMaterial Example for Attribute String Edit geometry node

This example demonstrates how to use the Attrib String Edit SOP to modify String primitive attributes and randomize the colours on a grid on a per-primitive basis.

FurBall Example for Fur geometry node

This example demonstrates how the Fur SOP builds hair-like curves based on guide curves and skin geometry.

FurBallWorkflow Example for Fur geometry node

This example demonstrates how the Fur SOP and Mantra Fur Procedural can be applied to an animated skin geometry. CVEX shaders are used to apply a custom look to the hairs based upon attributes assigned to the geometry.

FurPipelineExample Example for Fur geometry node

This example illustrates how custom shaders can be used to define the appearance of fur generated by the Fur SOP.

FurTextureMap Example for Fur geometry node

This example demonstrates how to use a texturemap to color fur.

PaintPoints Example for Paint geometry node

This example demonstrates how to paint scattered points onto the surface of your geometry with a set number of points per area.

AlphaOmega Example for Points from Volume geometry node

This example demonstrates how to use a Points From Volume SOP to create a target goal for a flip simulation and make it fill a given piece of geometry.

CircleSolvers Example for Solver geometry node

This example demonstrates various ways in which you can use a solver node to transform an object based on ordinary differential equations.

There are 6 different solvers in this example. There is also the exact answer as a point of reference. The solvers are numerical methods that solve the following coupled Ordinary Differential Equations with initial conditions:

x' = y ; x(0) = 1
y' = -x ; y(0) = 0

The numerical methods for Ordinary Differential Equations are: Forward Euler, Runge-Kutta Second Order, Runge-Kutta Third Order, Runge-Kutta Fourth Order, and Parker-Sochacki solved two ways. In one version, Parker-Sochacki is hard coded at order 5. In another version Parker-Sochacki is written in a for loop where the order can be adjusted by the user.

UnpackWithStyle Example for Unpack geometry node

This example demonstrates the Unpack SOPs ability to evaluate style sheet information while unpacking. Nested packed primitives are used to demonstrate partial unpacking while still preserving styling information. This example also demonstrates the use of a Python SOP to extract information from the per-primitive style sheets.

DetectOverlap Example for Volume Merge geometry node

This example shows how to detect the overlapping regions of many incoming volumes procedurally using Volume SOP and Volume Merge SOP.

Fuzzy Logic Obstacle Avoidance Example Example for Fuzzy Defuzz VOP node

This example shows agent obstacle avoidance and path following implemented using a fuzzy logic controller.

SimpleInsideSubnet

This is a very simple example of using the If-Then Block VOP with the "true" value coming from outside the If-Then subnet, and the "false" value coming from inside the If-Then subnet.

In this example, the red color is used if the value fed into the condition is not True, and blue if the condition being fed in is True.

SimpleOutsideSubnet

This is a very simple example of using the If-Then Block VOP with the "true" value coming from outside the If-Then subnet, and the "false" value also coming from outside the If-Then subnet.

In this example, the red color is used if the value fed into the condition is not True, and blue if the condition being fed in is True.

SimpleMetaImport Example for Meta-Loop Import VOP node

This example demostrates how to use the Meta-Loop Start, Meta-Loop Next and Meta-Loop Import VOPs.

It calculates the sum of the densities of all metaballs in some input geometry, and uses that total to create an image in a Composite Network.

PointCloudIterateAverage Example for Point Cloud Iterate VOP node

This example shows how the pciterate vop can be used to average together points returned by pcopen. First, a point cloud is generated with a floating point "check" channel initialized to 1 inside a circle in the x-z plane. Then, the points are filtered in a shader by looping using the pciterate vop and averaging the value of the "check" channel. The point cloud used in the example is stored inside the asset as points.pc.

See also

VOP nodes