Build A Material Palette
Platform applications use a single, node-based file format to store data. This
exercise shows you how to use the tools in ShaderDesigner to create a material palette
that is stored in the same node-based file format as all the other databases created
with Scenome.
Material palettes contain collections of materials that are defined once and used in
many places. Since material palettes are implemented with the scene graph, it's pretty
easy to do anything you want. You can use multiple palettes, or a single palette with
hundreds of materials organized in separate groups.
Finished Version
Finished version of this model is available:
- \My Documents\Scenomics\Samples\Basics\basic_palette.box
Build The Terrain Material
This series of instructions teaches you how to build a terrain material.
- Start ShaderDesigner. ( Start » Programs » Scenomics » ShaderDesigner Application ).
- Save the file as \Samples\Palettes\user_basic_palette.box
- Examine the hierarchy.
- Right click over the group node named Palette and select New Materials » Detail Shader Material from the listed options.
- Right click over the group node named Unnamed Detail Material and select Show Only This Group from the listed options.
The hierarchy looks like this:

- Examine the hierarchy and rename the group node Unnamed Detail Material to Terrain.
- Examine the hierarchy and rename the material node Unnamed Detail Material to Terrain.
- Examine the hierarchy and right click over the texture node named diablo_lake_1x3_diffuse.
- Select Replace Texture from the listed options.
This displays the common file dialog and allows you to choose a texture on the hard disk.
- Go to the folder \Samples\Textures
- Select diablo_lake_3x1_diffuse.png and click Open.
- Right click over the texture node named diablo_lake_1x3_diffuse and select Rendering Size » 1024 px from the listed options.
- Examine the hierarchy and right click over the texture node named diablo_lake_1x3_detail_mask.
- Select Replace Texture from the listed options.
This displays the common file dialog and allows you to choose a texture on the hard disk.
- Go to the folder \Samples\Textures
- Select diablo_lake_3x1_detail_mask.png and click Open.
- Right click over the texture node named diablo_lake_3x1_detail_mask and select Rendering Size » 1024 px from the listed options.
- Double click the texture node named diablo_lake_masked_normal_map.
This displays its properties in the property editor.
- Set Source X to 0.
- Set Source Y to 1176.
- Examine the hierarchy and expand the script node named SetupConstants. It's near the top of the hierarchy.
- Right click over the variable node named uniform int enableFog and select Toggle 0-1 from the listed options.
The material color changes to a blue tone.
- Double click the variable node named uniform float waterSurfaceZ and set its Floating Point Value to 3.0.
- Double click the variable node named uniform float waterColor and set its Color to RGB 190, 210, 255.
- Double click the variable node named uniform float waterSurfaceDensity and set its Floating Point Value to 0.25.
The worksheet looks like this:

- Select File » Save from the main menu.
Build The Road Material
This series of instructions teaches you how to build a road material.
- Examine the hierarchy and right click over the group node named Palette and select New Materials » Effects Shader Material from the listed options.
The hierarchy looks like this:

- Right click over the group node named Unnamed Effects Material and select Show Only This Group from the listed options.
The hierarchy looks like this:

- Examine the hierarchy and rename the group node Unnamed Effects Material to Road.
- Examine the hierarchy and rename the material node Unnamed Effects Material to Road.
- Examine the hierarchy and right click over the group node named textures.
- Select From Disk » Replace Textures from the listed options.
This displays the common file dialog and allows you to choose a texture on the hard disk.
- Go to the folder \Samples\Textures
- Left click road_passing_left_lane_diffuse.png.
- Hold down CTRL and left click road_passing_left_lane_normal.png.
- Continue to hold down CTRL and left click road_passing_left_lane_gloss.png.

- Click Open when you are finished.
The software replaces all three textures with the textures you selected.
- Left click the texture node named road_passing_left_lane_normal.png and hit ALT + Up Arrow. This moves the texture up.
The hierarchy looks like this:
The worksheet looks like this:

- Examine the hierarchy and expand the script node named SetupConstants. It's near the top of the hierarchy.
- Double click the variable node named uniform float specularExponent.
This displays node properties in the property editor.
- Set Floating Point Value to 1.
- Select File » Save from the main menu.
Build The Water Material
This series of instructions teaches you how to build a water material.
- Examine the hierarchy.
- Right click over the group node named Palette and select New Materials » Effects Shader Material from the listed options.
- Right click over the group node named Unnamed Effects Material and select Show Only This Group from the listed options.
The hierarchy looks like this:

- Examine the hierarchy and rename the group node Unnamed Effects Material to Ocean.
- Examine the hierarchy and rename the material node Unnamed Effects Material to Ocean.
- Right click over the material node named Ocean and select Toggle Transparent from the listed options.
- Examine the hierarchy and right click over the group node named textures.
- Select From Disk » Replace Textures from the listed options.
This displays the common file dialog and allows you to choose a texture on the hard disk.
- Go to the folder \Samples\Textures
- Left click ocean_diffuse.png.
- Hold down CTRL and left click ocean_normal.png.
- Continue to hold down CTRL and left click ocean_gloss.png.
- Click Open when you are finished.
The software replaces all three textures with the textures you selected.
- Left click the texture node named ocean_normal.png and hit ALT + Up Arrow. This moves the texture up.
The hierarchy looks like this:
The worksheet looks like this:

- Examine the hierarchy and expand the script node named SetupConstants. It's near the top of the hierarchy.
- Right click over the variable node named uniform int enableWater and select Toggle 0-1 from the listed options.
The mesh color changes to a reddish tone.
- Double click the variable node named uniform float waterSurfaceDensity and set its Floating Point Value to 0.3.
- Double click the variable node named uniform float waterSurfaceZ and set its Floating Point Value to 4.0.
- Double click the variable node named uniform float waterColor and set its Color to RGB 190, 210, 255.
The worksheet looks like this:

- Select File » Save from the main menu.
This is a complete material palette that references the detail texture and effects shaders. Each material has its own uniform variables,
textures, and material node. Continue to the SceneDesigner exercises if you're ready to use these materials to build a scene.