Linear workflow is hurting my brain

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 06 June 2013   #1
Linear workflow is hurting my brain

I am missing some basic fundamental , but can't quite work out what it is. Just when I think I've got it figured out, some detail comes along and screws up my whole way of thinking. I'm dying here.

Let me list my assumptions based on hours of trying to figure this stuff out. Tell me where I am wrong please.

I use the terms darken and lighten to mean the midtones.
Applying a gamma of .4545 darkens an image. Verified with Photoshop and Maya's gammacorrect node.
Applying a gamma of 2.2 lightens an image. Verified with Photoshop and Maya's gammacorrect node.
So basically, higher values of gamma are brighter and lower values are darker. Yes, I need to assure myself of this because this is how confused I am right now.

According to wikipedia and others, encoding is .4545 and decoding is 2.2. A raw linear image (lets say an image taken with a camera) has a gamma of .4545 applied to it (encoded in the camera) so as to display correctly on a monitor with 2.2 gamma.

So the image is currently at .4545 of linear before involving Maya. How does applying another .4545 via gammacorrect in Maya put it back to linear? I can see that a .4545 gammacorrect node in Maya is making it darker, so the node knows that today isn't opposite day and is working as intended.

The correct way to get it back to linear SHOULD have been to gammacorrect it with a 2.2 gammacorrect node and not the .4545, right? right?

I feel so stupid.

So after all my rambling, what I want to know is how does .4545 (camera encoding) * .4545 (Mayas correctnode) = 1 ???
Old 06 June 2013   #2
Your PC monitor is in sRGB color space which means in you are not viewing your image in 0.454 but in 2.2.
For example when you work on your image in Photoshop you work in gamma 2.2 (SRGB color space) and then you save it in png, jpeg, or what ever...That image of yours is now nice and just right brightness and color in 2.2.

If you in Vray, for example, in color mapping increase gamma value from 1 to 2.2 it works globally on everything. So now you put your image (already saved form PS in 2.2) on your model (increased gamma from 1 to 2.2) it will not look as in will be too bright or washed out.
That happens because Vray "thought" you imported image in gamma 1, which you increased on gamma 2.2 but you actually importing PS image already in 2.2 not 1 as Vray was expecting. That means that on your image which already was in 2.2 form PS is added more gamma and now you basically have an image with gamma higher then 2.2.

So with Gamma correction node you lower gamma of your image only with value of 0.454 (basically convert your image which was 2.2 form PS on 1 in Maya) so when you increase in vray color mapping gamma globally from 1 to 2.2 the texture will also now have correct 2.2 and not higher then 2.2.

Hope i was clear enough.
Old 06 June 2013   #3
Thanks for the reply. But it wasn't what I was looking for.
I did figure it out though.

The gammacorrect node in maya is not a node that corrects gamma. It compensates gamma. Putting .45 .45 .45 is actually changing the gamma with 2.2

Seeing .45 .45 .45 darken the image in maya led me to believe that .45 gamma darkens the image. But really, .45 lightens the image and that is the gamma that is applied to a liner image to put it in sRGB space. Then the monitor with 2.2 gamma correctly displays the .45 image by darkening it.

Somewhat my fault for not understanding the math, but whoever wrote the gammacorrect node musta thought it funny to make it do the exact opposite of what it says. Whatever.

Now I just feel stupid for using maya. Again.
Old 06 June 2013   #4
First off, you shouldn't be using a gamma-correct node if you're using Color Management, which you should be if your doing a linear workflow. Here's the way you should set up for Linear Workflow, based on a 8-week class I took from Zap Anderson, the guy who created the MR Arch & Design material at Mental Images (the creators of Mental Ray) and who should know.

You probably already know a bunch of this, but I don't know what you know & what you don't, so I'm going over the whole thing.

First, open Maya preferences:
Under Settings, the Rendering tab, change Render View Image Format to "32-bit floating-point (HDR)".
Now restart Maya for this to take effect.

Now, in the Render Setting window, Common tab:
Turn ON Enable Color Management, Input Profile set to "sRGB", Output Profile set to "Linear sRGB". (What this does is automatically adjust the gamma for every image file you bring in to .454545, as long as the Color Profile for each image file is set to "Use Default Input Profile". When Color Management is enabled, the default input profile is now gamma corrected automatically. sRGB gamma going in, Linear sRGB gamma coming out. This works for all images, but it doesn't work for straight color. If you use a simple color for a shader or a color ramp or whatever, you'll still need to use the gamma correct node)
Image format is set to: OpenEXR
Under Render Options, turn OFF "Enable Default Light".

Still in the Render Setting window, go to the Quality tab:
Open the Framebuffer section and select: RGBA (Float) 4x32. 32 bit floating point RGBA is the only wat to get a linear workflow. OpenEXR will save all this data.

Now open the Render View, and under the Display menu select "32-bit floating-point (HDR)". Still under the Display menu, select "Color Management..." This will open the ViewColorManager in the Attribute Editor.
Image Color Profile should be set to "Linear sRGB".
Display Color Profile should be set to "sRGB".
This takes the "linear" gamma correction and changes it back for display purposes. Linear sRGB going in, sRGB coming out.

You should be working in real world scale and all of your lights should have their falloff set to quadratic (you'll need ridiculously large values for you light intensity: like 100,000 or larger).

Here's what you've done: You've set up all your image files to be automatically gamma corrected for linear workflow, but they won't display properly on your monitor, which uses exponential gamma correction. But, you've set up the Render View to correct the gamma back to a display-friendly gamma so that your renders will display properly.

You've set up the framebuffer and image format so that you can capture all the extra data your renders will now contain.

And you've set up photometric lighting, so that the lighting data will be correct.

Hope this helps to explain the fundamentals of Linear Workflow.
Old 06 June 2013   #5
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 03:01 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.