Wednesday, April 6, 2016

Sharing nodes in a team

When working in a larger group or company it can be useful to share nodes.
Not just share them, but also be able to share updates to shader networks more easily.

For example technical artists or programmers may want to make a set of shading nodes that artists can use that match with their game engine.

ShaderFX has this build into its group-nodes.

Here is an example of how to create your own custom shader nodes for your company and share them over the network with your team members.

With Maya closed, you can add a user variable to your system variables:

SHADERFX_CUSTOMGROUPPATH\\autodesk.com/game_title_group_nodes/

With this set, the next time you start up Maya, it will now pull its custom group nodes from this network folder.

(Note that I believe we added this system environment variable somewhere in 2016, but I cannot remember what extension)

Now lets build a set of custom nodes.
We will use the Custom Code node, since it allows technical artists and programmers to enter their own code more quickly instead of using lots of complicated shader graphs.

Enable "Advanced Mode" in shaderfx.
Add a custom code node.
Customize its code by selecting it and pressing "Edit".
(Here we just input and output a color, but please see the Maya help for more details on the Custom Code node)

Select the node and use "Create Group"

Select the left node of the group
Supply Class, Category and Sub menu name for the group.
Press Group / Save Group

This will save the node into your network path you provided for SHADERFX_CUSTOMGROUPPATH

If all went well, it will now show the new group node in the right-click menu:

Add it to the scene and connect any inputs it needs.
Save your Maya scene and close Maya.

Re-open Maya (could even open it on a team-members machine)
Create the Group node you created.
Open it and make some changes to it.

NOTE: make sure you create a valid node. If you break the node, your original Maya scene will give a shading error.

Save the edited group.
Re-open the Maya scene you saved previously.

Notice that now the scene has been updated to use your new node.
(See the new input we added and the object is now purple)