Primitive surface node

Edits primitive, primitive attributes, and profile curves.

All Parameters Inputs Local variables Example files

See also: Ends, Transform, Point, Reverse

In Houdini, each geometry primitive has attributes such as XYZ position, size, orientation, color, and alpha.

A Bezier surface is a single primitive, as is a NURBS surface, while a polygon mesh can be made of hundreds of individual primitives.

You can use this operator to:

Template geometry

Various options let you modify the input primitives in relation to another piece of geometry. For example, you can match the normals of the input primitives to the normals of the template geometry.

You can use a group within the input primitives as the template geometry (using the Template group parameter), or connect the template geometry to this node’s second (Template) input.

Tip

The local variables in the Primitive SOP are relative to the primitive. You can use the prefixes “det”, “pt”, or “vtx” to use detail, point, or vertex variables. For example, $ptTX, $ptTY, $ptTZ for point coordinates.

Parameters

Source Group

Primitive and/or profile group to operate on.

Template Group

A subset of template points to transform to.

Transform

Do Transformation

Transform the input primitives using the parameters below.

Rotate to template

Available when geometry is connected to the second (template) input. Rotates primitives to face template normals. Match Normals

Off

Do not match the template.

On

Rotate primtives to face the normals of template geometry.

Match normals

Rotate primitive so their normals match the normals of the template geometry.

Transform Order

Order in which transformations occur.

Rotate Order

Order in which rotations occur.

Translate

Moves primitives along X, Y, and Z axes.

Rotate

Rotates primitives.

Scale

Scales primitives along X, Y, and Z axes.

Shear

Amount of shearing. The three values represent X on XY plane, X on XZ plane, and Y on YZ plane respectively.

Pivot

Local pivot point for transformations.

Lookat Object

Rotates the input primitives to point at this object.

Up-Vector

Orientation along axes.

Vector Attributes to Transform

Names of the vector attributes to transform using the parameters above. You can only transform point and primitive vectors can be transformed. You cannot transform vertex attributes.

A value of * means to transform all known vector attributes. If the field is empty, no attributes are transformed.

Attributes

These attribute changes only apply to primitives, not to profiles.

Color

Diffuse color (RGB)

Alpha

Transparency value

Crease

Crease weight for polygonal subdivision

Texture

Create a string attribute for texture maps

Face/Hull

Preserve Shape U/V

If clamping or closing rounded, preserves shape.

Close U/V

Closes, opens, or unrolls primitive in U direction.

Clamp U/V

Clamps NURBS endpoints to original positions.

Operation

Reverse

Reverses U for faces, U & V for hulls

Reverse U/V

Reverses U or V.

Swap

Interchanges U, V. Preserves topology.

Shift

Cycles vertices by U/V Offset.

U Offset

Amount to cycle vertices in U direction.

V Offset

Amount to cycle vertices in V direction.

Meta

Overview

These options apply only to meta-surfaces.

Meta-surface Weight

Allows meta-surface weighting.

Weight

Weight of meta-surface.

Particles

Overview

These options apply only to particle primitives. They can be used to override the options usually set by the Render POP.

Particle Render Type

Controls if the particle primitive’s render attributes should be overridden.

Particle Type

How the particles are rendered.

If you are outputting to RenderMan, use Disk for RiPoint and Line for RiCurve.

Spheres

Render particles as spheres.

Disks

Render particles as flat discs oriented toward the camera.

Lines

Render particles as lines between their previous and current positions. This is similar to how particles appear in the 3D viewport.

Tubes

Render particles as open tubes between their previous and current positions.

Capped

Render particles as capped tubes between their previous and current positions.

Rounded

Render particles as round-capped tubes between their previous and current positions.

Particle Size

Sets the size of rendered particles. To change particle size for individual particles, use the Property POP to set the particle’s scale (pscale) attribute.

Particle Blur

How long the particles will appear when rendered. For end to end connectivity, set this to 1/$FPS. To stretch particles increase this value, or to squash them decrease it.

Sphere Normals

When Particle type is “Disk”, tweak the normals so the discs appear spherical. This lets you “get away with” the lighter-weight discs while still approximating the look of spheres.

Volumes

Overview

These options only apply to volume primitives. They can adjust certain internal parameters of the volume primitives, such as the behavior when sampled outside their bounding box or their tolerance for compression.

Adjust Border

Controls if the border type will be changed.

Border Type

The behavior when the volume is sampled outside of its defined box.

Constant

The border value will be returned.

Repeat

The volume will wrap, returning values from the opposite side of the volume.

Streak

The value at the edge of the volume closest to the sample will be returned.

SDF

The volume will be treated as a signed distance field. The distance from the sample point to the closest point on the volume will be added to the value at that closest point. This ensures the volume continues to approximate distances outside of its defined box.

Border Value

When the border type is constant, this is the value returned for out of bounds sampling.

Adjust Compression

Controls if the compression tolerance will be changed.

Compression Tolerance

When tiles in the volume are compressed this will be the tolerance used for lossy compression. A value of 0 will ensure lossless compression. (Note compression to constant tiles will still occur)

Adjust Visualization

Controls if the visualization options will be changed.

Display Mode

