Inštancie

../../_images/modeling_geometry-nodes_instances.png

Tri typy inštancií.

In addition to storing real data like a mesh or a curve, a geometry can store instances, which themselves can reference more geometry, or an object, or a collection. The purpose of instancing is to allow including much more geometry in the result, without duplicating the actual data. This is because renderer like Cycles can handle the same geometry data in many different locations better than when the data is duplicated.

Each instance keeps track of which geometry it corresponds to, and a Transform. Instances can also store the id attribute, used for correct motion blur when instances move in an animation.

The main node used to create instances in geometry nodes is the Uzol Inštancia na body.

Varovanie

V súčasnosti nie je možné miešať vytváranie inštancií z geometrických uzlov s vytváraním inštancií z panela Vytvorenie inštancie v editore vlastností.

Vložené inštancie

Since instances can store a geometry, and a geometry can contain instances, nested instancing is possible. In other words, it is possible to instance an instance, or even a collection of instances. By default, the Uzol Inštancia na body will create nested instances by instancing on the points real geometry and instanced geometry.

../../_images/modeling_geometry-nodes_instances-nested.png

Skupina uzlov, ktorá vytvára vnorené inštancie reťazením uzlov Inštancie na body.

Here, nested instancing is used to distribute geometry that contains both a mesh and instances. The output geometry contains a „real“ mesh, and a group of instances. Each instance contains a sphere mesh and many instances of a cone geometry.

../../_images/modeling_geometry-nodes_instances-nested-tree.png

Strom inštančnej geometrie pre vyššie uvedený príklad.

What makes this method helpful is that the output geometry only contains three unique meshes: the plane, the sphere, and the cone. This would make the performance much better if the meshes were more complicated.

Varovanie

Only eight levels of nested instancing are supported for rendering and the viewport currently. Though deeper trees of instances can be made inside geometry nodes, they must be realized at the end of the node tree.

Spracovanie inštancie

Almost all nodes that process geometry do so by processing each unique geometry in their input’s tree of instances separately. For example, if a Uzol Deliť povrch was placed at the end of the example above, it would only have to subdivide three meshes, rather than each instance of a mesh. Another important example is processing with the output of the Uzol Reťazec na krivky, where each unique character only has to be processed once.

Táto metóda môže výrazne zlepšiť výkon, ale znamená to, že výsledok operácie bude rovnaký pre každú inštanciu určitej geometrie. Na získanie jedinečných výsledkov pre každú inštanciu možno použiť uzol Realizácia inštancií.