First part of how-to describes how to create several materials, which can be applied to a simple mesh (e.g sphere or box) in order to show basic material features:
- plastic
- sandstone
- rusty metal
- brushed metal
- illuminated window
- corroded/worn-out material
- alien globe (revised)
Next part of how-to shows how to customize existing materials, with following examples:
- lava golem
- shiny droid
- water lizard
First part - simple materials
Start from an empty scene with optional skybox (if you want) and single directional light. I've used particles demo scene, removed everything from it. Open architect, go to Assets tab and expand Entities / Shapes. Here you see 4 simple models, incl. sphere. Now drag&drop the sphere model onto scene, this is starting point for all materials in the first part of demo:


Each time when I start new material, I assume that we start from scratch, typically it's "Solid Lambert" material. Change only settings I described in how-to, if you are not sure about what effect other settings have for particular case.
Plastic
Plastic is quite easy material. It uses medium diffuse, small specular amount and medium-to-high ambient. Texture only needed in case if you want non-uniformness in the structure of plastic. For our material, set following values:
- Ambient, Diffuse: R=255, G=0, B=0
- Specular: white color, Level set to 0,3
- Glossiness: 10
- Texture mode: 2D texture, Texture: noise2.jpg
Expected result:

Sandstone
For sandstone, it would be better to use Box instead of sphere. This material uses only ambient and diffuse lighting; normal map is used to show relief on surfaces with indirect light angles. Material settings are:
- Light model: Lambert
- Texture: Ground1.dds
- Normal map: golem_n.dds
- Ambient: white color; level 2
- Diffuse: white color; Level 1,2
- To make normal map more subtle, you can expand Normal Map property, set Has Transformations checkbox and set Scale to x=2, y=2. On given screenshot, normal map has scale x=1, y=1.
Expected result:

Rusted metal
Rusty metal effect is also known as masked environment mapping and requires three textures: environment map (could be either cube map, or 2D spherical map texture), and two 2D textures - reflection mask (black and white) and non-reflective part (defines the "own" color of surface, i.e. paint or rust). Use sphere mesh for this time; don't forget to reset material if you reused sphere from first demo. Material settings are:
- Set ambient color to full white
- Change Texture type to: Masked Environment Map
- Reflection texture: boxreflection.bmp
- Reflection mask: boxreflectionmask.jpg
- Non-reflective part: boxdiffuse.jpg
This is basic setup and should work already, but for realistic reflections and subtle "rusted metal" effect we need to do additional setup:
- Under "Environment Map - Reflection" set "UV Transforms" flag and set Scale to U=4, V=4
- Do same thing for "Environment Map - Diffuse"
- Under Lighting tab, find Specular Mask and assign it to boxreflectionmask.jpg texture; set UV Scale to x=4, y=4
- Finally, set Level prop of Reflection Mask to 3 or 4 (this will control how rusty is our metal)
Expected result (rotate around sphere and you will see, that lighting/reflections are only occur on non-rusty areas):

Brushed metal
This material simulates non-uniform metal with streaks, like brushed metal. Depending on whether you want to see brushes only on lit parts, or on entire surface, there will be two variants of this material (both are described). This time, box mesh will be better, because this effect is better noticeable on flat surfaces.
Brushed metal with streaks covering entire surface:
- Texture type: Masked environment map
- Reflection texture: boxreflection.bmp
- Reflection mask: Concrete1.dds
- Under Reflection mask, change Blending Mode to "Multiply" and set Level to 3
- Also, for reflection mask set UV Transformations checkbox and Scale: U=0,2 and V=4
- Finally, set Ambient color to R=G=B=100 (approx)
Expected result (fly around to see metallic effect):

Another variation of this effect uses diffuse mask instead of masking the reflection texture. This gives a feeling of more subtle brushes, visible only on under light:
-
Change texture type to Environment map
-
Set Diffuse mask to: Concrete1.dds
-
Set up diffuse mask UV Scale: U=0,2 and V=4
Results:

