|On this page|
This is a reference implementation of how to do render-time instantiation in Karma. This creates a prim with the proper attributes to instruct Karma to replace geometry points with instanced geometry at render time.
In the network editor, double-click this node to dive into the SOP subnet inside.
In the SOP subnet, build a network that creates points at positions where you want render-time geometry to appear.
You can create named point groups in the SOP geometry if you want to instantiate the same thing on multiple points.
In the network editor, press U to go back up to the LOP network.
In the Karma Procedural node’s parameters, set what to instantiate on each point (or group of points).
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.)
Create a primitive at this path in the scene graph tree. This creates an
Xform prim with attributes that tell Karma what to do at render time. The
Xform prim contains the generated point geometry as a USD
This node can create multiple render-time point replacements. Set the number of replacements, or click the plus and minus buttons to add or remove replacements.
Specify the points in the generated geometry you want to replace. This can be the name of a point group, or space-separated group syntax. For example,
0 1 2 5-7 to select points by point number.
What to replace the selected points with at render time.
Replace the points with spheres.
Replace each point with geometry loaded from a file. Karma supports loading all file formats understood by Houdini.
VDB Iso Surface
Replace each point with a VDB iso-surface loaded from a file.
When Type is “Sphere”, the radius of the sphere. If the point has
pscale SOP attributes, those values are multiplied by this. If you turn this off, the default radius is
When Type is “Sphere”, set the radius of each sphere using a VEX snippet. Write the radius into the
radius float variable. You can use the variables typically available to an Attribute Wrangle SOP. The current point number is available as
When Type is “Sphere”, set the
displayColor of each sphere. If the point has a
Cd SOP attribute, that value is multiplied by this. If you turn this off, the default color is
1.0, 1.0, 1.0.
When Type is “Sphere”, set the color of each sphere using a VEX snippet. Write the radius into the
color vector variable. You can use the variables typically available to an Attribute Wrangle SOP. The current point number is available as
When Type is “File”, the file path to the geometry file to instantiate at render time. Karma supports loading all file formats understood by Houdini.
When Type is “VDB Iso Surface”, the file path to the VDB file to instantiate at render time.