Fixed Function Shading Example: A Reflective Textured Sphere
This example shows you how to use multi-texturing, fixed function shading, and texture coordinate generation realtime shaders to create a reflective textured sphere.
1. In any viewport’s Views menu, choose Realtime Shaders > OpenGL. This allows you to view the realtime shader effect you’re about to create.
2. Choose Get > Primitive > Sphere from any toolbar.
3. With the sphere selected, choose Get > Material > Phong from the Render toolbar.
4. Press 7 to open the object’s render tree.
5. Select and delete the Phong node.
Draw the object
6. From the render tree menu, choose Nodes > RealTime > OpenGL > OGL Draw.
7. Connect the OGL Draw node to the Material node’s Realtime port.

Shade the object
8. From the render tree menu, choose Nodes > RealTime > OpenGL > OGL Shade.
9. Connect the OGL Shade node to the OGL Draw node’s previous port.

10. Double-click the OGL Shade node to open its property editor and adjust the properties in the Colors section as needed (see Fixed Function OpenGL Shading).
Texture the object
11. From the render tree menu, choose Nodes > RealTime > OpenGL > OGL Texture.
12. Connect the OGL Texture node to the OGL Shade node’s previous port.

13. Double-click the OGL Texture node to open its property editor and adjust the properties as follows:
- Set the target to 0 because you want to apply this texture right after the object has been shaded.
- Choose a texture image to use and a texture projection for it.

Add a reflection map
14. From the render tree menu, choose Nodes > RealTime > OpenGL > OGL Texture Transform.
15. Connect the OGL Texture Transform node to the OGL Texture node’s previous port.
16. From the render tree menu, choose Nodes > RealTime > OpenGL > OGL Texture.
17. Connect the new OGL Texture node to the OGL Texture Transform node’s previous port.
The render tree should now look something like this:

18. Double-click the new OGL Texture node to open its property editor and adjust the properties as follows:
- Set the target to 1 because you want to apply this texture after the one you already set.
- Choose a texture image to use as the reflection map.
You don’t need to set a texture projection since the texture coordinates will be generated by the OGL Texture Transform node.

19. Double-click the OGL Texture Transform node to open its property editor and adjust the properties as follows:
- Set the target to 1 to generate texture coordinates for the reflection map, which is also set in target 1.
- Set the Type of texture coordinates to Sphere map
- Set the number of Components to 2D to generate U and V coordinates.

And presto! You have a reflective textured material.
Autodesk Softimage v.7.5