Illuminated window
Simple but funny effect based on Emission Map, similar to one used in GTA game for night time windows in skyscrapers. Use it with House1.mesh model, set up it's material like this:
- Set Light model to Lambert (e.g. no specular highlights)
- Set Diffuse/Level of both to 0,5 to show more ambient (remember, it's night over there)
- Set Emissive color to orange (R=255, G=150, B=0) -- this define the middle-level color of illuminated window
- Choose Emissive Map: house_window.jpg
- Intensity of window illumination is controlled by Emissive/Level property.
Now the tricky part: we want now some glow from self-illumination. To add a glow (also known as "Emissive Bloom"), set "Allow Emissive Bloom" checkbox under Lighting tab. Finally, to render the bloom, turn ON the Specular Bloom effect in the Options menu at right-top corner of the screen (visible in Application Mode). Expected in-scene result is:

Heavily Corroded metal
This time we use opacity maps to simulate a heavily corroded surface, with visible holes. For additional level of detail when camera is close, we'll use a detail texture. Material settings:
- Set Light model to Lambert
- Decrease Diffuse color to R=G=B=64 (approx.)
- Increase Ambient color to R=G=B=100 (approx.)
- Set "Use Two Sided Rendering" checkbox
- Set Texture mode to 2D texture, choose texture: boxdiffuse.jpg; set UV Scale to 3
- Set Detail texture to: Concrete1.dds, set UV Scale to 5
- Set Transparency Mode to Pattern Transparency (crisp)
- Set "Transparency Map" checkbox under Transparency tab
- Select following Transparency map texture: noise2.jpg, set UV Scale to 3
- Under Transparency Map/Channel Map set "Red" checkbox
- Finally, set "Alpha Test Threshold" to 0,95 under Transparency tab
- For more fun, you may change Constant Opacity back and forth to show how surface "dissolves" in realtime.
Results:

Organic Globe
For this effect we use really dark but reflective surface along with pulsing, organic-like spots. Drag sphere to the scene and apply following material settings:
- Uncheck Use Ambient checkbox under Lighting tab, so we use only diffuse and specular light
- Set Diffuse/Level to 0,25
- Set "Normal Map Type" to "Normal Map" and select following normal map texture: NMStripes.png
- Set UV Scale of normal map texture to 5
- Set Emissive color to pure Red (R=255, G=B=0), choose Emissive map texture: rainsplash_d.dds
- Set Emissive Map/Blending Mode to "Multiply" instead of "Multiply x2"
- Finally, set up a color animation of organic spots: expand Emissive property, set "Use Color Animation" checkbox and set Animation color R=120 (approx.), G=B=0
- To make color animatioh slower, set Animation Period to 6 (measured in seconds)
Expected result (doesn't show color animation):

Second part - customizing existing materials
Lava golem
Golem is made of multiple parts, but all parts share same material instance. To make our golem be made of lava, do following:
-
Set Light Model to "Ambient Only"
-
Turn off Ambient lighting
-
Set Texturing Mode to "No texture (solid fill)", set Normal Map Type to "None"
-
Set Emissive Color to R=255, G=100, B=0
-
Choose Emissive map texture: Concrete1.dds, set Has Transformations to true and set up animation -- Offset Animated: x=0,005 and y=0,005
-
To add glowing effect, turn on "Allow Emissive Bloom", decrease Emissive Bloom Level to 0,3 and enable "Specular Bloom" effect in the Options menu
Expected result (doesn't show lava animation):

Shiny droid
Turn OFF "Specular bloom" effect if you have turned it ON in previous demo.
And let's make our Flying Assault Droid more shiny and beautiful. Let diffuse color interact with the surface with vertical streaks, and specular - with horizontal streaks, producing brushed metal like effect. Drag&drop it on scene and make following changes for material:
- Choose Diffuse Mask: Concrete1.dds, set UV Scale to U=20, V=1
- Assign same texture to Specular Mask and set Scale to: U=1, V=20
- Set Ambient/Level to 0,3
That's all, enjoy results:

Water lizard
Leave lizard/armor and lizard/kilt unchanged, just change Diffuse Color to blue, and increase Diffuse Level to 5.
For lizard/body part, setup is following:
- Change Texturing Mode to Environment Map and set following Reflection Texture: Blue_cube.dds
- Ambient color - full white
- Diffuse color - blue (R=G=0, B=255)
- Emissive color - R=G=63, B=255
- Choose Emissive Map: caustic2_nc.png
- Under Emissive Map set following options: Blending Mode = "Multiply", Level = 3, turn UV Transformations ON and set Scale to 0,1; set Rotate Animated to 10
Expected result (no animation is visible here):
