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.
Add a
set_instance_geometrynode to the graph.Connect a points object, such as the output of a particle system, to the
pointsinput.Connect one or more geometric objects like meshes to the
instance_geometriesport. 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.
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
longproperty as theinstance_id_propertyinput. This assumes that you have used a node likeset_geo_propertyupstream to assign a property targeting thepoint_componentof the points object. The property should specify which geometry to instantiate, where 0 is the first geometry connected toinstance_geometries, 1 is the second, and so on. - Connect an array of
longto theinstance_id_valuesport, and enableoverwrite_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.
- Specify the name of a custom
If desired, connect one or more simple geometries to the
preview_geometriesport. 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 connectedgeo_instancenodes to theinstance_geometriesport 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.Output the resulting
instancesto the scene.
