Monday, December 2, 2013

My Observations on Linear Workflow within MAYA 2013

So for the past like year or so, ive been confused as hell over using a linear workflow within maya - mostly because of the convoluted way you have to go about it - gamma correcting stuff, playing with color profiles... list goes on. So anyway, after many attempts at it, i pretty much kept away from it, figured they'd have it all fixed up next release... (kinda worked). In the end, the benefits of working in a linear workflow finally drew me back in - mostly the amount of flexibility it offers you when you're doing levels and color adjustments in post. Its pretty much like having a RAW file as opposed to JPG for those of you who play around with digital cameras. LWF gives you alot of flexibility and as such makes it easier to get realistic renders more or less.


So anyways there is for my purposes, 2 methods of using a linear workflow, one that seems to be what everyones accepted and use - where you have to gamma correct all your swatches. And the other i came up with because i cant stand having to gamma correct swatches; on account of i use swatches more, and hence would prefer just gamma correcting my textures. So to get my head around it heres the test i did: I saved out 3 scenes, 1st scene i left alone at default and rendered in 8bit tiff without any color management. 2nd scene i used mayas proposed linear workflow and gamma corrected swatches. 3rd scne i used my own linear workflow and gamma corrected only my textures. So anyways heres the setup for the 2 methods:


METHOD 1: (Basically what it tells you to do in MAYA HELP)

1:Render Settings Color Management:
               INPUT PROFILE :SRGB
               OUTPUT PROFILE :LINEAR

2:Render View Color Management: (Note also make sure to click DISPLAY>32-bit Floating Point)
               IMAGE COLOR PROFILE :LINEAR
               DISPLAY COLOR PROFILE :SRGB

3:Gamma Correct all your color swatches with 0.455 to get them to work into LINEAR COLOR space

4: In Render Settings:
                IMAGE FORMAT: OpenEXR
                DATA TYPE: RGBA (Float) 4x32Bit

                                                                   METHOD 1 RESULTS: 

As expected things dont look right before gamma correction

Gamma correction of 0.4545 really saturates and darkens things up and highlight intensity are lost
CONCLUSIONS: This is unpredictable - what i see when setting up my scene in SRBG space and the result are not the same even when gamma corrected. Although in the ballpark and obviously i can adjust until i get the same result on account of the excess data a linear workflow offers, id like something closer to what i had in maya, hence why i dont use this method at this time.

METHOD 2: (Basically what kinda makes sense to me)

1:Render Settings Color Management:
               INPUT PROFILE :LINEAR
               OUTPUT PROFILE :LINEAR

2:Render View Color Management: (Note also make sure to click DISPLAY>32-bit Floating Point)
               IMAGE COLOR PROFILE :LINEAR
               DISPLAY COLOR PROFILE :SRGB

3:Gamma Correct all your file textures and ONLY file textures with 2.2 to get them to work into LINEAR COLOR space

4: In Render Settings:
                IMAGE FORMAT: OpenEXR
                DATA TYPE: RGBA (Float) 4x32Bit

                                                                   METHOD 2 RESULTS: 

As expected things dont look right before gamma correction but the highlights are there
 
Exactly what i would expect, highlights are there and colors are looking right, and now i have greater room to play with the 32-bit format


CONCLUSIONS: This is what i expect, i get a very close result to my original render from maya - and can now play around and change things up with the greater flexibility LWF offers with its 32-bit files. Hence this is the method i currently use. The way i see it, i use alot less actual file textures than i do swatches most of the time, and hence would much prefer gamma correcting the file textures i bring into maya instead of every freakin color swatch i touch when setting things up. I think Method 1 with no post-gamma correction comes pretty close to what you'd want, however you end up losing alot in the highlights, but if i had a scene with lost of file texture - i'd certainly use it.

SIDE NOTE: For some reason i dont know ( and if you do plz comment here, email me, msg me) - The 'Display Color Profile in the render views color manager, seems to be working in reverse: IE if im expecting a linear file - and hence set the "Image Color Profile" to LinearSRGB, and wasnt to see things in SRGB while i work, and hence set the "Display Color Profile" to SRGB - it actually shows me the freakin' Linear non gamma corrected output (ie not displaying in SRGB space - not sure if this is a bug). But it shows me the SRBG version when i set the "Display Color Profile" to Linear SRGB - ie what i want, but the freakin things reversed. If anyone else runs into this lemme know plz. Also If im doing something wrong here, or ive stuffed up somewhere plz lemme know - coz i myself am kinda new to this and so use these methods as you see fit. Cheers.

UPDATE: Finally figured out why the above was happening. If you have any kind of lens shader attached to your camera - ie mia_exposure_photographic/mia_simple... then you will have the issue stated above. Reason being is that the exposure nodes gamma correction (by default at 2.2) is being countered by the display color profile when it is set to linearsRGB. As far as how this affects your workflow - as far as final batch renders are concerned, leave the exposure node lens shaders gamma correct at default - 2.2. Just live with the fact that you need to switch the display color profile to linear in the render view when making test renders in order to see your image looks like in sRGB space. If you want to see what the linear view will look like when you batch render, then just set the color profile in the render view to sRGB (yeah the exact opposite). Your batch renders will turn out fine if you leave the gamma correction of 2.2 on the lens shader alone (setting it to 0.455 actually makes things worse in the render view - ive no idea) and then you can take your renders and goto photoshop (image>adjustments>exposure>gamma=0.454) for gamma correction as per usual.

Much love to Lester Banks for this great script for automating connecting up Gamma Correction Nodes, Works Like a Charm : LINK

Final Comparison

No comments:

Post a Comment