Skip to content
On this page

Simplygon Shading Networks

Shading networks are a fundamental part of Simplygon's material pipeline and are used to describe Simplygon materials in a hierarchial node-based manner. Most shading nodes supported by the Simplygon API are supported by the plug-in and the input for the nodes matches the ones in the API.

Most standard materials in Maya gets automatically translated to and from Simplygon materials during export and import, but there are some cases where user input is required. DirectX, CGFX and Stingray materials with custom (HLSL) shaders do not follow any template / naming schema that we can use to automatically map material properties, for these material types shading network templates have to be setup manually.

Fundamentals

A material in Simplygon can have several material channels, for example ambientColor, color, specularColor and normalCamera which can be found in standard materials in Maya, or Ambient, Diffuse, Specular and Normals which will be used in HLSL examples later on. There are also possibility to add custom channels, if needed. Each of these material channels has its own shading network which is Simplygon’s way of describing a material.

Shading networks are responsible for the visual representation of a material, as well as a description of what will be baked during processing. A shading network starts with one node, an exit node which can be of any (shading) node type, for example a texture-, add- or multiply node.

Supported shading nodes

Maya NameAPI NameNo of InputsDescription
TextureNodespShadingTextureNode0Points at a texture
ColorNodespShadingColorNode1RGBA color
AddNodespShadingAddNode2Adds two input nodes together
SubtractNodespShadingSubtractNode2Subtracts input 1 from input 0
MultiplyNodespShadingMultiplyNode2Multiplies input 1 with input 0
DivideNodespShadingDivideNode2Divides input 0 with input 1
InterpolateNodespShadingInterpolateNode3Interpolates input 0 and 1 based on 2
ClampNodespShadingClampNode3Clamps input 0 based on 1 and 2
SwizzlingNodespShadingSwizzlingNode4Swizzles the channels
VertexColorNodespShadingVertexColorNode0Points at a vertex color set
LayeredBlendNodespShadingLayeredBlendNode (internal)unlimitedBlends textures together from start to end, based on blend mode
PowNodespShadingPowNode2The power (input 1) of input 0
StepNodespShadingStepNode2Steps up/down the values from input 0 based on input 1
Normalize3NodespShadingNormalize3Node1Normalizes input 0
SqrtNodespShadingSqrtNode1Sqrt of input 0
Dot3NodespShadingDot3Node2Dot of input 0 and input 1
Cross3NodespShadingCross3Node2Cross of input 0 and input 1
CosNodespShadingCosNode1Cos of input 0
SinNodespShadingSinNode1Sin of input 0
MaxNodespShadingMaxNode2Max of input 0 and input 1
MinNodespShadingMinNode2Min of input 0 and input 1
EqualNodespShadingEqualNode21.0f if value in input 0 equals the value in input 1, otherwise 0.0f
NotEqualNodespShadingNotEqualNode21.0f if value in input 0 does not equal the value in input 1, otherwise 0.0f
GreaterThanNodespShadingGreaterThanNode21.0f if value in input 0 is greater than the value in input 1, otherwise 0.0f
LessThanNodespShadingLessThanNode21.0f if value in input 0 is smaller than the value in input 1, otherwise 0.0f
GeometryFieldNodespShadingGeometryFieldNode0Returns field data from geometry based on specified field type, name (or index)

Next steps

Get to know how to work with Shading Networks: