Join Aaron F. Ross for an in-depth discussion in this video Understanding 3ds Max gamma correction, part of 3ds Max: Advanced Lighting (2017).
- [Instructor] To begin our chapter on exterior day lighting, we must first take a look at gamma correction, in 3ds Max. Gamma correction is essential to all photometric workflows, to prevent rendering issues, such as washed out, de-saturated textures. Here's an example of a rendering, in which gamma correction is disabled. And, as a result, the textures are rendering too brightly. When gamma correction is enabled, the textures are displayed correctly. 3ds Max gamma correction has evolved, and changed numerous times, over the years.
This course is produced in 3ds Max 2017. In 3ds Max 2015, gamma correction became mostly automatic. But, we still need to understand how it works, to avoid possible rendering issues. The gamma correction preferences, in 3ds Max, can be found in the Customize menu, under Preferences, in the Gamma and LUT tab. LUT stands for look up table. There's also a short cut, to get here a little bit quicker. We can go to the Rendering menu, and, simply choose Gamma/LUT Setup.
As we saw, in the example, the direct lighting is not affected by the state of gamma. Standard, and photometric lights are internally gamma corrected. And it doesn't matter whether gamma is on, or off, for the purposes of direct illumination. But, this switch does affect bitmaps, which, in turn, affects global illumination, or final gathering. Gamma settings interact with the display, through the view ports, and any rendered frame windows, or virtual frame buffers that you may have open.
Gamma also interacts with exposure control, which we'll look at, in a little while. And, finally, gamma also affects file handling, how a file is interpreted when it's loaded, or how it's encoded, when it's saved out. Gamma correction absolutely must be enabled, if you're using exposure control, or if global illumination, or final gathering is enabled. For older, non-linear workflows, that don't use those features, then gamma correction can be on, or off, and it won't affect the rendering.
So, gamma correction is always enabled, for new scenes. When you start up 3ds Max, gamma correction is always on, now. I do recommend that you leave these settings all at their defaults. But, if you do change any of the gamma correction settings, you'll want to close this dialog, close any open windows, and re-render. Let's go back into that dialog, and look at the settings, in a little bit more detail. This value, here, is the display gamma value. It's here so that you can adjust for any display device that doesn't conform to a standard 2.2 gamma value.
You won't need to change this value, if you're using a standard Windows desktop computer. Also, the value is stored in your User Preferences, and not in the scene. So, if you change this, then it will stay that way, forever, until you change it to something else. Let's also talk about file gamma. Files are handled automatically, when gamma correction is enabled. And, that means, that if the file has a gamma setting, within it, in its file header, then 3ds Max will use that value.
But, if there is no gamma setting in the header, then 3ds Max analyzes the file, and its bit depth, and interprets the gamma, according to a set of automatic rules. The input files must have correct interpretations. If the files are interpreted incorrectly, then you might have problems, with contrast, or global illumination. Remember that photometric lights are in a linear space, and, so, all textures must also be in that linear space.
And, if they're not, they need to be converted, to linear. HDR formats, such as EXR, are interpreted as linear. Standard formats, such as a PNG, or a JPEG, are interpreted as a non-linear file, that has an embedded gamma of 2.2, unless the file header says otherwise, so, a PNG file might have a header that specifies a different gamma. The non-linear formats, such as JPEG, are automatically converted to linear space, to match the photometric lighting.
If you need to specify an incoming file gamma, other than the default, then, you can do that, when you first load in the file. To illustrate, if I go into Rendering, Environment, I can click on Environment Map, and choose Bitmap, double click on that, and, in this dialog, I have the ability to override the gamma, of the incoming file. So, if 3ds Max is not correctly interpreting the file, then, I can specify an override value for the gamma, here.
But, we only have this control, when we first bring the file in. Once it's in the Bitmap node, in the Material Editor, there's no exposed gamma value, there, for us to adjust. All right, I'm not actually going to import this, I'm going to cancel out of these dialogs. And, so it is with output, or rendered files, 3ds Max automatically encodes those files, according to their format, and bit depth. HDR formats are saved as linear, and Standard formats, such as PNG, are saved as non-linear, with an embedded gamma of 2.2.
And, once again, if you need to, you can override that. Let's go into the Render settings. And, when you specify the output format, you can override the gamma. Let's go to this little Browse button, next to the Save File check box. And that launches the Render Output File dialog. Down here, we can specify a different gamma from the rendered frame window. So, keep in mind, that what you see, in your view port, and rendered frame window, will not match the file, that you're saving out. You'll need to load that file into 3ds Max, or an external app, to check it.
OK, I'll cancel out of that, as well. And, finally, if you do need manual control over the gamma, in 3ds Max, there is a way to do that. You need to find a certain ini file, let's take a look. Inside the current user's profile, there will be a hidden folder, called App Data. Inside that hidden folder, under Local, Autodesk, 3ds Max, version number, ENU, and, then, language, in this case English-US, inside a folder called defaults, and, finally, inside a folder, whose name corresponds to the current tool options, in 3ds Max, and, this is just the default one, labeled Max, inside there, you will find CurrentDefaults.ini.
Let's open that up, I'll double click it. And scroll down, near the bottom, just to show you that we have some settings for gamma, here. And, we can override the default global input, and output, here, if we need to. We could also set gamma to be off, by default, if that were our preference. Very good, that's how gamma correction works, in 3ds Max.
- Photometric lighting and gamma correction
- High dynamic range and exposure control
- Global illumination
- Exterior daylight
- Image-based lighting
- Atmospheric effects
- Geometric backdrops and self-illumination
- Hiding the background for compositing
- Interior daylight
- Studio soft lighting
- Importing photometric data
- Light and shadow exclusion
- Mapping light with Projector Map
- Lens Effects