Grupos de Nodos

../../../_images/interface_controls_nodes_groups_example.png

Ejemplo de un grupo de nodos.

Grouping nodes can simplify a node tree by allowing instancing and hiding parts of the tree.

Conceptualmente, agrupar nodos permite especificar un conjunto de nodos que pueden tratarse como si fuesen «un solo nodo». Los grupos de nodos son similares a funciones en programación; pueden ser reutilizados en varios lugares del un árbol de nodos, y pueden personalizarse cambiando los «parámetros» del grupo de nodos.

Como ejemplo, consideremos un material que se debe utilizar con varias entradas, como por ejemplo su color difuso (p.e. plástico rojo o plástico verde). Se pueden crear distintos materiales mediante Make Single User (Hacer Usuario Único) para cada color distinto, con una copia de la parte del árbol que describe el material plástico. Si se desea editar el material, se debería realizar la edición en todos los materiales. Un mejor método de reutilización se consigue creando grupos de nodos, exponiendo solo las variables de entrada (p.e. color difuso).

También están soportados los grupos de nodos anidados. Es decir, un grupo de nodos puede ser insertado o creado dentro de otro grupo de nodos.

Nota

Los grupos de nodos recursivos están prohibidos en todos los sistemas actuales de nodos, para prevenir recursión infinita. Un grupo de nodos no puede contenerse a sí mismo (o a otro grupo que lo contenga).

Interfaz

When a node group is created, new Group Input and Group Output nodes are generated to represent the data flow into and out of the group. Furthermore connections to input sockets coming from unselected nodes will become attached to new sockets on the Group Input node. Similarly, outgoing connections to input sockets of unselected nodes will become attached to the new Group Output node.

If you want to pass an additional parameter into the group, an socket must be added to the Group Input node. Therefore drag a connection from the hollow socket on the right side of the Group Input node to the desired input socket on the node requiring an input. The process is similar for the Group Output regarding data you want to be made available outside the group.

Panel

Referencia

Modo

Todos los Modos

Panel

Sidebar ‣ Node ‣ Interface

../../../_images/interface_controls_nodes_groups_interface-panel.png

El panel Interface para editar grupos.

Los conectores pueden añadirse, reordenarse, o eliminarse; se pueden añadir nombres descriptivos y definirse los detalles de los datos de entrada aquí.

If you have multiple inputs or outputs, they can be re-ordered by selecting the socket in the list. and then moving them up or down with the arrow buttons on the right side of the panel. The plus button will add an unconnected socket of the same type as the selected socket or a value socket if there is no selection. The minus button will remove the selected socket. The triangle at the bottom of the list has filtering functions to help finding nodes if the group has a large number of sockets.

Name

The name of the socket to display in the node’s interface.

Default

The value to use when nothing is connected to the node socket. Note, this will not affect the current node but will affect instances of the node.

Min, Max

The minimum and maximum value for the UI button shown in the node interface. Note, this is not a minimum or maximum for the data that can pass through the node. If a socket passes a higher value than the maximum it will still pass into the node unchanged.

Hide Value

Hide the socket value even when the socket is not connected.

Edición del Grupo

Referencia

Modo

Todos los Modos

Menú

Node ‣ Edit Group

Encabezado

Go to Parent Node Tree (Ir al Árbol de Nodos Padre)

Atajo

Tab, Ctrl-Tab

Con un grupo de nodos seleccionado, Tab expande el nodo en un marco y se muestran los nodos individuales interiores. Se pueden mover, jugar con sus controles individuales, reconectarlos internamente, etc., como si fuesen una parte normal de la vista del editor. No se podrán, sin embargo, conectar a un nodo de fuera del grupo; se deben usar los conectores externos en el lado del grupo de nodos. Mientras Tab se puede utilizar tanto para entrar como para salir del grupo, Ctrl-Tab solo sale.

../../../_images/render_cycles_optimizations_reducing-noise_glass-group.png

Ejemplo de grupo de nodos expandido.

Make Group (Hacer Grupo)

Referencia

Modo

Todos los Modos

Menú

Node ‣ Make Group

Atajo

Ctrl-G

To create a node group, select the nodes you want to include, then press Ctrl-G, Group ‣ Make Group. A node group will have a green title bar. All selected nodes will now be contained within the node group. Default naming for the node group is «NodeGroup», «NodeGroup.001» etc. There is a name field in the node group you can click into to change the name of the group. Change the name of the node group to something meaningful. When appending node groups from one blend-file to another, Blender does not make a distinction between material node groups or composite node groups. So it is recommended to use some naming convention that will allow you to distinguish between the two types.

Truco

Qué no incluir en grupos de nodos:

Remember that the essential idea is that a group should be an reusable, self-contained software component. Material node groups should not include:

Nodos de entrada (Input)

Si se incluye un nodo fuente en el grupo, se acabará teniendo el nodo fuente apareciendo dos veces: una vez dentro del grupo, y una vez fuera del grupo, en el árbol de nodos del nuevo material.

Nodo de Salida (Output)

Si se incluye un nodo de salida en el grupo, ¡no habrá conector de salida disponible en el grupo!

Ungroup (Desagrupar)

Referencia

Modo

Todos los Modos

Menú

Node ‣ Ungroup

Atajo

Ctrl-Alt-G

The Ctrl-Alt-G tool removes the group and places the individual nodes into your editor workspace. No internal connections are lost, and now you can link internal nodes to other nodes in your workspace.

Separate (Separar) P

Separa los nodos seleccionados del grupo de nodos.

Copy (Copiar)

Copia al árbol de nodos padre, manteniendo el grupo intacto.

Move (Mover)

Mueve al árbol de nodos padre, quitándolo del grupo.

Group Insert (Insertar Grupo)

Referencia

Modo

Todos los Modos

Menú

Node ‣ Group Insert

Seleccionar un conjunto de nodos, finalizando por el nodo de grupo de destino, y presionar Node ‣ Group Insert moverá esos nodos dentro de ese grupo. Los nodos movidos se agrupan en un grupo propio para preservar su contexto de conexiones, teniendo sus propios nodos de entrada y salida del grupo. Los nodos de entrada y salida existentes del grupo se actualizan con nuevos conectores, si hay alguno, de los nodos nuevos. El grupo de nodos debe editarse para que contenga un solo nodo Group Input y un solo nodo Group Output.

Añadir Grupos de Nodos

Referencia

Editor

Topbar (Barra Superior)

Modo

Todos los Modos

Menú

File ‣ Link/Append

Una vez se ha añadido un Árbol de Nodos al archivo blend, se puede utilizar en el editor de nodos presionando Shift-A, Add ‣ Group, luego seleccionando el grupo añadido. El «panel de control» del Grupo incluye los controles individuales para los nodos agrupados. Se pueden cambiar trabajando con el nodo Group como cualquier otro nodo.