PDA

View Full Version : the linear workflow


misterwolfy
05-29-2009, 05:29 AM
Trying to wrap my head around the linear workflow. Perhaps someone can explain this a bit.

From what I have been reading in the forums, photoshop and other 2d graphics programs generally save images to sRGB color space to compensate for our eyes/brain perception of color. While a 3d rendering program such as Mental Ray will expect linear mathematical model for it's input textures.

Does this mean that without tweaking settings in Mental Ray or the "gamma", we should expect a different or incorrect "exposure" result from rendered images of textures produced in photoshop, created to look correct on our gamma 2.2 monitors, and saved as say a .tif or .iff? (quotes indicate I don't know what I am talking about ;))

I have created a test to demonstrate what is my question, linked below.
http://mrwolfy.com/colorspacetest.jpg

What is going on here is I have created a test texture in photoshop. Mapped it to a lambert with only the diffuse value mapped (value of 1). Then rendered it in Maya Mental Ray. Render settings have gamma at 1. I also added a directional light, intensity 1, at 90degrees to the poly surface which holds the texture. The results, visually and in colr samples, the same as in photoshop.

Am I missing something yet?

Thanks for patient readers who take a look at this.

W

noouch
05-29-2009, 09:02 AM
You should have the texture going to the incandescence channel, not diffuse. Also make sure you're rendering exactly the same section of the image. If you can disable filtering for the texture, do that to.


Does this mean that without tweaking settings in Mental Ray or the "gamma", we should expect a different or incorrect "exposure" result from rendered images of textures produced in photoshop, created to look correct on our gamma 2.2 monitors, and saved as say a .tif or .iff?

Yes, it means if you want to render compensating for the monitor's gamma (for example with mi_exposure), you need to compensate your texture maps in the other direction. Some renderers (like maxwell) do this automatically, but most of the time it means you'll have to convert the color space of your image, either in Maya with a Gamma Correct node, or with a batch processing tool like Photoshop.

TheNeverman
05-29-2009, 01:37 PM
Personally, I think it's much easier to setup a lens shader - a MR tone mapper (mia_exposure_simple) to automatically adjust for gamma (adjusting the entire scene at rendertime) - rather than adding a gammaCorrect node to each and every texture/color you create...

If your using any value textures like bump maps or displacement maps - then you just need to go back and adjust for them with gammaCorrect nodes...

digest this:
http://www.floze.org/2008/07/six-tuts-on-light-and-shade-part-i.html

misterwolfy
05-29-2009, 02:16 PM
Thanks for the replies! Nice tutorial.

In theory I think I get the concept of the color spaces. But in practice, at least in this test I am not seeing it yet. So my question remains, why is there no difference between the texture map as saved from photoshop and the mental ray render. I am missing something :(.

http://www.mrwolfy.com/colorspacetest2.jpg

The above file is the same test as rendered through the incandescence channel of a lambert.

here is the scene if anyone wants to peep.

http://www.mrwolfy.com/gamma.zip

Thanks

playmesumch00ns
05-29-2009, 04:49 PM
All you are doing is effectively outputting the original file. Your problem is that you are not gamma-correcting the display as you look at it.

ALL your renders should be viewed with a proper gamma on the display. Depending on your software this may be a function on your display tool, or it may be necessary to burn that gamma into the render.

Try setting the gamma in mental ray to 2.2. You should then see your image appears bright and washed out. If it doesn't that means the renderer's automatically pre-converting your texture for you.

soulburn3d
05-30-2009, 11:16 PM
Personally, I think it's much easier to setup a lens shader - a MR tone mapper (mia_exposure_simple) to automatically adjust for gamma (adjusting the entire scene at rendertime) - rather than adding a gammaCorrect node to each and every texture/color you create...

If your using any value textures like bump maps or displacement maps - then you just need to go back and adjust for them with gammaCorrect nodes...

It all depends on the percentage of gamma corrected maps you will be using. If most of them are already corrected, then it makes sense to use global controls (like the lens shader), and tag the others, or you're using mainly linear images, then it probably makes more sense to adjust the individual maps. Whatever technique will result in the fewest button clicks :) The really sucky part is when you're not sure if a map has already been corrected, since many apps and parts of apps still don't respect color profiles properly. SUch a mess.

- Neil

B4C
05-31-2009, 07:47 AM
Just a quick question, why should the texture go through incandescence and not diffuse?

misterwolfy
05-31-2009, 10:40 AM
I figured it was to get a pure color response from the renderer, without applying shading.

Anyway I think the test does not get at what are the issues with using linear or not. Maybe someone could suggest a simple test that would show us visually why we should use a linear work flow.

TheNeverman
05-31-2009, 03:29 PM
yeah, good point Neil. In my workflow - I be sure to save all my texture images in sRGB.


It all depends on the percentage of gamma corrected maps you will be using. If most of them are already corrected, then it makes sense to use global controls (like the lens shader), and tag the others, or you're using mainly linear images, then it probably makes more sense to adjust the individual maps. Whatever technique will result in the fewest button clicks :) The really sucky part is when you're not sure if a map has already been corrected, since many apps and parts of apps still don't respect color profiles properly. SUch a mess.

- Neil

CGTalk Moderation
05-31-2009, 03:29 PM
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.