Houdini 18.0 Nodes LOP nodes

Surface Constraint

Constrain a prim to stick to a surface.

On this page

Solaris constraints

Currently, USD does not support constraints. Parametric constraints are probably antithetical to USD’s design mission of being descriptive, immutable, and idempotent.

As a layer above USD, that generates USD, the LOP network can compute dynamic constraints, and "bake" the results as time samples when it writes the USD to disk.

Tips and notes

  • By default, geometry imported from SOPs (for example, through SOP Import or SOP Create) has point attributes imported into USD. So you can set up attributes (for example, an up vector attribute) in SOPs and use them in this node.

  • The constraint LOP nodes work by converting USD geometry into SOPs, then applying constraint CHOP nodes to the SOP geometry, then applying changes back onto the USD primitives as overrides. Because of this, the nodes sometimes use SOP terminology (for example, "point group" and "primitive group"), even though they work with USD data. Future versions of Houdini may change this to be clearer.

  • In VEX snippets, you can use @ variable names containing colons (:). This makes it easier to automatically bind certain USD attribute names (for example i@primvars:foo). (These names are not normally legal in names in VEX source code. The node automatically encodes these kinds of names when used in a snippet.)

Parameters

Source

Type

Whether the source (the thing constrained to the surface) is a regular primitive, or a point instance. You cannot use a nested point instance as a source.

Source Instances

When Source ▸ Type is "Point Intance", the point instance to use, using /path[instance_index] syntax (for example, /geometry/instancer[1]).

Surface

Target Source

Where to get the surface to stick to, either the first input or the second input.

Type

Whether the surface is a regular primitive, or a point instance.

Constraint Options

Import Time

Specify the frame at which the source and/or target geometry are imported into the embedded sopnet to build the constraints. The default "$FF" expression forces the constraint LOP to be time dependent, which is needed when operating on a non time-dependent network that has time samples driving the source or target primitives. However, for better performance with a non time-dependent network with no time samples, it is recommended to use a static value instead.

Maintain Local Offset

When this is off (the default), the source object snaps onto the surface. When this is on, the object maintains the same relative distance between itself and the surface as it follows the shape of the surface.

Mode

How to map a position parameter onto the surface.

UV (Sticky)

Look up the coordinates in the UV parameter on the surface using the texture coordinates from a primvar (specified in the UV attribute parameter).

Primitive + UV

Treat the coordinates in the UV parameter as intrinsic local UV coordinates on a specific polygon face, where the first two components are U and V coordinates, and the third component (W) is the index of the polygon face. This does not require an attribute containing texture coordinates.

Point Group

Place the source object at the surface point closest to the centroid of the points in a certain geometry subset.

Primitive Group

Place the source object at the surface point closest to the centroid of the polygon faces in a certain geometry subset.

Closest Distance

Places the source object at the surface point closes to the world space position in the Position parameter.

UV Attribute

When Mode is "UV (sticky)", the name of a primvar containing texture coordinates. For geometry imported from SOPs, this may be uv, however in USD it is usually called st. The texture coordinates must be non-overlapping.

UV

When Mode is "UV (sticky)", the texture coordinate at which to place the source object.

Group

When Mode is "point group" or "primitive group", the name of a geometry subset to find the closest surface point to.

Position Attribute

When Mode is "Closest Distance", the name of a primvar containing point positions. For geometry imported from SOPs, this may be P, but in USD this is usually the positions attribute.

Position

When Mode is "Closest Distance", the world space position to find the closest surface point to.

Use Snippet

When Mode is "UV (sticky)", "Primitive + UV", or "Closest distance", you can set the position/UV using a VEX snippet. @ptnum is the index of the current prim being constrained. You can use npoints(0) to get the total number of prims being constrained. You can use @Frame and @Time to make the snippet time-dependent.

Orientation

Look At Mode

How to orient the source object.

None

Don’t rotate the source object.

U Direction

Use the surface’s U direction as the Look At direction. This works best with NURBS surfaces.

V Direction

Use the surface’s V direction as the Look At direction. This works best with NURBS surfaces.

Direction Attribute from Geometry

Use the value of a vector primvar on the surface as the Look At vector.

From Primitive: Rotate the source object to always point at a certain prim.

Look At Source

When Look at mode is "from primitive", where to get the primitive to look at (the first or second input).

Look At Xform

When Look at mode is "from primitive", the scene graph path of the prim to look at. (This does not support looking at a point instance.)

Direction Attribute

When Look at mode is "Direction attribute from geometry", the name of a vector primvar (without the primvar: prefix) on the surface to use as the look at vector.

Look Up Mode

How to compute the up vector.

Up Vector Attribute from Geometry

Use vector3f primvar on the surface to specify the up vector at each point.

U Direction

Use the surface’s U direction as the up vector. This works best with NURBS surfaces.

V Direction

