Gamma Correction and Poser Pro

This document covers the use of Gamma Correction as it relates to Poser Pro including: What is it, What settings to use, Linear Rendering, Texture Maps, and HDRI.

For an overview of using the features in Poser Pro watch the Gamma Correction video.

 
Download the PDF
 

Gamma Correction is probably one of the most baffling and misunderstood concepts in existence. You will find more written about it than you can possibly need or want to digest, and each author will make their own unique attempt at explaining the “ins-and-outs-and-what-have-yous” when in reality most of us don’t really care, and don’t even realize that we’re affected by it almost every time we turn on a computer. Unfortunately when it comes to creating stellar 3D graphics, the use of gamma correction becomes very necessary, even though an in depth understanding of it does not. Fortunately Poser Pro contains some straight forward options for using Gamma Correction. This document attempts to explain the necessity as it relates to Poser Pro in a practical manner while giving you a basic understanding of the process by which you can produce excellent Gamma corrected images using Poser Pro. In effect we’ve tried to simply as much as possible and keep it pertinent.
For more in depth technical information regarding Gamma Correction we suggest the following resources:

http://www.4p8.com/eric.brasseur/gamma.html
WikiPedia
The PhotoShop CS3 Bible
Gamma Correction as related to PNG
Gamma and HDR

 

Requirements
Poser Pro is required to use the functionality described in this document. Other versions of Poser do not include the Gamma Correction feature set.
   
Okay so what is Gamma Correction?

In a nutshell, Gamma can be explained by saying that the RGB value that you send to your video card is not linearly proportionate to the RGB that your monitor displays. So if you increase the RGB value you send, then the number of photons rocketing out of your monitor and slowly cooking your brain will increase at a higher rate.
We wouldn’t care too much about this except that most likely an image you are trying to view was meant to be displayed on a monitor that was exactly like the one being used when the image was created. This is occasionally not the case and hopefully you have a better monitor than the person that created the image.
Most images on the internet are created for the average PC with a gamma of around 2.2. For some technical information on what the 2.2 means you can visit the links at the end of this tutorial or go <here>. Simply put the image output of one system is not always the same as another and the objective of Gamma Correction is to make every image look the same on every monitor. If an image looks right on your monitor in your web browser, it has probably been gamma corrected and it is non linear.

 
so how much correction is good and why do we need this in Poser Pro?
Well, when rendering in 3D applications, we’re generating synthetic images as opposed to those taken with a camera using an actual light source. This creates some unique challenges. When Poser Pro gives us its output in the form of an image, the RGB value of each pixel is proportional to the number of photons that got to that pixel. This is called linear gamma. Not to be confused with, Linear Rendering which is the process of feeding the render engine texture maps applied to models with no Gamma Correction, rendering them, and outputting an image with no gamma correction. Apples to Apples to Apples. . So the rendered image is sort of flat looking because through Linear rendering, we achieve a true Linear Gamma. This linear or flat rendered image file is what we need to apply Gamma correction to. 
We need to apply gamma correction because while linear gamma is awesome for computer hardware, Humans do not want to see a linear response as it appears unnatural and washed out. The extra gamma applied to images brings out important details and simulates a real world viewing experience. We’re adjusting the luminance of the pixels on a curve instead of in a straight line. Digital photos for example are encoded with gamma correction. So in effect what this means is that Gamma correction makes the RGB values and the luminance of images work for both Human and machine at the same time.
Now that being said we must always try to correct the gamma at the same rate or to the same magnitude. We must do this so that anyone viewing the image on any number of monitors will see the same thing or something at least very similar. So you have that rendered image corrected to a Gamma of 2.2 and you can be pretty sure that most people viewing it will have a system that correcting Gamma at 2.2 or 1.8. Those numbers are different because of the different hardware. The Mac is a different system so, correcting it at 2.2 would yield a different result. So it’s corrected at 1.8 instead so the user sees something similar to what would be on an Intel based machine corrected at 2.2. So really if you don’t want to get into the science of Gamma correction, just think about consistency. Why spend all of this time on an image and 40% of the people that view your web page see it washed out and not matched to a background.
   
but why Linear rendering?

