Primitive
surface node
Edits primitive, primitive attributes, and profile curves.
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:
-
Translate, rotate, and scale primitives.
-
Apply parametric affine transformations to a profile curve.
(When transforming profile curves, you can only rotate around the Z axis, since the X and Y axes are projected onto the surface and so cannot rotate off the surface. Similarly, you cannot scale along the Z axis.)
-
Make primitives open or closed.
-
Reverse the vertex order of all faces.
-
Reverse surface normals (for example, to map a texture onto the inside of a sphere).
-
Apply transforms per-primitive.
-
Set primitive attributes such as color.
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.
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
|
||||||
|
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 |
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 |
|
||||||||
|
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.
|
||||||||||||
|
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 ( |
||||||||||||
|
Particle Blur |
How long the particles will appear when rendered. For end to end connectivity, set this to |
||||||||||||
|
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.
|
||||||||
|
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.
|
||||||||
|
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
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
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
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
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
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.