Light and Matter: Allegorithmic's guide to physically-based rendering

Graphics specialist Allegorithmic has published a free guide to this increasingly popular rendering technique. Check out the extract below
Publish date:
PBR allegorithmic.png

Light is a complex phenomenon as it can exhibit properties of both a wave and a particle. As a result, different models have been created to describe the behavior of light.

As texture artists, we are interested in the Light Ray Model as it describes the interaction of light and matter. It’s important for us to understand how light rays interact with surface matter because our job is to create textures that describe a surface. The textures and materials we author interact with light in our virtual worlds and the more we understand about how light behaves, the better our textures will look.

In this guide, we will discuss the theory behind the physics through which physically-based rendering models are based upon. We will start with a light ray and work up to defining the key factors for PBR.

Light Rays

The Light Ray Model states that a light ray has the trajectory of a straight line in homogeneous transparent media such as air. The Light Ray Model also says that the ray will behave in a predictable manner when encountering surfaces such as opaque objects or passing through a different medium such as air to water. This
makes it possible to visualize the path the light ray will follow as it moves from a starting point to where it
eventually changes into another form of energy such as heat.

The light ray that hits a surface is called the Incident Ray and the angle that at which it hits is called the Angle of Incidence as shown in figure 01. 

A light ray is incident on a plane interface between two media.

Image placeholder title

When a light ray hits a surface, either or possibly both of these things can happen:

  1. The light ray is reflected off the surface and travels in a different direction. It follows the Law of Reflection, which states that the Angle of Reflection is equal to the Angle of Incidence (Reflected Light).
  2. The light ray passes from one medium to another in the trajectory of a straight line (Refracted Light). At this point, we can state that light rays split into two directions: reflection and refraction. At the surface, the ray is either reflected or refracted and it can be eventually absorbed by either medium. However, absorption doesn't occur at the surface.

Absorption and Scattering (Transparency and Translucency)

When traveling in an inhomogeneous medium or translucent material, light can be absorbed or scattered:

  1. With absorption, the light intensity decreases as it is changed into another form of energy (usually heat), and its color changes as the amount of light absorbed depends on the wavelength, but the direction of the ray doesn't change.
  2. With scattering, the ray direction is changed randomly, the amount of deviation depending on the material. Scattering randomizes light direction but the intensity doesn't change. An ear is a good example. The ear is thin (absorption is low), so you can see the scattered light penetrating out of the back of the ear. If there is no scattering and the absorption is low, rays can pass directly through the surface such as with glass.

For example, if you are swimming in a pool, which is hopefully clean, you can open your eyes and see at a fairly good distance through the clear water. However, let’s imagine that same pool hasn't been cleaned in a while and the water is dirty. The dirt particles scatter the light and thus make the clarity of the water much lower.

The further light travels in such a medium/material, the more it is absorbed and/or scattered. Therefore, object thickness plays a large role in how much the light is absorbed or scattered. A thickness map can be used to describe object thickness to the shader as shown in figure 02.

Object thickness plays a large role in how much the light is absorbed or scattered.

Image placeholder title

For more, be sure to check out the full guide: Light and Matter – The theory of physically-based rendering and shading



Guiding Light

Develop visits EAâ??s Guildford-based Bright Light studio to learn out about its journey to create a new casual kids franchise, and why the team has torn up the rulebook on the wayâ?¦


Yes, target renders do matter

Earlier this month, Evolution's Nigel Kershaw rallied against gamers disappointed with Motorstorm's failure to mimic the 'concept movie' shown in 2005, saying that 'target renders don't matter'. Here, Axis Animation MD Richard Scott offers his opinion of why target renders do indeed matterâ?¦