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.
Copy stamping is a technique for the Copy to Points tool (not instancing) that lets you change the parameters of the source geometry network for each copy. These gives you the power to completely change the geometry of each copy. See copying to points and copy stamping.
If changing parameters isn’t powerful enough, you can create a Python surface node, or use the VEX surface node or Script surface node. These nodes let you write a script (or create a VOP network) to edit geometry, giving you total power over it.
Material surface node and material overrides
When copying, the Material node assigns materials to primitives (e.g. polygons) or points. The Material node lets you override individual parameters on the assigned material. The Material node works by creating
material_overrideattributes on the primitives/points. If you instance objects onto the points, the instanced objects pick up the material and overrides specified in the point attributes.
Material parameter overrides are stored in the
material_overrideattribute as a Python dictionary string representation. If you need total control over how material overrides happen, you could create a Python surface node that sets the
When instancing, once you assign a material to an object being instanced, you can use the menu button on the object’s Material tab to create local parameters that override parameters on the material. You can then use instancepoint to vary the parameters.
See property overrides for more information.
By combining overriding material parameters with values using the
instancepoint() function, you can vary the material or the override values per instance.
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.
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.
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.
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.