Render Tree nodes in XSI
By Adam Sale
In this tutorial we'll use some of the stock rendertree nodes to create a wicker basket. Transparency mapping is an excellent way to preserve geometry and create extra detail in your creations At a low cost in terms of resource consumption.
We'll be using a grid node, as well as fractal, Mix2 color,incidence, scalar to color, and color correction nodes.
Drag and drop this link into a 3D viewport to open up the basket scene. Its a simple basket type object that was created as a NURBS object. I've used NURBS to take full advantage of its UV mapping capabilities.

Turn your C viewport into a rendertree, and your A viewport into a property editor.
With your basket selected (not the ribs), update the rendertree and apply a Phong Material. For the moment, don't worry about defining colors from within the phong property editor.
We'll be adding nodes to the various inputs of the phong material node. These new nodes will in turn drive the colors and texture of the basket.

The Grid Node
From the nodes pulldown menu in the rendertree, select a grid node. Connect its output to the transparency input on the phong node Draw a render region (Q) around your basket in viewport B to see the results. The image that shows doesn't look too promising.




Specular Highlights
The specular is annoyingly bright, so lets turn its intensity down by adjusting the RGB values of the phong slider to a color closer to black. We can also spread out the highlight by adjusting the decay slider to a low number like 15.
The basket is starting to look a lot better. Lets now work at defining the color of the wicker fibres.

Fractal Node
From the rendertree pulldown nodes select a fractal fractal texture node, and connect it to the diffuse node of the phong shader.
In the fractal property editor be sure to define a texture space for the fractal. I simply reused the UV space I created for the grid node In the fractal tab of the fractal node, give the two colors a wicker like color. I chose more earthy colors for my settings. In the advanced tab, set the repeats to around 4 and 4 in the U and V directions

Incidence Node and hook ups
The edges of the basket look a little thin, it seems as though the wicker could use a bit of thickness around the sides of the basket. The incidence node will serve an admirable purpose here. In most examples you''l see it used to create a more realistic glass shader by shading areas of an object where the normals are at a user specified degree from that of the camera lens. In the case of glass, perhaps normals at angles of between 80 and 100 degrees in relation to the camera will be shaded darker than the rest of the object reulting in the thickness at the edges that create the look we're after. With our basket, we'll use the incidence node to thicken the edges.
In the render tree window under nodes>illumination select the incidence node. Its output is scalar (green) and won't readily plug into the transparency node of the phong shader, so we'll need to convert the incidence node into a color node so that the transparency input can read the information. Under nodes>conversion, select the scalar to color node.
We'll control the effect using a color correct node. You can bring it into your render tree window by opening up node>image processing>color correction.
You should now have four nodes in your render tree that will need hooking up. Connect the output of the incidence node into the input of the scalar to color node. Then connect the output of the scalar to color node into the input of the color correction node. Connect the output of the color correction node into the color 1 input of the mix2color node.

Putting it all together
Since we'll need to use the transparency node of the phong shader for the incidence effect, unplug the grid node from the transparency input, and instead plug it into the base color of the mix2color node. Connect the output of the mix2color node into the input of the phong shader transparency node. To drive the weight of the mix2color node plug the output of the grid node into the input of the mix2color weight node
To adjust the thickness of the incidence effect, play with the various sliders in the color correction node PPG. I upped my gamma to 1.2 to tweak my incidence value.


