YETI TUTORIALS

Global Variables

Global Variables are variables that are already created automatically by the top node of the Yeti and can be accessed at any time within the graph without having to declare them with an Attribute node. They relate to internal geometry values ​​such as N (Normal) and P (Position); Internal values ​​of the fibers, such as id (indicates a single integer value for each fiber) and strandu (maps the current position along the length of each fiber, being 0 the root and 1 the tip); And internal Maya values, such as F (current frame) and time (current time in seconds).

 
Custom Global Variables

You can create Custom Global Variables on the top node of Yeti, which will behave in the same way as existing ones. In the Graph -> User Variables tab of the top node of Yeti, click Add Float or Add Vector to create them. Its value can only be changed externally, both being passed as a direct numerical value or connected to some parameter of Maya or its objects.

Two formats are supported for global variables: Floats and Vectors.
You can create infinite attributes, but attribute lists and strings are not supported.

Important: When creating Global attributes, do not use spaces, periods, _ or any other character other than number or letter, as it will not recognize correctly. The name is case sensitive.

To delete attributes, click Select to select the node shape, then Attributes -> delete attributes.

Global variables are mainly used for:
-To promote attributes of the graph of the Yeti to the superior node, in order to facilitate changes of the internal graph without having to access it;
-Use as a blend shape of internal hairstyle;
-As a link between the Rigging and the graph, allowing animations in the wires and feathers

Using Global Variables as Internal Attributes

In this example, a value is passed through a Custom Global Variable called "myAtt" that will be used inside an internal node of the graph to control a bend parameter. This attribute can be used in any field of any yeti node.

Example File: Global_Attribute.ma

Download at https://www.dropbox.com/s/fxe61vk8zciw21d/Global_Attribute.ma?dl=0

Creating Blend Shapes of Hairstyles

To create a "blendshape" of hairstyle, you should:
First, duplicate the Original Groom (Ctrl-D normal).
Then, reconnect the Groom in the mesh. To do this, go to Display -> Shapes to show the shapes in Outline; Go to Windows-> General Editors-> Connection Editor; Select the mesh shape and click Reload Left; Select the shape of the Blend Groom and click on Reload Right; Select the "outmesh" on the left side and the "inputGeometry" on the right side and click Close. You can now edit this duplicate Groom and comb it in the blend format.

Now, connect the new Groom to the Yeti Node Input Grooms if it is not already connected.
Create a global variable that will be used as a slider to animate the blend.
Finally, add a new Comb node to the Groom graph and assign the global variable to the weight field.

Example File: Blendshape_Groom.ma

Download at https://www.dropbox.com/s/dbhcmccfyq6sk70/Blendshape_Groom.ma?dl=0

It is possible to determine areas of influence for the blend of the hairstyle. Create a new attribute in Groom and paint the value of one where the blend should take effect. Where it is not to take effect, paint with zero. Then multiply this Groom attribute by the global variable.

Example File: Blendshape_Groom_weights.ma

Download at https://www.dropbox.com/s/zpnbpez8zc3w5ab/Blendshape_Groom_weights.ma?dl=0

Connecting Global Variables to Expressions

We can also use expressions to bind a global variable to a Rigging controller. Within the Yeti graph, the global variable will be used in the same way as in the previous cases. However, an expression will be added to it to receive some value. In this example, the position of a Locator will be passed.


To do this, right click on the field of the created variable and choose "Edit Expression". The Expression Editor describes the command that will be sent to the variable. In this case, we are taking the Z translation value from Locator 1 and pointing to the “bendcontrol” variable.
The expression structure is: “nameOfNodeYetiShape.yetiVariableF_DataVariavelGlobalName” = Float of some object or parameter
“nameOfNodeYetiShape.yetiVariableV_DataVariableNameGlobalX” = X coordinate of a vector of some object or parameter (similar to Y and Z)

Example File: Expression_Global_Attributes.ma

Download at https://www.dropbox.com/s/a01v4je3ehyeb1a/Expression_Global_Attributes.ma?dl=0