Aversis Vray for 3D Studio Max Tutorials
 

Vray Tutorials

Please don't translate or copy these tutorials elsewhere. I don't like the tutorials to float around in 10 different versions and places on the net. Feel free to link to this page of course! (see also Terms of Use)

This is a free tutorial! Please click on the Paypal donate button if you want to support this site and help me creating new tutorials.

Back to Vray tutorials page

Gamma 2.2 setup (or my way of using the "linear workflow") [1]

Page 1 - Page 2 - Page 3
Before you start

This tutorial deals with gamma correcting your images in Vray. There has been a big fuzz about this, you might also know the term LWF (=linear workflow). I will try to shed some light on this subject, and give you MY workflow. So I'm not telling that this is the way to go, it is just how I use it to improve my renderings.

The Vray version used to create this tutorial is Vray 1.50.00. This is the version that requires the hardware lock (dongle) as a licensing system. Please do not email me with questions about this tutorial if you are not using this Vray version, since the answer to your question is most likely that you're using a different version.

Make sure you have basic 3D Studio Max knowledge too, I will not explain every little detail so you have to know how to use Max. For example things like the material editor, creating and manipulating objects, modifiers etc should all be familiar.
 
What's it all about?

To start, I will simply show an example. Also note that this tutorials especially applies when you use GI in your scene.

The image on the right is an interior, with one very large opening. As you can see, there is bright light coming in, resulting in blown out areas around the opening, and very dark regions closer to the camera.

I would like to brighten the image up, so I increase the light strength. Result is even more blown out areas, and still not that bright in the foreground.

An interior with such a big opening should let the light travel much deeper into the scene, no?
Vray tutorial - Gamma 2.2 setup - Click to enlarge
Vray tutorial - Gamma 2.2 setup - Click to enlarge
Gamma 2.2 - wow!

The image on the right is the same as the first one, but I applied a gamma 2.2 curve to it (for example in photoshop you can easily change the gamma of an image). After this conversion, note that there is in fact much more information in the image than you would think at first glance.

Now you probably think: "this image looks flat and washed out". This is because I didn't change anything to the material. The material in the gamma corrected image is in fact much brighter compared to the material used in the first image (the material is also gamma corrected, so it gets brighter). So I adjust the material to be similar for the gamma 2.2 version, render again and apply the gamma 2.2 curve again. That's already better, and now the lighting looks pretty decent, much more what you would expect in an interior scene with such a big opening and only bright materials.
Vray tutorial - Gamma 2.2 setup - Click to enlarge
Vray tutorial - Gamma 2.2 setup - Click to enlarge

So what's happening?

The base problem is simple. Vray and 3ds Max do their calculations in 'linear space'. The vray camera has a 'linear' response to light. This means that it is working in gamma 1.0 space. All this is no problem, but since max and vray are setup to work in gamma 1.0 space, it also assumes that you view the output on a device that also has a linear curve or gamma 1.0...

However your computer monitor is not gamma 1.0 at all, in fact most CRT monitors are by default gamma 2.5! Since we didn't tell max and vray about this, our images are actually displayed much darker!!! (Gamma changes the midtones of your images, it's not simply a brightness control.)

Max does have the tools to specify what gamma our monitor has, so it can counteract for this and display our images correctly - in other words 'brighter'.

 
How do I know what gamma my monitor has?

This is where the problems for most people start. It is different for every monitor, and there is also a difference between CRT and LCD monitors... It is possible to calibrate your monitor with a hardware tool, so you can exactly choose a desired gamma.

Calibrating your monitor is also good for accurate color management. It's never a bad thing to calibrate your monitor to a certain standard. For gamma, this is 2.2 (even though many crt's are by default 2.5).

Although it is recommended to calibrate your monitor to the gamma 2.2 standard, it is not strictly necessary to benefit from this tutorial. Even if your monitor is for example 2.35, using this gamma 2.2 tutorial will still provide good results.
 
Old habits die hard...

When this gamma 2.2 setup first popped up, many people (including me) didn't see the point of using it. This is because we were so used to apply all kinds of tricks and fakes to our scenes to make sure the output looked ok.

For example with interior scenes. There was always a problem that light didn't travel far enough into the scene. Increasing the environment light resulted in very burnt out areas around the window openings. To brighten things up, invisible lights were placed in the rooms, or things like exponential color mapping were invented to remove the burnt out areas. There was also always an extreme color bleed. If you put a red table in the room, the whole room turned red because of the strong color bleed. So we started using desaturation on the GI solution, override the materials with white and use saved ir maps with the red color back in place, etc... In the end, all this adds to the render time but also to the setup time! And while using a physically accurate renderer, we had to trust in all kinds of fakes to make it look real...

Another common problem were hdri maps. On the right are two examples of the same scene lit by the same hdri map. The first one is the old habit, the second one is with the gamma 2.2 setup. The last is how the original hdri map looks like. I think it's clear that the second render looks a lot more like the lighting in the original hdri map, than the oversaturated, high contrast first image. Also note the reflection in the sphere in the first render, it doesn't look like the hdri at all!

The gamma 2.2 setup changes your workflow only slightly, but it makes your life a lot easier!
Vray tutorial - Gamma 2.2 setup - Click to enlarge
Vray tutorial - Gamma 2.2 setup - Click to enlarge
Vray tutorial - Gamma 2.2 setup - Click to enlarge
Page 1 - Page 2 - Page 3
Back to Vray tutorials page