Materials In Virtual World
by Eric Bellanger
In this article we want to briefly introduce fundamental principles of what virtual materials are made of. Materials management involves several complex methods, and the glossary can sometimes lead to confusion. After presenting some of the principles and methods, we will introduce some simple examples of materials management using the Ocean™ software.
To see objects in a 3D world, every surface of each object has to interact with light. Sensor models (cameras) are required for capturing all these interactions and outputting them as a commonly used rendered image.
Objects need “Materials” on their surface. Material definition drives behaviour of the object with light. In a render software, an object without material is considered invisible or null.
Even if we see it as black, grey, semi-transparent or wired, all of this, is part of surface properties defined by a material.
Each software has its own interpretation for building models for materials. But there are common parts. Since first uses of CAD (“Computer Aided Design”), software developers tried to reproduce surface properties with simple or more complex methods.
For several reasons (memory consumption, artistic approach, simple use), some methods are physically wrong as they are only based on the final appearance of the object. At the opposite, some methods define models with measured data allowing physically-true predictive behavior of the surface.
Ocean™ uses a tree structure to represent material properties, allowing for both simple and detailed models when rendering. Models can go as far as requiring measured data produced by dedicated devices.
Following presentations aim at exploring how the complex world of materials is managed by modern softwares with common categories and to see how Ocean™ handles them.
“Material” is a global name which defines more complex concepts with a combination of several data values : shader or texture or both at the same time.
Figure 2 - Example of a material in Ocean™ : Medium properties (bulk), Altered surface properties (bump), Emissive properties, Main surface properties (BSDF)
A "shader" is a program/algorithm : a mathematical operation for managing optical properties of a surface such as reflection, glossiness, roughness, metalness, absorption, refraction, transparency or light emittance.
"BSDF" (bidirectional scattering distribution function) is a mathematical function that describes the optical properties of a surface.
Figure 3 - BSDF representation.
"Textures" are made of pixels in a two dimensional (2D) representation.
Textures are commonly pictures with pattern or photo representations.
They can be generated procedurally. In computer language, a graphic image file is called “bitmap”, by extension texture file is called “map”. Common file types are JPG, PNG. They can be in full color but also as greyscale image in 8 or 16bits also with alpha channel (transparency).
Figure 4 - Examples of several texture maps : concrete, gradient, tiles, damage, noise.
Figure 5 - Example of a grid texture map applied on 3d models.
(move mouse over the image to zoom in)
Applying a 2D texture map onto a 3D surface is called “mapping”. The coordinate system of 3D objects is based on 3 axis X Y Z, therefore its coordinate system in 2D for textures is based on U (X axis) and V (Y axis).
Texture UV mapping is the process of wrapping/projecting a two-dimensional (2D) texture/image/map to a 3D surface. For example, it is like applying a sticker onto a piece of Lego !
Figure 7 - UV coordinates represent 2D positions on an object’s 3D surface. Selected red face on 3D model is represented as a red selection in UV coordinates. Values vary from 0 to 1.
Figure 8 - Example of bad UV unwrap and good one.
In most cases, unwrapping process has to project texture map seamlessly onto the surface, without any cuts or tearing or stretched patterns. It is not an automatic process. For a complex geometry , it could be a tedious work, involving multiple methods. That’s why, a skilled operator is more efficient than a machine for this task.
>> All rendered images are made with Ocean™ <<
HOW THE SURFACE LOOKS LIKE
Diffuse map / Base color / Albedo map :
It gives the first main appearance using color or pictures.
Figure 9 - Examples of pictures used as diffuse map for photo-realistic appearance on a sphere model.
HOW THE SURFACE REACTS WITH LIGHT OR ENVIRONMENT
IOR : index of reflection, how much the surface is reflective
Specular : intensity of light reflection
Glossy : amount/repartition of light reflection
Rough : precision/blurriness of light reflection
Figure 10 - Examples of roughness and IOR variations.
Figure 11 - Example of a metal material : brushed anodized aluminium.
HOW THE SURFACE IS ALTERED
Bump : adds more details, gives the illusion (faking) of surface depth but it is still flat.
Height : a variant of bump, alters the surface normal based on a height field.
Normal : another method for bump, reacts much better with light and shadow.
Displacement : affecting the topology of the geometry to deform it. Because it needs a more high mesh subdivision, it is much more realistic but can be heavy to manage.
Figures 12 and 13 are examples of various bump methods and their looking results :
Figure 12 (move mouse over image to zoom in)
Figure 13 (move mouse over image to zoom in)
A material has “emissive” properties as shown in the figure 14.
Figure 14 - Emissive materials
Also a material can have volume properties such as liquids, glasses …(Figure 15).
Here we add other layers of information such as volume properties into the material. We still can change its surface like previous properties (bump, emitter, bsdf).
Figure 15 - Demonstration of materials with volume properties
QUICK REVIEW OF MATERIALS IN OCEAN™
A surface without any material should not be visible. To avoid any mistake, Ocean™ automatically assigns a “default” material to every object that doesn’t have any. This “default” material is a simple “Lambertian” shader algorithm with a grey color.
Let’s see some basic examples on how other material models are managed by Ocean™ (clic on images to see fullsize) :
Figure 16 - This is the default material used by Ocean™. A perfect diffuse Lambertian with a grey color defined by a number between 0 (black) and 1 (white).
Figure 17 - A material which light reflection is controlled by a Glossy shader, with a color driven by a uniform value and a roughness controlled by a Phong shader.
Figure 18 - Same material with a much more precise reflection because of a high Phong value in roughness. High Phong = smooth surface, low Phong = rough.
Figure 19 - Decreasing the IOR, meaning less reflection. Reflection is still precise.
Figure 20 - Adding bump texture map (grid image) to mimic the alteration of the surface. Surface is still flat.
Figure 21 - Perfect diffuse Lambertian material but with a texture map as diffuse instead of a uniform color.
Figure 22 - The volume emits light energy all over its surface. The diffuse is black and because of the energy power and temperature, we see the brightness.
Figure 23 - Metals don’t have diffusion. Their complex IOR defines the reflection color, driven by a “dielectric function”.
Figure 24 - A volume glass material. Here, some volume properties are driven by a Dielectric function.
Figure 25 - A dust, dirt and scratches image is used in a texture map for blending a reflective shader and a rough one. This image is also used as bump map for altering the surface, faking small notches and stripes.
In virtual 3D representations, the process of designing materials is crucial and needs a lot of attention. A simple 3D volume can become truly understandable because of its material. Even though a relevant geometry is important, material can radically change the volume appearance depending on its properties and quality.
Ocean™ allows management of many materials properties and shines in its use of very detailed physical models along with artistic-driven ones.
Many steps of CAD preparations are required before working in a rendering software such as Ocean™. A good understanding of what has to be represented is necessary. It is also about staging with scene layout, lighting, environment, point of view, a relevant mesh topology with enough detail, no errors, well sized, UV mapping projected efficiently on it. All this stuff is not an automatic process and needs expertise.