Texturing with Alpha channels in Softimage XSI 3.01

2003 Rob Wuijster a.k.a. Rork


Although using alpha channels in the texturing process is pretty straight forward most of the time, it can become confusing when you are creating more elaborate rendertrees or mixing multiple material nodes together to create more complex setups.

Due to the amount of people grasping the concepts, I figured I put my notes into a tutorial but it became quite a set. I will try to explain the concept in six small examples, starting from the most basic to more complex setups with weighting by textures.

A basic understanding of XSI is appreciated, because I will not go into depth of all options and menusettings.


1.
2.
3.
4.
4a
4b.
5.
6.
The beginning, keeping it simple
Manually Linking nodes, but what goes where?
Creating a alpha channel with an extra B/W image
Blending textures using the weight node
Blending images using the weight node, but now WITH an alpha channel in the image
Oh no..., another rendertree but the same result
Mixing shiny and matte using the weight and/or alpha channel =SOON=
Every end has a beginning, the basics about Texture Support and Projections =SOON=


1. The beginning, keeping it simple:


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" and assign a appropriate texture projection with "Get>Property>Texture Projection>XZ" or "Get>Property>Texture Projection>Spherical".

Note:
You could skip the texture projection part and do this when assiging the texture, it depends on your workflow and what feels comfortable to you.

Switch the cameraview to a "Shaded" viewport, we now have a nice gray colored object. Time to slap on a texture. Here we also have two choices, we can assign a texture with "Get>Texture" and adjust the rendertree later, or go directly to the rendertree. For the sake of the tutorial we start with the "Get>Texture" command.

In the "Image Property Page" we select a image with "Image>New>New from file" and browse to the appropiate folder. Select the image you created. The image will appear in the property page window. If you press "Ctrl+4" you can see the alpha channel contained in the image, pressing "Ctrl+5" will show the image again.

Select the texture projection you assigned earlier, or create a new one with "Texture Projection>New>Planar XZ" or "Texture Projection>New>Spherical". In the cameraview switch from "Shaded" to "Textured" mode. Your texture should show up on the object. Now draw a renderregion, the texture is rendered and the alpha showing. Simple, right??

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.

Now open the rendertree in viewport C 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 should look something like this:


What you're seeing is that XSI actually created two "Mix8color" nodes, and renamed them to "ambient_blend" and "diffuse_blend". The texture has been plugged into the color1 "slot". Selec both nodes (so we can adjust the corresponding values at the same time) and press "Enter". The Property page will open:



When you see the question mark icons, it means that the corresponding values are different on both nodes, changing the color values here will change correct this. The base color "replaces" the diffuse and ambient colors of the Phong node. You can change the base color to something corresponding to the object/effect you're looking for.
The "weight value will tell XSI how to blend the texture with the basecolor, changing the weight value will determine the way how much the new texture will blend with the underlying texture.

0,0,0 will be totally transparant and will mean the same as turning off the "In use" option of the layer. The texture will not show up in the rendering, just showing the set base color.

1,1,1 will mean totally opaque, the texture will completely "replace" the basecolor, but the alphachannel will show the basecolor. The '"Mode" is set to Mix, and multiply weight by alpha is turned on. If you turn this off it will remove the alpha channel and only show the applied texture.

You can also change the blend mode to get a more interesting effect. These blending modes work a lot like in Photoshop, so most results will be very similar.

Adding a new (or more) texture(s) would be as simple as "Modify>Texture>Add>Image". Just browse for your second image, select the correct texture projection and you're done. In the rendertree this second texture will show up under the color 2 "slot".

My opinion about the "Modify>Texture>Add>Image" option that it is in the wrong place, it would be more logical to move it right under the "Get>Image" menu option as "Get>Image>Add Image", but who am I in this case? It's confusing in the beginning though.......



Be aware that you cannot adjust your separate Phong color values after assigning the textures, so if you want really distinct color values for diffuse and ambient, this cannot be done this way.
If you change transparancy, reflections etc. this will affect your textures as well. Not good if you want to have a matte label on a shiny, semi-transparant bottle or something.

Note:
When disconnection nodes, be sure not to click on the refresh button untill you're finished, or your tree is gone. And nope, the Rendertree has NO undo!!!!

So if you want more control over your texturing on the Material node level, we will have to go into the rendertree and adjust links manually, as well as add additional nodes to the mix.
Although you can off course start with the mentioned method to set up textures and nodes, before going in and manually adjust and add on the excisting tree.