Ok that kind of explains Gamma Correction and Gamma Correction gets me consistency but why Linear rendering? It sounds like it’s not necessary and I can just render anything I want, Gamma Correct it, and it will look cool.

Linear Rendering means that in Poser Pro, Gamma correction is actually applied after Render and should be removed before render. This is because to get the optimal result during the render, we need to “un-correct” any Gamma correction that was baked in to texture maps previously. Remember Apples to Apples to Apples? If you have a texture map that has a Gamma baked into it of 2.2, you’re going Oranges to Apples and the Poser Pro render engine, or Maya’s or XSI’s  is expecting 1.0, and will have to compensate for this. That’s where funky voodoo can go down giving you Oranges to Apples to Kiwis.
Example: Maya, is in a 1.0 gamma space just like Poser Pro. By default Photoshop on Windows uses the <sRGB profile>, and sRGB automatically encodes a Gamma of 2.2 and hence color images out of Photoshop have a 2.2 Gamma setting baked in. These images are “overcorrected” when plugged into Maya (or Poser Pro) which is looking to render images at a 1.0 gamma. Autodesk however provides a specific render node to compensate for this. In Poser Pro we can set this directly on the texture Map node and then adjust your output by Gamma Correcting after rendering. Simply by selecting the option in the render setting on the Poser Render settings dialogue.

 
that brings us to Gamma Correction per texture

So that brings us to Gamma Correction per texture. And NO WE ARE NOT CORRECTING THE GAMMA ON A TEXTURE MAP, we are “un-correcting” it. Let’s assume un-correcting is a real word. We need to un-correct so that we can start with Apples and not Oranges. 2.2 is an Orange and the FireFly render engine is expecting a 1.0 Apple. So again you feed the engine 1.0, it renders with 1.0 and it outputs 1.0. Apples to Apples to Apples and that means Linear Rendering.
No this is very important. If we set the more global Gamma Correction option on the Poser Pro render dialogue to 2.2 we are making the assumption that all of the texture maps we are feeding into the render engine have a baked in Gamma of 2.2. But let’s say you have a texture map that you know the baked in Gamma is 1.8. You can override that global setting from the Render settings dialogue on that texture alone, and then you are telling Poser that the Gamma of that image was 1.8 and it needs to be corrected to 1.0. because we always want to input everything at 1.0.
And again that’s good for machines because FireFly, the Poser Pro render engine, just like Maya and XSI expects this. So does Poser 7 except that Poser 7 does not have the tools to “un-correct” the baked in Gamma settings of the textures like we’re doing her with Poser Pro. Maya gives you nodes to do so and in Poser Pro we allow you to take a more global approach, but allowing you to “un-correct” each texture if necessary.
And this is the WHY. If  you render “non-linear” i.e. with texture maps containing baked in Gamma correction, you are prone to make less accurate computations (that Funky Voodoo  mentioned above) leading to artifacts and so forth. Remember we said that gamma Correction actually took place AFTER the render process? This is because as we mentioned humans don’t like Linear Gamma. It’s flat and ugly. Machines do because it’s easy to compute.
So in essence by performing Gamma Correction at the correct times you can make the process work for human and machine at the same time. So after the render is spit out at 1.0 and the machine is happy, we correct it and make the human happy. We correct it to a specific amount, for example 2.2 because that gives us consistency.
We choose this specific amount based on what our target hardware will be. 2.2 is most prevalent and workable for almost anything, with 1.8 or the standard Mac Gamma being the next.

 

Now that all works great for standard (LDRI) images but what about High Dynamic Range (HDRI) images?

Ok let’s talk about HDRI and exr export. Once again, Linear rendering is good because FireFly, the Poser Pro render engine, just like Maya, XSI, and others, expects this. However, when rendering with HDRI optimized output on, the Gamma Correction applied to the rendered image after render is displayed to you in the Poser UI with that correction applied as soon as the render is finished. Now when you save the HDRI optimized output to .exr format, the image is saved out with the Gamma Correction of 1.0. This is because HDR images and Raw images contain a higher range of data and are edited and composited differently than regular, or Low Dynamic range images. If you save the HDRI optimizes image out to any other format, then the Gamma Correction applied would be 2.2 by default, or whatever you have selected in the Render Settings dialogue of the Poser Pro UI.