Houdini 16.5 Nodes VOP nodes

Parameter VOP node

Represents a user-controllable parameter.

On this page

The Parameter node represents the value of one of the parameters the user can set in the shader’s parameter editor interface. For example, in a Balloon shader, you could define a parameter for the Balloon Color, allowing the user to control the shader’s color.

Parameters

Name

The name of the new parameter, both in the VEX function declaration, the definition of any OP type that uses the VOPNET, and the VOP tile’s output. If a parameter by this name already exists, this operator will reference it and will disable most of of its own fields, such as the Parameter Type and Parameter Label.

The name must not be a reserved keyword.

Prefix

The optional prefix to prepend to the parameter name. The prefix changes the final name of the new parameter, both in the VEX function declaration, the definition of any OP type that uses the VOPNET, and the VOP tile’s output.

Postfix

The optional postfix to append to the parameter name. The postfix changes the final name of the new parameter, both in the VEX function declaration, the definition of any OP type that uses the VOPNET, and the VOP tile’s output.

Label

A human-readable label for this parameter. Appears in the owner node’s parameters and the tooltip when the user hovers over the output on the VOP tile.

Show Label

Toggles the display of the parameter label in the owner node’s parameters.

Type

Specifies the VEX data type of the new parameter. It can also specify how the parameter should be represented in an OP dialog. For example, a VEX vector can be viewed as 3 float values or as a color value.

Default Values

Depending on the parameter type selected, it represents the default value of the parameter in the VEX function and in the OP type that uses this VOP network.

Comment

Brief description of the parameter. The comment is included after the parameter declaration in the generated code.

Use This Node to Set Parameter Attributes

When several Parameter VOPs have the same Parameter Name, only one of the nodes is used to control the attributes of the parameter. Houdini decides which node to use for this by searching all the nodes according to the user defined order, then traversing inside subnets. If none of them have this parameter turned on, the first one found is used to set the parameter attributes. If one or more do have this option turned on, the first one with this option is used, even if another node (with this option turned off) is found first.

Use Own Export Context

When several Parameter or Bind VOPs have the same Parameter Name, some other node will determine export context. However, it may be desirable to have each Parameter VOP exporting in a different context. In such cases, setting this parameter will enable this node to specify own export context, independent of the primary definer node.

Use Input Value If Parameter Not Bound

If true, the VEX function parameter is checked to see if it is bound to an attribute in the current VEX context (e.g. point color). If not bound, the input value is is assigned to the VEX parameter. In a Surface VOP context, a VEX parameter is bound if the geometry being shaded has an attribute with the VEX parameter name.

Has Corresponding Connector

If true, the shader node parameter defined by this Parameter VOP will also have a corresponding input connector, providing such shader nodes can have input and output connectors.

Export

Specifies whether the new parameter can be exported to other contexts (written to as well as read from). If set to Always or When Input is Connected, this operator gets an input. The value wired into this input is then assigned to the exported parameter. In a Surface network, exported parameters can be used to create deep rasters. In SOP and POP networks, the exported parameters create new geometry attributes.

Never

The parameter will not be exported.

Always

The parameter will be exported.

When Input is Connected

The parameter will only be exported if the node’s input is ultimately connected to another VOP.

Export in Context

The context or contexts that the parameter is exported to. Use whitespace characters as separators when specifying multiple contexts.

Provide Menu

If the parameter type is String or Integer, then you can provide a menu of choices instead of a string entry field or an integer slider.

No Menu

No menu is provided and the entry field or slider is displayed instead.

Menu from Items

A menu is generated from the list of items specified by the Menu Items parameter.

Menu from Script

A menu is generated from the script specified by the Menu Script parameter.

Invisible

Do not show the parameter in the shader’s parameter interface. The parameter still exists and will be used to generate shader strings.

Help tab

The contents of the text field appear in the help browser when the user clicks the help button for a node of this operator type in the parameter editor.

This help can be HTML, or you can use a simple but powerful wiki format to create documentation that looks like the native Houdini help. See how to write wiki-format help.

Inputs

