Texturing with Alpha channels in Softimage XSI v6 using the TLE

© 08-2007 Rob Wuijster



A long, long time ago I wrote one, two, three basic tutorials for XSI 3.0 regarding simple use of the Rendertree nodes and using alphachannels or B/W textures to "cut out" part of the texture for blending purposes.

With the addition of the Texture Layer Editor or "TLE" in the Foundation versions too, things were made easier regarding texturing for all XSI users. I finally had some time on my hands to update this little set of tutorials to version 6, although version 5 will be no different.

As some parts of the tutorials can be compressed into just one step, all TLE solutions for the three tutorials are now compressed into one page :-)


1. The beginning, one texture with alpha
2. Adding another texture with alpha
3. Using a B/W image for blending two textures
4. Using a bumpmap in the shader node


1. The beginning, adding a texture with an embedded alpha channel:

Let's start with the first, most basic way to get an alpha channel to work. Assuming you -DID- apply an alpha channel to your image (e.g. *.PSD, TGA), we can start up XSI.


Create an simple grid "Get>Primitive>Polygon Mesh>Grid" or a sphere "Get>Primitive>Surface>Sphere", it doesn't really matter in this case. Assign a material with "Get>Material>Phong" (set it to some wacky color to see the result a little better) and assign a appropriate texture projection with "Get>Property>Texture Projection>XZ" or "Get>Property>Texture Projection>Spherical".

Note:
Because there's only one Projection available, XSI will automatically assign this to the texture. If there would be more than one Projection, XSI would pick the first one on the list.

Switch the cameraview to a "Shaded" viewport, we now have a nice gray colored object. Time to slap on a texture.

Note:
You can see the alpha channel on your texture if you switch the cameraview from "Textured mode" to "Textured Decal mode". In both cases you only see the last/latest texture you applied to the object.

We have a couple of choices here with the TLE in mind:


-
We can assign a texture with "Get>Texture" and adjust it in the rendertree later by adding a layer on the Phong shader and connecting the layer to the ambient and diffuse slots.
-We can open up the "TLE" right away and start from there, that's what we do today.

So open the TLE with "View>Rendering/Texturing>Texture Layer Editor", or by pressing "Shift+7" or by changing one of the viewports to the TLE.

In the "TLE" only the base layer is visible with the ambient and diffuse colors shown. Add a new layer with "Edit>Add layer" or by using the "icon button" The layer now shows one color slot and one matte slot, a blending slider, and the two base color slots. Rightclick the color slot and select your texture as a clip or add one with the "Add new from file" command.

The blending will come in at a default of 0.5. Just change this to 1.0 and your texture will be fully opaque, except for the alpha channel in the image, that is now showing the color of the Phong shader.

Open the rendertree and look what your rendertree looks like. If you don't see anything, be sure the object is still selected and click the update button. Your rendertree and render should look something like this:


The other convenient thing of the TLE is that with the dropdown menu of the color slot,you can easily ignore or invert the alpha or multiply the result without going into the Rendertree and add all kinds of nodes.


2. Adding another texture with an embedded alpha channel:

Add another layer and rightclick the color slot to select a new texture. Change the blending again to 1.0 and your texture will be fully opaque, except for the alpha channel in the image, which will show the underlying texture and color.

Open the rendertree and look what your rendertree looks like. If you don't see anything, be sure the object is still selected and click the update button. Your rendertree and render should look something like this:
.



3. Using a B/W image for blending two textures:


If your texture doesn't come with an alphachannel, e.g. a jpeg file, you can use a B/W image to mask out your texture. Replace the texture in the second layer with a texture without an alpha channel. Right click the Mask slot and choose a B/W image to work with. Also select the "Use Mask Connection" option to be able to use the texture as a mask. As you can see there's a lot of other options to play with as well. Change the blending again to something you like or want to achieve.




4. Using a bumpmap in the shader node:

As all layering of textures you can also add a bump map to your shader node. With only two ports visible we have to add the bump slot into the TLE. Just rightclick in the gray "ambient(c)" or "diffuse(c)" fields (the column will flash pink) and select the bump slot to add to the TLE. As you can see the ambient and diffuse slots are already selected.

A new column will show up next to the diffuse(c) column, with a squared "?" in the Base colors row. Right click this square, and select "More..." to browse to the Bump folder and select the Bumpmap generator node. This will add a Generator node into the Rendertree and connect it into the "Illumination/bump" slot.
(Also the "?" icon will be removed from the Base colors row now.).
Open the bumpmap generator node and select a texture to use for your bump, I used the mask texture for bump too in this example.




So that's it for the basics. With the power of the Rendertree still there, some task became a lot simpler with the TLE. I hope it will help the people out there just starting off with XSI, as the Rendertree can be a bit overwhelming at first or confusing if you come from another 3D app.


If you have any comments, questions or things worth mentioning on this, just contact me at XSIBase.com ;-)