Instancer

The Ultimate Houdini node reference

Visit the Node Bible

To learn more, please log in or sign up for free to explore the Node Bible.
Write your awesome label here.

Instancer

Write your awesome label here.
The Instancer LOP instances or copies USD primitives onto points.

Houdini Docs: https://www.sidefx.com/docs/houdini/nodes/lop/instancer.html

Overview:

USD supports two types of instancing: instanceable primitives (where multiple copies of the same branch are aliases to shared storage) and point instancing (where USD stores points and prototypes to copy onto the points, but only draws the copies at render time)

This node can do both types of instancing: it can create a point instancer, or it can place instanceable prims based on the locations of points. (It can also reference in real separate copies instead of instanceable prims.)

The thing or things you want to create multiples of are called the prototypes. This node assumes the prototypes already exist, connected to the first or second input.
The points you want to instance/copy onto are called the targets. The targets can be points or prim positions in the input scene graph tree, or you can generate them in the SOP subnet inside this node, or in a SOP node elsewhere in the node hierarchy.

Drag to resize

General Parameters:

Primitive Path: The scene graph path at which to create the point instancer prim:

Primitive Kind:  Sets the primitive kind (E.g Assembly, Group, Component …) If the prim at Primitive path doesn’t exist, this node creates it
https://www.sidefx.com/docs/houdini/solaris/usd

Method:
https://www.sidefx.com/docs/houdini/solaris/usd.html#instancing

    --  Point Instancer: 

This is a single prim (with the prototypes as children) that draws the instanced geometry on-demand in the viewer or renderer. Fast but less flexibility. Point cloud is stored as an array of data on the point instancer prim.
    --  Instanceable Reference:  

Creates an instanceable prim at each point. These are separate prims in the scene graph tree, and can individual overrides on each top-level prim, but they share a “shadow” copy of their descendant prims, so their descendants are not editable or individually override-able. The Blue text in the Scene Graph illustrates that these are instance prims. Each Prim stores its relative position and attributes.
    --  Reference:

Creates a separate prim at each point that references in the “prototype” prim(s). These references take up more storage space than instanceable prims, but you can edit/override the descendant prims. The prims are now orange indicating there is a payload.
    --  Instanceable Inherit:

Just like “Instanceable Reference” except the instance primitives inherit from the source primitive rather than reference it.
    --  Inherit:

Just like “Reference” except the instance primitives inherit from the source primitive rather than reference it.
    --  Instanceable Specialize:

Just like “Instanceable Reference” except the instance primitives specialize from the source primitive rather than reference it.
    --  Specialize:

Just like “Reference” except the instance primitives specialize from the source primitive rather than reference it.

    --  Set Extents:

Compute the extents (bounding box) of the instanced geometry and store this on the instancer prim. Only for Point Instancer Mode.
----------------
Target Points:

----------------


Location Source:  Where to get the points to copy onto:

    --  Internal SOP
Build a SOP network in the subnet inside this node to generate the points.

    --  External SOP
Get the points from the output of a SOP elsewhere in the Houdini node hierarchy.

    --  First input’s primitives
Use the positions of primitives in the first input as the target points.

    --  First input’s points
Get the points from a geometry prim, or the positions from another point instancer in the first input.

SOP Path: When Location source is “External SOP”, the node path of the SOP node that generates the target points.

Point Group: When Location source is “Internal SOP” or “External SOP”, get the points from this named group in the SOP geometry.

Location Primitives: When Location source is “First input’s primitives”, this is the scene graph paths of the primitives whose positions you want to use as target points. 

Prune Mode: You can delete or hide a certain percentage of the target points. 

Prune Amount: When Prune mode is “Delete” or “Set visibility”, the percentage of points to delete or hide. This can be used to improve performance while setting up the operator.

Prune Amount = 0

Prune Amount = 0.85

Set Orientation: Rotate the instanced primitives based on standard instancing SOP attributes on the points. These SOP attributes include N, up , and orient.

Set Scale:
Scale the instanced primitives based on standard instancing SOP attributes on the points. These SOP attributes include scale and pscale.


Make Transform Source Primitives Invisible:
Set the visibility of the Location primitives to “hidden” in the output. The default is on.

Point Attributes to Copy:
A list of attributes on the template points to copy to instances. When creating a Point Instancer, an array primvar will be created for each listed attribute, with an entry for each point’s value. When creating reference primitives, an attribute of the same name and type will be created on each primitive.


-------------------------------------------------------------------------------------------------------------------
Primitive Naming
(Only Visible on Reference or Instanceable references)
-------------------------------------------------------------------------------------------------------------------

Instance Base Name: A prefix string for the names of prims created by this node. The node appends the point index to this string to create each name. This name is then appended to the Primitive path value to create the reference prim path. This is ignored if Use path attribute is on (below) and the path attribute exists.

Use Path Attribute: Use a string attribute on the target points to create the reference prim path.

Make Primitive Paths Unique: When Use path attribute is on, if a path attribute is not unique append an identifier to ensure uniqueness.

Path Attribute: When Use path attribute is on, the name of a string attribute on each point containing the path to use for the prim created at that point. 

-------------------
Prototypes
-------------------

Prototype Source: Whether the prim(s) you want to reference/instance onto the points is/are in the first input or the second input.

Prototype Reference Type: If Prototype source is “First input”, this parameter controls the composition type to use when creating references to the source primitives from within the “Prototypes” folder in the scene graph. This parameter can be “Reference”, “Inherit”, or “Specialize”

Make Prototype Source Primitives Invisible: If Prototype source is “First input” and this is on, the node sets the visibility of the prims used as primitives to “hidden” in the output. The default is on.

Use Entire Stage as Prototype: If Prototype source is “Second input” and this is on, the node copies everything from the second input’s scene graph tree under a new prim and uses that as the prototype. 

Only Copy Specified Prototype Prims: This option allows the Prototype Primitives pattern to consist of a hard coded list of paths, where prims may not exist at all of the specified source locations. 

Prototype Parent Kind: When Use entire stage is on, this sets the kind of the prim the node creates as a parent for root prims from the second input. The default is None.

Prototype Primitives: The scene graph path(s) of the primitive(s) you want to use as prototype(s). You can use pattern syntax to select multiple primitives.

Prototype Index:

    --  Random: Choose the prototype at each point randomly.
    
    --  Index: Specify a single prototype to use at each point in a parameter. This lets you drive the parameter using an expression (for example, based on a context option).

    --  Index Attribute: Use the value of an integer attribute on the target point as an index into the list of prototypes.

Example of Using a Prototype Index with Vex:

    --  Name Attribute:  Use the value of a string attribute to select the prototype by name. (The name of each prototype is copied from the original prim used to create the prototype. The node may add numbers to the prototype names to make them unique.)

Example of Using a Prototype Name with Vex:

    --  Path Attribute: Use the value of a string attribute to select the prototype by path.

Example of Using a Prototype Path with Vex:

   Seed: When Prototype index is “Random”, the seed for the random number generator