Small Instantiation Language: Materials

Each shape in a XSight RT scene must be associated with a material. This material controls how the object surface reacts to the incoming light ray, the amount of diffused light and the object color, the intensity of the reflected ray, if any, and its own color. XSight RT currently supports six materials:

They can be classified as in the following image:

All these materials share some common features, that will be explained below. Materials render according to the active render quality.

Perfect specular reflection

Almost all materials supports a reflection coefficient, that states how much light is reflected by the material's surface in mirror-like fashion. Reflected rays are added to the own color of the shape. If you want a surface which behaves like a mirror, set the color of the shape as black, or a dark enough color.

Metals, on the other hand, allows you to specify two differente reflection coefficients: a minimum and a maximum reflection, since reflections in metals depends on the incident angle of the light ray.

Phong's dirty trick

There's a funny fact regarding ray tracing. We have been casting rays of light all over the scene... but we cannot see directly any light rays! We see light only when it's dispersed by a Lambertian surface. A Lambertian surface is a theoretical surface kind that disperse incoming light in all directions, with an uniform distribution.

However, no real material shows the idealized behavior of Lambertian surfaces. A real surface exhibits a mixed behavior, between perfect diffusion and perfect reflection. So, we expect to see light sources reflected in most "shinny" surfaces, though classical ray tracing alone can't handle this.

The following matrix show a Phong highlight with different amounts and sizes. Amount, or intensity, increase as we move down, and the size parameter increases as we move from the leftmost to the right.

Please note that a higher Phong size actually means a smaller area highlight.

Warning: if you set a too high Phong amount, the resulting color for the highlight may sum above the white intensity, and it could be clipped by the sampler. There's nothing wrong with this, except that it would appear as an overexposed patch in a traditional photo.

Diffuse reflection

This phenomenon is emulated by XSight RT using a roughness property in materials.

Of course, you can add Phong highlights to diffuse reflective surfaces. In that case, it's recommended to use a wide highlight, by specifying a low Phong size.

See also

Home | Small Instantiation Language overview | Scenes | Predefined shapes