Unbound or Export Value

The value assigned to the new parameter if the Export Parameter toggle is checked or if the parameter is not bound when Use Input Value If Parameter Not Bound is checked.

Outputs

Parameter

The value of this VEX function parameter.

Is Parameter Bound

True if the new parameter is bound to an attribute.

Examples

RampParameter Example for Parameter VOP node

This example shows how to control the particle colours using the temperature attributes from a pyro simulation using a Ramp Parameter VOP node.

parameterVOP Example for Parameter VOP node

This example shows how inherit age as a custom attribute in to a surface shader to control opacity of particles with a ramp. It is accomplished using the Attribute Create SOP and a Parameter VOP.

The following examples include this node.

CrowdHeightField Example for Crowd Solver dynamics node

This example demonstrates using heightfields for terrain adaptation in the crowd solver, and for collisions against ragdolls in the Bullet solver.

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.

DensityViscosity Example for FLIP Solver dynamics node

This example demonstrates two fluids with different densities and viscosities interacting with a solid object.

FlipColorMix Example for FLIP Solver dynamics node

This example demonstrates the use of the Flip Solver to mix the colors of a red fluid with a blue fluid to form a purple fluid.

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.

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'.

IndirectLightBox Example for Indirect Light object node

This example shows how to set up the indirectlight object for indirect diffuse lighting. The scene consists of a box that has been extruded several times, containing a light source and the camera. The light has been placed so that all light reaching the camera must bounce more than once inside the scene before reaching the camera. The indirectlight object is configured to generate 1000000 photons. To visualize the photon map, change the rendering mode on the light to "Direct Global Photon Map". To adjust the sampling quality, modify the pixel samples or ray samples on the mantra ROP. The rendering engine used in this example is PBR.

StickyDonut Example for Sticky object node

In this example, a donut is stuck to an animated sticky object on the surface of a grid.

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.

Volume Rendering - Metaballs as Volume Example for Mantra render node

Metaball geometry can be natively rendered as a volume in mantra. Metaball rendering can be enabled by checking the Metaballs as Volume parameter on the Geometry tab of a geometry object. Any point attributes on the metaballs will be interpolated to the shading position in the same manner that point attributes are interpolated for metaball surfaces.

Here is an example using randomized point color attributes:

Controlling Shadow Quality/Performance

Shadow map generation uses the Pixel Samples and Shadow Step Size parameters (in the Mantra Render Operator) to control quality and performance in exactly the same way they are used for surfaces. Since volumes often cast soft, diffuse shadows, it is often possible to use low-resolution deep shadow maps when rendering volumes, leading to much faster render times. Shadow map Resolution can be changed on the Shadow tab of a Houdini light.

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.

Basic RIS Shading Example Example for RIS Shader Network shader node

In this file we create a simple geometry and assign BxDF shaders to it. The shading network consists of pattern shaders feeding into the BxDF shaders.

VolumeNoiseIso Example for Mantra: VEX Volume Procedural shader node

This example shows how to render an isosurface defined by a cvex shader using mantra’s volume rendering capabilities. A noise field is generated by a cvex shader, which is attached to the VEX Volume Procedural. The volume is shaded by finding the surface where the density crosses 0, and then shading using a simple surface shader that shows the normals.

BlendAttr Example for Attribute Composite geometry node

This example demonstrates how to blend attributes using the Attribute Composite SOP.

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.

FluffyTorus Example for Bake Volume geometry node

This example shows how to setup the Bake Volume SOP to compute the lightfield created by the shadowing of a fog volume. It then exports the fields properly to be rendered in Mantra by a constant volume shader.

PathAnalysis Example for Find Shortest Path geometry node

This is an advanced example of how to use the FindShortestPath SOP to prefer "central" paths, based on centraily measures computed using FindShortestPath and AttribWrangle. This helps avoid staying too close to walls where avoidable.

Turn on the Display Option > Optimization > Culling > Remove Backfaces to see inside the space more easily. Try visualizing the different centrality measures using the switch node. The same example without considering the centrality of the path is demonstrated in a side branch of the SOP network, in order to see the difference.

