| Reason for the red and white checkerboard appearance |
top |
Responsible for the visual appearance of a model regarding its
light-behavior, colors, and the reason about pictures that can
appear on its faces, is the Shader.
The 3DPI shows quickly why the Cube has a red and white checkerboard
appearance.
Look at the property "shaderList".
(The Model-TAB is still active.)
A box has 6 sides. The number "6" beside the shaderlist.count
entry in the 3DPI reveals that each side of the model can be
displayed differently by assigning a different shader to each
side. The value beside "shaderList" is currently showing
"ALL" and the 3DPI shows which shader is used for
all the sides of the model: it is the "DefaultShader".
Click the grey gradient button to the left of shaderList.count.
This icon works like a hyperlink. The 3DPI now selects the
Shader-TAB and automatically activates the "DefaultShader".
|
The bottom part of the 3DPI displays new properties, the properties
of a shader of type #standard.
One important property of the shader is the #texture resp.
#textureList. In the PopUp next to it, the 3DPI displays "DefaultTexture"
meaning the default texture is used for this shader.
Click on the texture button on the left.
Now the 3DPI navigates to the Texture-TAB
displaying the only existing texture in the name list, the "DefaultTexture",
that is automatically selected recognized by a white hilite.
The bottom part of the 3DPI is filled with new properties and
you ask yourself "What is this Texture about?"
|
Click on the "Preview" Button on the bottom.
A red-and-white picture appears, scaled up to fit into the
preview area. This is the image of the "DefaultTexture".
A texture is an object within the shockwave3D world, which
stores images; images a shader can use to display on a models
face.
|
 |
| Changing the shader to one color |
top |
| Colorizing each side of the Cube |
top |
|
For a models sides, different appeearances; different Models;
different shaders are needed.
- Click on the New Button to open the dialog for creating
a new shader.
A dialog box will open asking for a name and type of the shader.
- Type "blueShader" for the name in this
dialog. You could leave the name as suggested by the 3DPI,
but in this case it might be better to change it .
- Select the #standard Radio Button within the dialog.
- Click "OK" to close the dialog box and to create
the shader.
The new created shader appears in the name list, and is automatically
selected, the shader properties displayed.
- Set the texture property to void by selecting "void"
from the PopUp beside the property #textureList.
- Change the diffuse color to blue.
- Repeat steps 1 to 6, name the new shader "greenShader"
and select green for the diffuse color.
|
TIP:
Clicking the "New" Button while holding down the
option key (= alt key) the dialog will be skipped.
A new shader is automatically created and named by the 3DPI:
"shader_1", "shader_2", and so on. The shader type will
automatically be the same as choosen within the dialog.
The dialog can also be skipped on a PC by clicking the right
mouse Button on the "New" Button.
|
|
| 3 shaders now exist all using different colors
for the diffuse property. Here you can click the names of the shaders
in the 3DPI name list, switch the selection, and watch or change
the diffuse color for each shader. |
 |
|
Until now the Cube had nothing to do with the shaders. Assign
the newly created shaders to the Cube:
- Select the Model-TAB.

The 3DPI navigates to the Model-TAB, automatically selects
the model and displays its properties.
- Assign a different shader to each side of the box.
Type a number in the left field, one by one from 1 to 6, and
choose a shader from the drop down box on the right side.
The final combination can appear this way:
1 (front) ... blueShader
2 (right) ... DefaultShader
3 (back) ... blueShader
4 (left) ... DefaultShader
5 (top) ... greenShader
6 (bottom) ... greenShader
In this example, the sides 3, 4 and 5 of the model are currently
the "front visible" sides.
|
| That´s it. |
 |
|