How this volume primitive will be displayed in the viewport. This does not affect the underlying volume at all, just its display-time appearance.

Smoke

The volume is rendered as smoke. Values of 0 or less are fully transparent. If lights are present, they are self-shadowed with the volume.

Rainbow

The volume is rendered as transparent smoke. Values of 0 or less are fully transparent. Lights are ignored, reducing computation time. Instead, the smoke is colored a rainbow hue according to the position in the bounding box.

Isosurface

An isosurface of equal valued voxels is extracted from the volume and displayed. This Display Isocontour is used to determine which isosurface is extracted.

Invisible

The contents of the volume are not rendered at all.

Display Density

Controls the fall off rate for the smoke visualization. Lower values allows the smoke to be more transparent.

Display Isocontour

Which isocontour to extract from the volume. The default of 0 is good for SDF volumes. Fog style volumes would work better with something non-zero, such as 0.5.

Inputs

Primitive(s)

Geometry to process.

Template

Geometry you can use to control various modifications of the input geometry. For example, you can match the normals of the input primitives to the template geometry. You can also use a group within the input geometry as the template geometry instead of connecting a node to this input.

Local variables

PR

Primitive or profile number.

NPR

Total number of primitives or profiles.

PT

Point number of first point in primitive.

NVTX

The number of vertices in the primitive.

CEX, CEY, CEZ

Centroid of the primitive or profile.

DX, DY, DZ

Direction from the centroid to the primitive centroid.

NX, NY, NZ

Normal of the primitive.

CR, CG, CB, CA

Diffuse primitive color & Alpha for primitive.

CREASE

Crease weight for each edge of primitive

WEIGHT

Weight of meta-primitive (0 for non-meta-primitive)

Example files

PrimCenter

$HFS/houdini/help/examples/nodes/sop/primitive/PrimCenter.cmd

Load | Launch

This is an example of how to use the Primitive SOP to correctly sweep primitives on a curve.

The Sweep SOP places the origin of a primitive on a curve by default. If the primitive centroid is away from the origin, the primitive will be placed away from the curve.

In order to correctly place the primitive’s centroid on the backbone, its centroid must be at the origin. For this, the Primitive SOP is used.

PrimRotate

$HFS/houdini/help/examples/nodes/sop/primitive/PrimRotate.cmd

Load | Launch

This example demonstrates how to rotate individual primitives on a grid surface using the Primitive SOP.

A Group SOP is used to animate a bounding box over the grid surface, thereby activating the randomized rotations in the Primitive SOP.

PrimitiveColors

$HFS/houdini/help/examples/nodes/sop/primitive/PrimitiveColors.cmd

Load | Launch

This example demonstrates using the Primitive SOP to add a Color attribute to primitive geometry.

The rand() function is used in the RGB fields to generate different random colors for each primitive.

Then the prim() function is used to reference the attribute values of one SOP, to drive the attribute values of another SOP.

PrimitiveExplode

$HFS/houdini/help/examples/nodes/sop/primitive/PrimitiveExplode.cmd

Load | Launch

This file demonstrates the ability of the Primitive SOP to control the individual primitives of the object.

With expressions in the Translate Parameter, motion is created driving the primitives away from their centroid. Yet another expression presents the primitives with a randomized rotation. Another randomizing expression colorizes each of the primitives.

Together these parameter create an explosion destroying the original sphere.

PrimitiveMetaWeight

$HFS/houdini/help/examples/nodes/sop/primitive/PrimitiveMetaWeight.cmd

Load | Launch

This example demonstrates the how the Primitive SOP can be used to drive the attributes of other geometry. In this case it is used to affect the Weight Parameter of a Metaball SOP.

In addition, the parameter can be animated over time. Press Play to see the animation.

Usages in other examples

Example name Example for

Geometry compositing node

Load | Launch

Curveclay surface node

Load | Launch

Add surface node

Load | Launch

Creep surface node

Load | Launch

Attrib Promote surface node

Load | Launch

Ray surface node

Load | Launch

Particle surface node

Load | Launch

Skin surface node

Load | Launch

Skin surface node

Load | Launch

Platonic Solids surface node

Load | Launch

Clip surface node

Load | Launch

Fit surface node

Load | Launch

Match Topology surface node

Load | Launch

Copy surface node

Load | Launch

Attrib Reorient surface node

Load | Launch

Attribute surface node

Load | Launch

Fluid Force dynamics node

Load | Launch

RBD Pin Constraint dynamics node

Load | Launch

POP Solver dynamics node

Load | Launch

Gas Surface Tension dynamics node

Load | Launch

Field Force dynamics node

Load | Launch

Reference Frame Force dynamics node

Load | Launch

RBD Angular Spring Constraint dynamics node

Load | Launch

Wind Force dynamics node

Load | Launch

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

Smoke Object dynamics node

Load | Launch

RBD Auto Freeze dynamics node

Load | Launch

Anchor: Align Axis dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Fluid Object dynamics node

Load | Launch

Channel channel node

Load | Launch

Lookup channel node

Load | Launch

BlendPose channel node

Load | Launch

Collision particle node

Load | Launch

Follow particle node

Load | Launch

Mantra render node

Load | Launch

Torque render node

Load | Launch