shaders_textures.pdf

(4937 KB) Pobierz
Microsoft Word - Shaders&Textures.doc
Shaders and Textures in Artlantis 2.0
By Gérard Bomer, Abvent
In Artlantis, “Shaders” and / or “Textures” are used to define the aspect of materials.
In Artlantis there are a few procedural shaders that have a color for the diffuse (Basic, Expert, Fresnel
Water, etc.) The majority of shaders have images to define the diffuse (Bricks, Wood...).
1/ Procedural Shaders
Procedural shaders (Basic or Expert) are recommended:
- for simple surfaces because they use very little memory,
- as a support for texture mapping
Basic and Expert shaders can simulate several surfaces.
“Basic” Shader sample: from matte to lacquer painting by changing the reflection and shininess:
R=0 - S= 0
R=0.2 - S=20
R= 0.5 - S= 350 R=0.5 - S=1000
Diffuse=green Diffuse=green
Diffuse=green
Diffuse=green
“Expert” shader sample:
Aluminum, Steel, Chrome, Bubble
Shininess=160 Shininess=400
Shininess=1000 Shininess=900
Diffuse=Dark-gray Diffuse=Black
Diffuse=Black
Diffuse=Black
Reflection=Gray Reflection=Gray-blue
Reflection=white Reflection=light gray
Transparency=light gray
Other procedural shaders (Fresnel Water, Fresnel Glazing, etc.) are used for specific cases, which cannot
be simulated by others.
“Fresnel Water” shader sample:
1
408808143.041.png 408808143.042.png 408808143.043.png 408808143.044.png 408808143.001.png 408808143.002.png 408808143.003.png
2/ Image Shaders
Image Shaders are "pre-set" materials, ready to use. They have common behaviors:
- Automatic repeat of the diffuse image file to cover the entire surface with a perfect tiling
- Sliders with minimum and maximum values are pre-set to prevent faulty settings, i.e. coating
shaders have no reflection
- Unique and Simple user interface (Some image channels and parameters are hidden)
The Mix Color:
The diffuse is defined by an image that has its own colors, but it is possible to modify this color with the
“mix color” function.
This is an RGB color, and the neutral color is gray. Gray does not change the original picture aspect,
even if the “Mix” box is checked.
Sample: changing the mix color on the wall in the back
Mix Color in the UI
No mix
Mix=Brown
Mix=Green
Tip: If your scene illumination is correct except for one material that is lighter or darker than you
expect, you can use the Mix Color.
Note: it has a greater effect on direct lighting.
2
- Automatic scaling with the model
408808143.004.png 408808143.005.png 408808143.006.png 408808143.007.png 408808143.008.png
In this sample, dark gray was mixed with the carpet shader
Reflection and Shininess
These work exactly the same way as procedural shaders (see above) but minimum and maximum values
can be limited. To change these limits, use “Create Shader” feature.
Note: if Shininess is 0, Reflection does not have any effect on your scene. You have to set a minimum
value to Shininess to see Reflection.
Tips: if Reflection > 0 the LED is red; if you click on it, Reflection is reset to 0
Here, the maximum value of Reflection is limited to 0.4 (max. possible is 1.0)
Bump mapping and/or Normal mapping
These parameters can simulate roughness or relief of the surface. But there is no modification of the
geometry.
Relief simulation with Bump mapping:
Tip: if Bump number is 0, the LED becomes red; by clicking on it, the Bump is reset to 0 (neutral
position)
3
408808143.009.png 408808143.010.png 408808143.011.png 408808143.012.png 408808143.013.png 408808143.014.png 408808143.015.png 408808143.016.png 408808143.017.png 408808143.018.png 408808143.019.png 408808143.020.png
(Bump map and Normal map samples are detailed in the “Create Shader” tutorial.)
Note: If the Normal map slider is disabled it means that there is no Normal map in the shader definition.
Transparency
All shaders are opaque by default. This is the normal use, but it can be useful to have an X-ray vision of
some of them in a special view. So it is possible to adjust global transparency for each shader.
Transparency=0
Transparency=170 Transparency=243
Transparency=255
Material ID parameters: Smoothness
In the “drawer” of the Shader inspector you will find the entire list of materials used in your project.
Select a material and right click on it:
4
408808143.021.png 408808143.022.png 408808143.023.png 408808143.024.png 408808143.025.png 408808143.026.png
Smoothness=0
Smoothness=0.2
Material ID parameters: Visibility and Shadow casting
In some cases, it is useful to mask a part of the model or to change the shadow processing.
In the sample below, the following settings are applied to the sphere:
Tip: use “Material Cast Shadows” for the grass to disable the radiosity color bleeding:
- On the left, light is bouncing on the green floor and creates green color bleeding on the wall.
- On the right, light goes though the green floor and there is no green color on the wall
5
408808143.027.png 408808143.028.png 408808143.029.png 408808143.030.png 408808143.031.png 408808143.032.png 408808143.033.png 408808143.034.png 408808143.035.png 408808143.036.png 408808143.037.png 408808143.038.png 408808143.039.png 408808143.040.png
Zgłoś jeśli naruszono regulamin