Share

Create instances with set_instance_geometry

set_instance_geometry is a high-level node for creating instances of geometry from points objects. It has built-in options for switching between several master geometries, based on either a stored long values per-point or an input array of long values.

  1. Add a set_instance_geometry node to the graph.

  2. Connect a points object, such as the output of a particle system, to the points input.

  3. Connect one or more geometric objects like meshes to the instance_geometries port. In addition to geometries, you can also connect instance shapes, such as the output of:

    • geo_instance, if you want to use different preview geometries for different instance master shapes.
    • render_archive_instance, to instantiate render archive files on disk.
    • selector_instance, for more complex switching between master geometries.
  4. Specify how to assign a geometry to each point. This can be be done in one of two ways:

    • Specify the name of a custom long property as the instance_id_property input. This assumes that you have used a node like set_geo_property upstream to assign a property targeting the point_component of the points object. The property should specify which geometry to instantiate, where 0 is the first geometry connected to instance_geometries, 1 is the second, and so on.
    • Connect an array of long to the instance_id_values port, and enable overwrite_instance_id. If the array is longer than the number of points, the extra values are ignored. If the array is shorter, the first connected geometry is used for the remaining points.
  5. If desired, connect one or more simple geometries to the preview_geometries port. These geometries act as stand-ins for previewing in the viewport. Note that some instance shapes might already have preview geometries defined, for example, if you connected geo_instance nodes to the instance_geometries port instead of connecting geometries directly. In addition, if you connect a single geometry here then it is used for previewing all instances, including those that already have their own preview geometry defined — this can be useful for simplifying the view when you are working on other things.

  6. Output the resulting instances to the scene.

Was this information helpful?