On this page | |
Since | 18.5 |
Overview
You can use the primvar created by this node as a “mask” to select prims for other operations, and/or to create a collection of the prims “inside” the bounding volume.
This node is designed to work with polygonal meshes. For parametric shapes such as the USD Sphere and Cube prims, the node will just report 1.0
if the shape’s origin inside, and 0.0
if the origin is outside.
Tips and notes
-
When Ignore primitives outside bounds is on, the node does not author the primvar on selected prims outside the bounding box. This is faster than authoring
0.0
values. -
The node can create a primvar containing a fractional value between
0.0
and1.0
indicating how much of the prim was inside the bounding sphere. -
The node can also create a property (calculated the same way as a Constant primvar), and a USD collection of the prims that are “inside”.
-
You can reverse the inside/outside values with the Invert Bounds parameter.
-
You can blur the boundary between inside and outside with the Feather parameter. You can also shrink or grow the boundary without blurring using the Offset parameter.
Inputs
Input Stage
The stage that contains the primitives to be affected by this LOP node.
Stage Containing Bounding Primitives
An optional stage containing the bounding primitives. (Only works when selecting by bounding primitives/geometry.)
Parameters
Type
What type of primitives to add the primvar to.
Point Instances
Specify a list of individual instances using /path[instance_index]
syntax.
Primitives/Native Instances
Specify a list of prim paths, including instanceable prims.
Instances
A space-separated list of instances, using /path[instance_index]
syntax (for example, /geometry/instancer[0] /geometry/instancer[1]
). To select all instances in an instancer, use /path[*]
. To select a range, use /geometry/instancer[4-7]
(the range is inclusive). To select instances inside nested instancers, use multiple indexes, for example /geometry/instancer[2][7]
.
Primitives
When Type is Primitives/Native Instances, a space-separated list of prim paths/patterns to add the primvar to.
Bounding Type
Choose between a box, sphere, or use external geometry prims as the boundary.
Size
When Bounding Type is Box or Sphere, the size of the bounding volume.
Center
Moves the bounding volume.
Rotate
Rotation of the bounding volume.
Scale
When Bounding Type is Primitives, scales the bounding volume created from the external geometry.
Pivot Translate
When Bounding Type is Primitives, moves the pivot for rotating ans scaling the bounding volume created from the external geometry.
Primitive Source
When Bounding Type is Primitives, whether to get bounding primitives from the stage connected to this node’s first input or the second input.
Bounding Primitives
When Bounding Type is Primitives, a space-separated list of prim paths/patterns to use to define the bounding volume.
Feather
Creates a soft falloff between values “inside” and “outside” the bounding shape. Negative values apply the falloff inside the boundary, positive values apply falloff outside the boundary. The greater the difference from 0
, the larger the falloff radius.
When this is non-zero, primvar values on points/faces (0.0 or 1.0) are multiplied by a linear gradient from 1 to 0 between the bounds and this distance.
Offset
Shrinks (negative values) or grows (positive values) the boundary shape.
Invert Bounds
Reverses the meaning of the primvar values, so 0.0
indicates inside and 1.0
indicates outside.
Ignore Primitives Outside Bounds
When this on, the node does not author the primvar on selected prims outside the bounding box. This is faster than authoring 0.0
values.
Add Primvar
Adds a primvar indicating how much of each prim is inside the bounding volume.
Name
The name of the primvar to create.
Type
Specify the data type for the primvar. The default is float
. If you choose boolean
or a number type that does not support decimals, features such as Feather will have no effect. This should be boolean
, int
, float
, or double
. Most other types won’t work (the values will all be zero).
Interpolation
This controls the “level” at which the node creates the primvar.
Constant
Calculates one inside/outside value for the entire mesh, by combining the values for each point using the Method below.
Uniform
Sets a 1.0 or 0.0 on each face indicating whether the face is inside or outside the bounding volume.
Vertex
Sets a 1.0 or 0.0 on each point.
Face Varying
Sets a 1.0 or 0.0 on each polygon corner.
Point/face values may be between 1.0 and 0.0 if you use the Feather parameter to soften the edges of the bounding volume.
Note
In USD, Constant interpolation is equivalent to a Houdini detail attribute. Uniform interpolation is equivalent to a Houdini primitive attribute. FaceVarying interpolation is equivalent to a Houdini vertex attribute. And Vertex interpolation is (confusingly) equivalent to a Houdini point attribute.
Method
When Interpolation is Constant, this is the node combines the point values to compute an overall value for the entire mesh. The default is Average, which is the most useful method.
Maximum
Use the highest point value.
Minimum
Use the lowest point value.
Average
Use the mean (average) of all point values across the mesh.
First Match
Use the value of the first point.
Last Match
Use the value of the last point.
Centroid
Don’t use point values, instead calculate if the mesh’s centroid is inside or outside.
Value
The value to use for “inside”. The default is 1.0
.
Add Weights
Creates a property (not a primvar) on the prims, set to the same value as would be computed for a Constant primvar, using the Method below.
Weight Name
The name of the weight property to create.
Method
See above.
Add Collection
Creates a new collection containing the prims that have a non-zero “weight” attribute. This is only available when Add Weights is on.
Collection Name
The name of the collection to add the primitives to. This is always created on the /collections
prim (this node creates /collections
if it doesn’t already exist).
Import Frame
The frame to cook the LOP node. When importing animated geometry, this could be set to $FF. For static geometry, it is much more efficient to set this to a constant value such as $RFSTART.
See also |