Use the surface’s V direction as the up vector. This works best with NURBS surfaces.

X Axis

Use the world +X direction as the up vector.

Y Axis

Use the world +Y direction as the up vector.

Z Axis

Use the world +Z direction as the up vector.

From Primitive

Rotate the source prim so its up vector points at a specific prim as it moves along the curve.

Custom

Use the vector in the Up vector parameter.

Up Vector Source

When Look up mode is "from primitive", where to get the primitive to point the up vector at (the first or second input).

Up Vector Xform

When Look at mode is "from primitive", the scene graph path of the prim to point the up vector at. (This does not support point instances.)

Look At Axis

Which axis on the source object to match to the look at vector. You can use this to compensate for the orientation the source object was created in. This can’t be the same as the Look up axis.

Look Up Axis

Which axis on the source object to match to the up vector. You can use this to compensate for the orientation the source object was created in. This can’t be the same as the Look at axis.

Up Attribute

When Look up mode is "Up attribute from path", the name of a vector3f primvar (minus the primvar: prefix) on the surface to use as the look up vector.

Roll

Roll angle (in degrees) around the look at direction.

Use Snippet

Set the roll using a VEX snippet. The snippet should write the roll degrees to the roll variable. You can use the variables typically available to an Attribute Wrangle SOP. @ptnum is the index of the current prim being constrained. You can use npoints(0) to get the total number of prims being constrained. You can use @Frame and @Time to make the snippet time-dependent.

The initial value of roll (at the start of the snippet) is the evaluated value of the Roll parameter. So you can use an expression in that parameter to compute a "base" value, and modify it using the snippet.

Examples

SurfactConstraint Example for Surface Constraint

This example contains a number of various uses for the Surface Constraint LOP.

See also

