Just for kicks: Printing out shading trees


kick -tree prints the shading network for a shader node. For example, given this:

polymesh
{
 ...
 shader "Sources.Materials.DefaultLib.Material.standard.SItoA.41000.1" 
 ...
}

standard
{
 name Sources.Materials.DefaultLib.Material.standard.SItoA.41000.1
 
}

You can print out the shader tree for the standard shader like this:

set ASS_FILE=//Projects/Support/Arnold_Scenes/example.ass
set NODE=Sources.Materials.DefaultLib.Material.standard.SItoA.41000.1
set SHADER_PATH=%SITOA_BIN%
%KICK_PATH%\kick.exe -tree %NODE%  -i %ASS_FILE% -l %SHADER_PATH%

For a [simple] shading tree that looks like this:
SimpleTree
You would get this:

standard:Sources.Materials.DefaultLib.Material.standard.SItoA.41000.1
  |
  +-Kd_color = txt2d_image_explicit:Sources.Materials.DefaultLib.Material.Image.SItoA.41000.2
  |   |
  |   +-tex = sib_image_clip:Sources.Materials.DefaultLib.Material.noIcon_pic.SItoA.41000.3
  |
  +-opacity = txt2d_image_explicit:Sources.Materials.DefaultLib.Material.Image.SItoA.41000.2
      |
      +-tex = sib_image_clip:Sources.Materials.DefaultLib.Material.noIcon_pic.SItoA.41000.3

max depth:       2
total shaders:   5
cycles detected: 0

shader counts:
  2 txt2d_image_explicit
  2 sib_image_clip
  1 standard

one-to-many connections:
  2 txt2d_image_explicit:Sources.Materials.DefaultLib.Material.Image.SItoA.41000.2
  2 sib_image_clip:Sources.Materials.DefaultLib.Material.noIcon_pic.SItoA.41000.3

Notice that txt2d_image_explicit and sib_image_clip are counted twice, because those branches are plugged into two different ports on the standard shader.

Pref coordinates and bind poses


The Noise shader can use different coordinate systems when it evaluates the noise.

  • Object space, where points are expressed relative to the local origin (center) of the object.
  • World space, where points are relative to the global origin of the scene.
  • Pref, which isn’t really a space, but rather a reference to a bind pose, which in Softimage is the top of the Modeling region. Pref is really a point in object space, but it’s a reference to the geometry at the top of the Modeling region. In constrast, if you use Object space, you’re getting point position coordinates from the very top of the whole operator stack.

Noise_Coords

The name “Pref” is easier to understand if you think of it like a variable name. So, when it comes to noise, P is a point in world space, Po is in object space, and Pref is in “reference space” aka the “bind pose”.

For the Noise shader, the advantage of using Pref is that it prevents the noise from swimming over the surface of the object as the object deforms (as long as the deforms are above the Modeling stack). As the object deforms, Po is a point on that deformed geometry, so Po is constantly changing. In contrast, Pref is a point on the geometry that came out of the Modeling stack. So the noise sticks to the “bind pose”.

Note the difference between Pref and the two other coordinate systems (World and Object).
BindPose