Transparency Shader

A Cg transparency 2-pass shader with color and bump mapping and with reflective and refractive cube mapping.
You need a 2D color and bump map. The bump map can be generated with nVidia's Photoshop Normal Map Plug-in or Melody. You will also need two cube maps, one for the reflection and one for the refraction. Usable examples were provided from nVidia for instance. (For Softimage's OpenGL 1.3 image loader you need six separate textures.) Connect the textures you want to use with the first pass also with the second pass since both will utilize the same maps.



Hatching Shader



The base shader consists of two blended passes, a hatching shader with diffuse and specular lightning calculation and the contour shader below. You can control some uniform parameters over the corresponding cgvector nodes.
1) Drop the top shader ball and all three textures below in the Render Tree.
2) Connect the two hatching textures with the corresponding texture loaders of the first shader (123hatching.tga -> OGL13Texture8, 456hatching.tga -> OGL13Texture7). Connect also the random texture to the OGL13Texture10 loader. The contour texture also must be connected with the texture loader for the second shader.
And of course your object needs a texture projection.
 
Texture 1.0: Hatching Texture 0
Texture 1.1: Hatching Texture 1
Texture 2.0: Contour Texture
Texture 3.0: Random Texture

You can also download a demo scene here. The shader in the scene has a third pass for rendering the background paper (but no random strokes). You can also control the paper color.



Cel Shader

(XSI 4.0 / Cg 1.21 preset)
This is an implementation of a cel shader with diffuse and specular lightning calculation.
1) Drop the icon and the three textures in the Render Tree and connect the shader with the material node.
2) Link the diffuse texture with texture loader 0, the specular texture with the texture loader 1 and the contour texture with texture loader 2.

Texture 0: Diffuse Texture
Texture 1: Specular Texture
Texture 2: Contour Texture



Contour Shader

(XSI 4.0 / Cg 1.21 preset)
Drop the icon and the texture in the Render Tree and link the map with the OGL13Texture node.

Texture: Drop this map



Z-Buffer Shader




This shader will render the z-buffer. Drop it in the Render Tree and link the OGL13Draw node with the material node.



Normal Shader




Drop the icon in the Render Tree and link it with the material node.



Sobel Edge Detection Filter




This is an image processing filter.
Drop the icon in the Render Tree, load your image or image sequence with the OpenGL texture loader and link the OGL13Draw node with the object's material node.



B/W Filter




A simple black and white image processing filter.



Copyright © 2004-2011 SASCHA ROBITZKI All Rights Reserved