Agregats de nodes

Un agregat és un contenidor que agrupa múltiples valors en un sol born. Això permet passar molts valors a través d’un únic enllaç, similar a un struct en programació.

Els agregats redueixen el nombre d’entrades i sortides exposades en un grup de nodes i poden contenir tipus de dades mixtos com ara geometria, camps, valors, objectes o fins i tot agregats aniuats.

../../../../_images/interface-nodes-bundle-example.png

Un cub i un cilindre combinats en un agregat i després separats de nou.

Nodes

Per treballar amb agregats, es faciliten els nodes que segueixen:

Bundle nodes allow adding or removing an arbitrary number of sockets, with flexible type support.

Bundles can be attached to geometry using get/set geometry bundle nodes. These can be used to pass bundled data between modifiers and objects.

Typed Bundles

A typed bundle is a bundle that contains a special Type item identifying its purpose. The type is stored as a string and allows node groups to recognize bundles without relying on their internal structure.

Using types makes bundles easier to exchange between node groups and different Geometry Nodes modifiers, since a node group can search for a specific type rather than assuming a particular bundle layout.

Bundles can also contain other bundles, allowing complex data to be organized hierarchically.

Creating Typed Bundles

The Add Typed Bundle operator creates a typed bundle by constructing a bundle containing the required Type item.

Important

The string item named Type is reserved for identifying typed bundles. It should not be used for any other purpose within a bundle.

Searching Typed Bundles

The Get Nested Bundle Paths node searches a bundle hierarchy for bundles with a matching type.

This allows node groups to locate typed bundles even when they are nested inside other bundles.

For example, a geometry may contain multiple bundles describing different components. A node group can search for all bundles of a particular type without requiring them to exist at a fixed location.

Operativa

Els agregats són pràctics per a moltes procedimentacions:

  • Interfícies simplificades – agrupa les entrades en un únic born i es veu més clar.

  • Simulacions de física – empaqueta totes les entitats i restriccions de cara a un resolutor.

  • Sistemes declaratius – emmagatzema dades estructurades complexes per a avaluar-les més endavant.

  • Conjunts de textures – combina els mapes PBR (Color base, Rugositat, Normals) en un sol born.

Sincronització de borns

Els Agregats fan servir els noms de born sòcol per a connectar-ne les entrades i sortides. Si dos nodes d’un agregat estan connectats, però tenen signatures que no conlliguen, Blender pot oferir de sincronitzar-los automàticament.

  • La sincronització es produeix automàticament en connectar un node per primera vegada.

  • Els borns existents mai no s’actualitzen automàticament per així evitar de sobreescriure de dades.

  • El botó (Sincronitzar borns) apareix en el capçal node quan es detecta algun desajustament per fer possible una sincronització manual.