Jump to content

gamma correction


cspears2002

Recommended Posts

I'm trying to composite a sign I built in Houdini to a still of a building. I thought the comp was almost done when a colleague introduced me to the concept of gamma correction. In order to drive the point home, he added the Gamma parameter to my Mantra node and set it to 2.2. In my COP network, I used two Gamma COPs to set the gamma for the sign and the plate to 0.45. Unfortunately, I need to redo my comp now! Can someone give me some pointers? I seem to have trouble getting the colors right.

At the end of my COP network, I use another node to boost the gamma back to 2.2. My ultimate goal is to render out the final sequence as a jpg sequence and then use Quicktime Pro to convert the frames into a quicktime movie. Then I can burn the movie to a dvd for my demo reel. Theoretically, the movie should look fine if played on a television because it should convert the gamma back to 0.45. What if I want to play my movie on a laptop instead? Won't the image be to bright? Basically, I want the image to look good on a wide variety of playback devices. How can I accomplish this?

I attached my hip file and the jpg that I'm using as a plate to this post. I tried to attached a rendered out sequence of the sign with the 2.2 gamma, but I couldn't attach the zipped folder for some reason.

chris_sign_gamma_v01.hipnc

post-1834-1241243805_thumb.jpg

Link to comment
Share on other sites

Hi there,

if your render goes to compositing (what is most common case), then the output gamma from mantra should stay on 1.0. But your display (in mplay and halo viewport), should be set to 2.2 (or 1.8 depending on your output device), but 2.2 is a good assumption. Best would be a lut for sRGB device, but gamma correction is a good approximation.

Any plate from jpegs or photo from a digital camera which was not a raw file, should be converted to gamma 0.45 *before* compositing (unless it's linear already). The same goes for any textures for Mantra, they should be linear, which means that quite often they should be corrected (gamma 1/2.2).

Then, just before delivery, convert your output (from halo/nuke/afx) to 2.2, so seeing it without lut correction reasambles what you saw with it. Don't use jpeg for anything but preview. Pngs, tifs, tgas.

In short, any processing or postprocessing should happen on a linear files. Mantra outputs linear files, what is good. Deliver it linear textures and its output will be correct for compositing. Compositing also should happen with linear files, so some of the files we use daily should be converted to linear. sRGB (or any other color space) goes at the end of the process, just for delivery of files according to target device.

cheers,

skk.

Edited by SYmek
Link to comment
Share on other sites

Hi there,

if your render goes to compositing (what is most common case), then the output gamma from mantra should stay on 1.0. But your display (in mplay and halo viewport), should be set to 2.2 (or 1.8 depending on your output device), but 2.2 is a good assumption. Best would be a lut for sRGB device, but gamma correction is a good approximation.

Any plate from jpegs or photo from a digital camera which was not a raw file, should be converted to gamma 0.45 *before* compositing (unless it's linear already). The same goes for any textures for Mantra, they should be linear, which means that quite often they should be corrected (gamma 1/2.2).

Then, just before delivery, convert your output (from halo/nuke/afx) to 2.2, so seeing it without lut correction reasambles what you saw with it. Don't use jpeg for anything but preview. Pngs, tifs, tgas.

In short, any processing or postprocessing should happen on a linear files. Mantra outputs linear files, what is good. Deliver it linear textures and its output will be correct for compositing. Compositing also should happen with linear files, so some of the files we use daily should be converted to linear. sRGB (or any other color space) goes at the end of the process, just for delivery of files according to target device.

cheers,

skk.

Ok, thanks for the clarification. I compared your method and mine, and I think I'm on the right track. BTW, converting plates and textures to gamma 0.45 before composiiting sounds like a really good idea. Does Houdini have an utility that can do this? I heard there is an utility that will covert a texture map to a .rat file and add the 0.45 gamma. Is there one that will work on plates as well?

Link to comment
Share on other sites

Ok, thanks for the clarification. I compared your method and mine, and I think I'm on the right track. BTW, converting plates and textures to gamma 0.45 before composiiting sounds like a really good idea. Does Houdini have an utility that can do this? I heard there is an utility that will covert a texture map to a .rat file and add the 0.45 gamma. Is there one that will work on plates as well?

if you are using COPs then you can convert your plates to linear space by adding a gamma COP, set that to 0.4545 and then use a rop COP. You could wrap that up into an HDA to quickly output linear plates. Or if you are using a separate comp program, ie shake then just add a gamma node after your file In node and set it to 0.4545 followed by a file out.

Link to comment
Share on other sites

if you are using COPs then you can convert your plates to linear space by adding a gamma COP, set that to 0.4545 and then use a rop COP. You could wrap that up into an HDA to quickly output linear plates.

Since this is a pretty common thing to do, you can also specify the gamma and any LUT in the Composite ROP (and ROP File Output in COPs). If this is always your default, you can make them permanent defaults on by RMB clicking on the gamma or LUT parm and selecting "Make Current Value Default".

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...