ColourAdvect Example for Fluid Source geometry node

This example demonstrates how you can use the Fluid Source SOP to source and advect colours from an additional volume into a smoke simulation.

Clumping Example for Fur geometry node

The Fur SOP is used to instance hair-like curves.

In this case, the Fur SOP is used to create curves that can be used for clumping. A second Fur SOP is used to illustrate how to create hairs that use the clumping geometry.

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.

Shaved Example for Fur geometry node

This example demonstrates how to use a texture to control hair density.

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.

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.

volumeanalysis_grad Example for Volume Analysis geometry node

This example shows how to use the Volume Analysis SOP to compute the gradient of a volume and displace the geometry’s points by the gradient.

barycenter Example for Volume Reduce geometry node

This example shows how to use the Volume Reduce SOP to compute the barycenter of a 3d object.

volumesurface_explicitgrade Example for Volume Surface geometry node

This example shows how to use the Volume Surface SOP to surface an SDF using another volume to specify the triangle sizes.

volumesurface_simple Example for Volume Surface geometry node

This example shows how to use the Volume Surface SOP to surface an SDF using adaptive triangle sizes.

ImportVolumes Example for Volume VOP geometry node

This example shows how to import multiple volumes into a Volume VOP SOP.

pscaleVOPSOP Example for Add Attribute VOP node

I attached a file that shows various ways to create the pscale attribute. It uses three key nodes: 1) Property POP to add pscale 2) Point SOP to add pscale 3) a VOP SOP to add pscale (that is tricked out to also do random offsets)

GroupPainted Example for Add Point to Group VOP node

This example demonstrates how to take a painted attribute and build a point group from that attribute using the Add Point to Group VOP and the Create Point Group VOP.

VOPpointgroup Example for Add Point to Group VOP node

Example of building point Groups in a VOP SOP where every other point is added to a new group.

Only point groups are supported in VOPs.

The VOPs you need to learn are:

Add Point To Group VOP, Create Point Group VOP, and Point In Group VOP

WornMetal Example for Curvature VOP node

This example shows how the curvature vop can be added to a shader network to add a worn or distressed look to your material.

ST_Colour

This is a 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.

A Condition VOP is used based on the "t" Global Variable. When "t" is less then .5, the If-Then gets a "false" Condition, and when "t" is equal to or greater than .5, the If-Then gets a "true" Condition.

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.

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.

CrinkleSphere Example for Inline Code VOP node

This example demonstrates the use of an Inline Code node that allows you to write VEX code that is put directly into your shader or operator definition.

IntersectGrid Example for Intersect VOP node

This example demonstrates how grid points can be transferred to particles on the surface of a sphere using the Intersect VOP.

RampParameter Example for Parameter VOP node

This example shows how to control the particle colours using the temperature attributes from a pyro simulation using a Ramp Parameter VOP node.

parameterVOP Example for Parameter VOP node

This example shows how inherit age as a custom attribute in to a surface shader to control opacity of particles with a ramp. It is accomplished using the Attribute Create SOP and a Parameter VOP.

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.

PointCloudLookup Example for Point Cloud Iterate VOP node

This example shows how to accomplish point cloud lookups for volumes using pcfilter and pciterate. It demonstrates how to iterate over and import values returned by a query.

RaytraceVopShader Example for Ray Trace VOP node

This example demonstrates a simple ray traced shader using a vop vex network. To modify the shader properties, create a properties shader in the material and connect it to the output shaders node. You can then add rendering parameters to the properties node. For example to control the number of reflection bounces, you would add the reflect limit parameter.

ParticleVolumeCollision Example for Volume Sample VOP node

This example demonstrates how to set attributes on a particle based on the value of a volume at the particle’s position.

To accomplish this, you can use a VOP POP to edit the particles, using the Volume Sample from File VOP to sample the volume.

In the example, particles are colored differently based on whether they are "in" or "out" of the volume, where "in" is defined in the example as "the value in the volume is > 0 at the position of the particle", but could easily be changed.

See also

VOP nodes