3DS Max/Mental Ray: Setting up a daylight rig & lighting definitions

Setting up a Lighting Rig

There are various ways that 3DS Max and Mental Ray can light a scene, from the basic three point lighting system, to complex scenes with multiple lights, both standard and photo-metric (Physically accurate). Often, created content is dependent upon seasonal natural light. In these situations one of the most important lighting elements is the daylight system provided by the Mental Ray Sun and Sky package. To use it within 3DS Max, all that is needed is for the user to access the systems tab and click on ‘Daylight’. Once set, the system acts as a directional light source that creates crisp direct illumination using the mrSun and mrSky to factor in the many softer, diffuse shadows that provide the environmental bouncing of light. This is formulated through the Final Gathering process.

Fig. 2 - Setting up a Daylight SystemSetting up a Daylight System

As opposed to the IES equivalent, the Mental Ray Sun and Sky is the most physically accurate daylight generator. In his book Rendering with Mental Ray, Van der Steen (2007) justifies this by saying it holds superior options, due to its ability to provide soft shadows, haze and changing cycles, “I advise you to use this mental ray Daylight system whenever you need to create an outdoor scene; it is far better than the alternatives previously available inside 3DS Max.” (Van der Steen 2007) and importantly, it includes ways of accurately providing light from any location in the world. It also provides date, time and location details as far back as 1583.

Direct Light

There are multiple influences behind compiling a successful lighting model using the daylight system in Mental Ray, the first of these is direct lighting. Direct light represents the exposed area of surface that is within line of sight of the source, which in this case is the Mental Ray Sun, “Direct light is a pretty common term in the computer graphics environment. Basically, it is light that is present in the scene in which all the light rays stop when they hit a surface—there is no bouncing of light occurring.” (Van der Steen 2007: 8). By isolating this process, it is possible to gain visual information about exactly where rays are falling and hitting surfaces. An example can be seen below, where light can be seen spilling into the room from its roof entrance, creating distinctive areas of illumination.

Fig. 3 - An example of direct light using only the mrSunAn example of direct light using only the mrSun

To determine what the viewer should see, Mental Ray shoots light into the scene until it comes into contact with an object. It is then passed through a shader that describes how the material should look, before colouring the pixels for the resulting image. (Van der Steen 2007:7). As shown above, when isolated, the Mental Ray sun is very one dimensional, providing very intensive shadow. This process simply represents the first stage of accurate illumination and Mental Ray’s real power truly lies in its indirect lighting and both are needed to produce a successful lighting model.

Indirect light

The mrSun on its own cannot create accurate light, that has been shown above, because there needs to be another dimension. In reality, a huge aspect of lighting is comprised of indirect, environmental light and as it radiates outwards from the sun and other artificial sources, it hits surfaces and fragments and is either absorbed or reflected into the surrounding environment. How it bounces and returns from the various collisions it encounters relies upon numerous factors including translucency, density, colour and texture (roughness). If a ray hits a smooth object it can be reflected in a corresponding angle to the one that it arrived in, a mirror is a good example of this, and known as a specular surface, this often results in visible highlights. In contrast, light can also hit a rough surface and be scattered in different directions and this is called a diffuse surface (Van der Steen 2007: 7).

Natural light is therefore comprised of both direct light (direct illumination) and crucially, scattered, environmental light (indirect illumination). Every renderer has a distinctive way of artificially representing this phenomena and Mental Ray heavy focuses upon indirect lighting, highlighting its importance in creating a believable artificial model.

Shadows

When indirect illumination is used, detailed shadow is created. Like most areas within graphics, there are numerous ways to achieve the effect of shadowing (Area, ray traced or shadow maps are examples within 3DS Max). In Mental Ray they are commonly created using ray tracing, which is the calculation of the path of light through pixels and the generated effects of this process. This process casts rays to every light in the scene from the point that is being rendered, and checks if they are intersected by any objects during their journey. If so, the point is question is excluded and a shadow is generated. Based on materials in the model and how light bounces throughout the environment, different coloured and weighted shadows are then created, “Opaque objects create full shadows; transparent objects create density and coloured shadows, based upon how much light travels through the object material definition.” (Van der Steen 2007:8). This process is important, because without environmental light the human eye would instantly spot unnatural differences in perception due to its constant experience of such phenomena in real life as the human spectrum is biased towards detecting lower light gradients. A good isolated example of this can be seen in the first image below, where environmental illumination from the scene has been alienated to highlight how bounced light moves through the space, creating smooth shadows. This is drastically different to what was shown above, where areas of very extreme contrast existed. The balance between these two natural phenomena is further emphasized in the second image below, where both elements have been combined.

Figs. 4 & 5Isolated Indirect Light

Figs. 4 & 5Direct & Indirect Light Combined

Mental Ray’s Indirect Illumination

At a technical level, there are two main ways that Mental Ray can create environmental light, Final Gather and Photon Mapping (Global Illumination). These techniques generate bounced light in different ways and they can be used independently (Respective of the light setup) or combined. Although both techniques may show discrepancies from each other, crucially, “they are both 100% correct physically and these differences are usually due to the shaders inside the scene and not the underlying algorithms” (Van de Steen 2007: 12).

Archaeologists beware!

Something to note with this knowledge in mind is that in the heritage sector it is dangerous to use terms like “physically accurate” at face value to legitimize reconstructions. In the artistic industry, the responsibility of the creator is beyond doubt and unlike archaeology, it is normal to consider an image primarily as an artistic endeavor. Creating convincing and smooth models of light is not something that comes from the pressing of a single button, artists study for years to understand both the concepts behind the subject and the software packages needed to produce their images. An image can be modified, or artistically altered at any point during it’s creation and furthermore, it is standard practice for this to happen. To understand more about the basic lighting systems in 3DS Max/Mental Ray, please follow the links below:

3DS Max/Mental Ray: Basic Final Gather Explained

3DS Max/Mental Ray: Photon Mapping/Global Illumination

References

Van der Steen 2007 Rendering with Mental Ray

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s