2009-04-10

RAT6.5 : Add SLBox in Delux - Part I

Goal :
1. Within a Delux shader, create a new property of shading component type.
2. Make it connect to a SLBox function with inline state, as "v1" in the picture shown below.

("inline" means we can deal with the SLBox function within Delux shader without actually going into the SLBox node)
This instruction is based on RenderMan Artists Tools 6.5 on Linux system. Let's select a Delux node and find the property called component container. There are at least ways for creating a new shading component property:

1. By using the following command:
 set newprop [$container NewCollection shadingcomponent "v1"]

2. By using the following commands:
 set command "::Slim::CustomUI::pixar::AddParam::AddParam"
 set newprop [$command $container shadingcomponent]



Using method 1, we need to assign a SLBox function to the property and make it be inline state:
 eval $newprop SetDetail mustvary "pixar,C_SLBox#0 inline"


Using method 2, we just need to change the function type diffuse to SLBox:
 $newprop SetDetail mustvary "pixar,C_SLBox#0"


In the end, we just need to set connection between the parameter and the SLBox node. The following shows TCL version and Python version of codes to do this:


TCL version, executed in Slim console



Python version, executed in Maya with Mtor Slim command


2 comments:

  1. Hi, it's a very great blog.
    I could tell how much efforts you've taken on it.
    Keep doing!

    回覆刪除
  2. Thank u for visiting my blog :)
    I'll keep writing those renderman stuff ~ XD

    回覆刪除