On this page |
Overview ¶
Most of the time, when you're creating copies and instances, such as a forest of trees or a crowd of soldiers, you want variations between the copies/instances (unless you're building an army of clones). There are several ways to do this in Houdini.
Point attributes ¶
Attributes are pieces of data attached to primitives (e.g. polygons) or points. When you copy or instance geometry onto points, Houdini looks for specific attributes on the destination points to customize each copy/instance.
See point attributes related to copying and instancing for more information.
Copy to Points in a loop ¶
When you're copying geometry onto points, you can vary the geometry per-copy by using Copy to Points inside a For-Each loop.
instancepoint
function
¶
When you're instancing objects, you can use the instancepoint expression function to vary object parameters (such as transforms) per instance. It returns the point number of the point the object is being instanced onto.
Because instancing only works at the object level, instancepoint is only valid in parameter expressions on objects. See instancing.
Delayed load shader ¶
The delayed load shader replaces an object’s geometry with geometry loaded from disk at render time. You can create multiple geometry archives representing different instance variations, and switch between them per-instance by overriding the material parameter that specifies which geometry archive to load.
Displacement shader ¶
Since you can vary parameters on the object’s material (or switch materials completely) per instance, you can vary the displacement shader. With clever displacement maps you can use this to do limited “modeling” of the instances to vary their geometry.
For example, you could instance flat squares, and use various displacement maps to extrude them into different shapes, such as a cityscape of buildings.
See also |