LOP nodes

  • Add Variant

    Adds one or more variants to a variant set on a primitive. This node creates the primitive if it doesn’t exist.

  • Additional Render Vars

    Create multiple render vars.

  • Assign Material

    Assigns a material to one or more USD primitives. You can use also programmatically assign materials using VEX, programmatically override material settings for each assignment, and programmatically assign materials to geometry subsets.

  • Attribute Wrangle

    Create/edit USD primitive attributes using a VEX snippet.

  • Auto Select LOD

    Automatically selects a level-of-detail variant based on the primitive’s distance from the camera.

  • Bake Skinning

    "Bakes" animation driven by a UsdSkel into transforms and point positions.

  • Begin Context Options Block

    This node begins a block of LOP nodes, within which certain context options have certain values.

  • Blend

    Partially applies edits to a layer’s attributes based on a fractional weight.

  • Cache

    Caches the results of cooking the network at different times, increasing playback speed.

  • Camera

    Adds a USD camera to the scene.

  • Capsule

    Creates or edits a "capsule" (tube with hemispherical ends) shape primitive.

  • Collection

    Creates/edits a collection using selected prims.

  • Cone

    Creates or edits a cone shape primitive.

  • Configure Layer

    Edits metadata on a layer.

  • Configure Primitives

    Edits various metadata on one or more primitives.

  • Configure Properties

    Configures metadata on properties (relationships and attributes).

  • Configure Stage

    Configures metadata for how to load layers into the stage and asset resolution.

  • Create LOD

    Uses the PolyReduce SOP to automatically generate multiple levels of detail from a high-res model, and stores them as USD variants.

  • Cube

    Creates or edits a cube shape primitive.

  • Cylinder

    Creates or edits a cylinder shape primitive.

  • Dome Light

    Creates or edits a USD Dome Light prim. A dome light emits light inward, simulating light coming from the sky/environment surrounding the scene.

  • Drop

    Runs a simulation to drop primitives under gravity.

  • Duplicate

    Creates copies of a prim (and its descendants).

  • Edit

    Interactively transforms prims in the viewer. Can use physics collisions to position props realistically.

  • Edit Context Options

  • Edit Material

    Allows you to edit an existing USD material by modifying parameters and shader connections. This can be useful if the existing material is on a non-editable layer.

  • Edit Properties

    Lets you build a spare parameter interface to directly edit attribute and relationship values.

  • Edit Prototype

    Switch point instances or USD instanceable prims to instance a different prototype.

  • Edit Target Layer

    Allows you to apply edits directly in a lower layer, instead of overriding prims and attributes in the active layer.

  • Error

    Generates a message, warning, or error, which can show up on a parent asset.

  • Extract Instances

    Converts an instance into a "real" editable prim.

  • Fetch

    Grabs the output of another LOP, potentially in another LOP network.

  • Follow Path Constraint

    Constrains a prim to follow a path curve.

  • For Each

    The end node of a For-Each loop block.

  • Geometry Subset VOP

    Creates USD geometry subsets within geometry prims (similar to groups in SOPs) based on evaluating a VEXpression or VOP network.

  • Graft

    Takes scene graph trees from other inputs and attaches them onto branches of the scene graph tree in the first input.

  • Inline USD

    Parses usda code representing a layer and adds it to the layer stack.

  • Instancer

    Instances or copies primitives onto points.

  • Karma Procedural

    Sets up render-time instantiation for Karma.

  • Karma Render Properties

    Configure Render Properties for Karma (Beta).

  • Karma Standard Render Vars

    Create standard karma render vars (AOVs/Image Planes).

  • LOP nodes

    LOP nodes generate USD describing characters, props, lighting, and rendering.

  • Layer Break

    Starts a new active sublayer that subsequent nodes will edit.

  • Layer Replace

    Replaces all uses of a certain layer with a substitute layer from its second input.

  • Light

    Creates or edits a USD Light prim. This node also adds some useful Karma-specific attributes.

  • Light Linker

    Creates USD light link properties based on rules.

  • Light Mixer

    Lets you interactively edit USD properties for multiple lights.

  • Load Layer

  • Look At Constraint

    Constrains a prim to always point toward a target.

  • Material Library

    Imports Material VOP nodes as USD material prims.

  • Material Linker

    Creates material assignments based on rules.

  • Material Variation

    Creates attributes/primvars to override material parameters per-prim/instance.

  • Merge LOP

    Merges the layers from incoming stages into a unified layer stack.

  • Modify Point Instances

    Modify point transforms and property values for individual point instances.

  • Null

    This node does nothing. It can be useful to insert a Null into a network as a "fixed point" in the network that you can refer to by name in expressions/scripts.

  • Output

    Represents the output of a subnetwork. Allows you to design a node asset with multiple outputs.

  • Parent Constraint

    Makes a primitive appear to inherit the transform hierarchy of another prim somewhere else in the tree.

  • Points Constraint

    Position and Orient primitives using point positions from a geometry.

  • Primitive

    Bulk-creates one or more attributes of a certain type.

  • Prune

    Hides or deactivates primitives and point instances.

  • Python Script

    Lets you write Python code in the node to use the USD API to directly manipulate the stage.

  • Reference

    References the contents of an external USD file into a branch of the existing scene graph tree, or removes/replaces existing references.

  • Render Geometry Settings

    Applies renderer-specific geometry settings to geometry in the scene graph.

  • Render Product

    Creates or edits a UsdRenderProduct prim, which represents an output of a renderer (such as a rendered image file or other file-like artifact produced by a renderer), with attributes configuring how to generate the product.

  • Render Settings

    Creates or edits a UsdRenderSettings prim, which holds the general settings for rendering the scene.

  • Render Var

    Specifies a custom variable computed by the renderer and/or shaders, either a shader output or a light path expression (LPE).

  • Retime Instances

    Offsets and/or scales the timing of animation on selected instances.

  • SOP Create

    Lets you create geometry in a SOP subnetwork inside this node, so you can create geometry in-place in the LOP network instead of needing a separate SOP network.

  • SOP Import

    Imports geometry from a SOP network into the USD scene graph.

  • SOP Modify

    Converts USD geometry into SOP geometry, runs the SOP subnet inside this node on the geometry, and converts the changes back to USD overrides.

  • Scene Import

    Imports models, materials, and lights from the Object level into the LOP network.

  • Scope

    Creates a "scope" primitive. Scope is the simplest form of grouping, and does not have a transform. Scopes can be useful for organizing the scene tree.

  • Set Extents

    Sets the bounding box metadata of selected primitives.

  • Set Variant

    Selects (switches to) one of the variants stored in a variant set on a primitive.

  • Simulation Proxy

    Generates low-poly collison geometry suitable for physical simulation and creates a proxy relationship to the original model.

  • Sphere

    Creates or edits a sphere shape primitive.

  • Stage Manager

    Provides a convenient interface to reference in many files at once and place them in the scene graph tree.

  • Store Parameter Values

    Lets you store temporary (unsaved) data in the stage.

  • Sublayer

    Imports from USD files or other LOP node chains into as sublayers, or removes/replaces/reorders existing sublayers.

  • Subnet

    Encapsulates a LOP subnetwork, allowing you to organize and hide parts of the network.

  • Surface Constraint

    Constrain a prim to stick to a surface.

  • Switch

    Passes through one of several inputs, based on a parameter choice or expression.

  • TimeShift

    Outputs the stage as it is at a different point in the timeline.

  • Transform

    Edits the transforms of selected USD primitives.

  • Transform UV

    Moves, rotates, and scales texture coordinates on USD primitives.

  • USD ROP

  • USD Render ROP

  • Value Clip

  • Vary Material Assignment

    Assign different materials across a number of prims to create variation.

  • Volume

    References volume data on disk into a volume prim containing field prims.

  • Xform

    Creates or edits an Xform prim. Xform (and its sub-classes) represents a transform in the scene tree.

  • attribvop