PDA

View Full Version : Linear Workflow Maya 2011


sharktacos
07-30-2010, 09:10 PM
So I've been experimenting with the new color management in Maya2011 and have run into a snag. This first image is rendered out in 8bit linear. Color management is on in the render settings, and input and output are both set to linear. In the render view the color manager is set to image: linear, and display: sRGB. Notice the ugly banding:

http://forums.cgsociety.org/attachment.php?attachmentid=155246&stc=1

Now we have the same thing as above, except I have changed the display to linear, and added an mia_exposure_simple to my camera. Now it looks nice. Since I have no textures in my scene, this works if I turn the color management off too since all I need is to render at 2.2.

http://forums.cgsociety.org/attachment.php?attachmentid=155247&stc=1

If I render at 32bit float then the color manager will display fine in the render view:

http://forums.cgsociety.org/attachment.php?attachmentid=155248&stc=1

But it seems that at 8bit it has severe banding, as opposed to the mia_exposure_simple.

Is that a bug?

sharktacos
07-30-2010, 09:33 PM
If I add a color map the banding is even worse. I have the default input profile in the render settings set to sRGB to ungamma my texture. The render view color management is set to display sRGB. Very ugly banding

http://forums.cgsociety.org/attachment.php?attachmentid=155253&stc=1

Here we see the result using mia_exposure simple instead. It looks fine.

http://forums.cgsociety.org/attachment.php?attachmentid=155252&stc=1

ndeboar
07-31-2010, 01:26 AM
That's pretty lame. What I reckon it's doing is quantizing the image to 0-255, then doing the final 2.2 gamma correction. It should gamma correct before quantizing. Make me wonder how much testing they do before they release each version of maya.

BTW: If your doing any post work, you generally want to keep things linear, and then do your 2.2 gamma correct at the end of your comp. In that case, 8bit never cuts it, you'll need to go 16 or 32 bit.

mr Bob
07-31-2010, 02:08 AM
This first image is rendered out in 8bit linear.

Why on earth would you render a 8bit image as linear as it defeats the whole purpose of rendering a linear image for comp

sharktacos
07-31-2010, 03:56 AM
Why on earth would you render a 8bit image as linear as it defeats the whole purpose of rendering a linear image for comp

Because Maya (and all 3D software) calculate lighting in linear color space. Rendering linear will give you accurate decay on lights, whereas rendering in sRGB gives inaccurate (=bad) results. This is true irrespective of whether you render in 8bit or 32bit. From the perspective of lighting in CG, the purpose of a linear work flow is correct physical response from lights and materials.

Rendering in 32 bit gives you added depth and flexibility in comp. That's awesome, but this should not be confused with a linear workflow which can be done in 8bit as well. While 32 bit is preferable, there are cases when one cannot render in 32bit because of file size limitations on a project. There is however no good reason to not render linear all the time.

ndeboar
07-31-2010, 05:17 AM
While 32 bit is preferable, there are cases when one cannot render in 32bit because of file size limitations on a project

Check out exr 16bit half with zip compression. I find its SO good the file sizes are usually smaller than a uncompressed 8bit tiff.

sharktacos
07-31-2010, 06:28 AM
Check out exr 16bit half with zip compression. I find its SO good the file sizes are usually smaller than a uncompressed 8bit tiff.

That's interesting. Can you explain what you mean by the zip compression part? I don't recall seeing that as an option in Maya, but perhaps I overlooked it...

ndeboar
08-02-2010, 05:44 AM
oh that's right, mental ray doesn't support exr compression (which is actually a core feature of exr, dont know why they dont).

Do a search here, someone has written a mental plugin that gives you compression options.

sharktacos
08-02-2010, 08:22 AM
oh that's right, mental ray doesn't support exr compression (which is actually a core feature of exr, dont know why they dont).

Do a search here, someone has written a mental plugin that gives you compression options.

Good grief. Yes, of course exr compression doesn't work. That way it matches with the 8-bit color manager that doesn't work either :argh:.

I didn't find any threads here, but I did find this plug-in by deex (http://www.creativecrash.com/maya/downloads/scripts-plugins/c/deex-shaders-pack-mentalray-shader-re-writed-for-pass)that looks like it does the trick. It also comes with re-writes for lots of MR shaders so they actually work with passes. Very nice.

djx
08-09-2010, 02:59 PM
If you are happy storing linear data in an 8-bit image, then I'm probably not going to convince you that you are lowering the quality of your images by doing this. But you are. ;)
I'll refrain from a detailed explanation, but briefly, an 8-bit image can only store 256 levels of gray per channel and by choosing to use linear 8-bit you are not storing enough data in the shadows and wasting it in the bright areas. There is some (maybe too much) info here (http://mysite.verizon.net/spitzak/conversion/whysrgb.html).

David

sharktacos
08-09-2010, 04:56 PM
If you are happy storing linear data in an 8-bit image, then I'm probably not going to convince you that you are lowering the quality of your images by doing this. But you are. ;)
I'll refrain from a detailed explanation, but briefly, an 8-bit image can only store 256 levels of gray per channel and by choosing to use linear 8-bit you are not storing enough data in the shadows and wasting it in the bright areas. There is some (maybe too much) info here (http://mysite.verizon.net/spitzak/conversion/whysrgb.html).

David


Generally I would prefer to work in higher bit rates. Nick's suggestion of using 16 bit half with PIZ compression is a good one. Unfortunately Maya does not have this option (from what I understand it will be there in a future release). I looked into the Deex shader that allows one to write out PIZ compressed OpenEXR files from Maya but the setup seemed a bit too cumbersome. So I'm planning on rendering out uncompressed EXR's from Maya and then converting them to compressed PIZ ones in Nuke which is pretty easy to do.

I still do think Maya needs to fix this bug in their display options.

djx
08-09-2010, 10:41 PM
But its not really a bug. Its just a limitation of 8-bit data storage. If you render linear data to an 8-bit file and then display it with an sRGB LUT you'll most likely see banding in the shadows. If you render with mia_exposure gamma=2.2 then although you may still have the output set for linear, you are actually storing sRGB data, so the display (without the LUT) looks correct, with no banding.

David

ndeboar
08-09-2010, 11:27 PM
that's my feeling too, but there still seems to be a lot of love for 8bit:
http://forums.cgsociety.org/showthread.php?f=87&t=907836

djx
08-09-2010, 11:46 PM
I'm not saying that people should drop 8-bit and do everything in higher bit depth (or float). Just be aware of how the data is stored. 8-bit files are best suited to data stored as sRGB, since it allows us to store more dark shades where we need them, and less bright shades, where we dont notice they are missing.

So I'm saying, if you want to store images in an 8-bit format (for compositing or whatever reason) then it is best to stick with sRGB data, which implies gamma=2.2

Now the frustration for people trying to use maya's passes system is that they are unable to apply this gamma correction to the passes. From a linear workflow point of view it does not make sense to apply gamma to these passes, but from the point of view of an artist simply wishing to take advantage of the pass system and continue to work in 8-bit (however "incorrect" that may be), not being able to apply gamma or exposure to the passes is a limitation.

David

sharktacos
08-10-2010, 12:45 AM
But its not really a bug. Its just a limitation of 8-bit data storage. If you render linear data to an 8-bit file and then display it with an sRGB LUT you'll most likely see banding in the shadows. If you render with mia_exposure gamma=2.2 then although you may still have the output set for linear, you are actually storing sRGB data, so the display (without the LUT) looks correct, with no banding.

David

All I can say is that it displays without any banding with mia_exposure simple, and that same 8-bit render rendered out at 1.0 displays without banding in both Nuke and AE just fine when converted to sRGB space. Maya's 8-bit display option should do the same thing.

djx
08-10-2010, 03:38 AM
and that same 8-bit render rendered out at 1.0 displays without banding in both Nuke and AE just fine when converted to sRGB space
Ok, well if that is true, then maybe it is a bug. I have not noticed it though. I'll do some tests.
What iteration of maya 2011 are you using?

David

sharktacos
08-10-2010, 05:22 AM
Ok, well if that is true, then maybe it is a bug. I have not noticed it though. I'll do some tests.
What iteration of maya 2011 are you using?

David

I'm using Hotfix 2

sharktacos
08-10-2010, 09:46 PM
I take it back, I see the same banding in Nuke and AE too. It only shows up in very high contrast images so I had missed it in earlier tests.

The only option that does not get banding in 8bit linear is the mia_exposure_x.

djx
08-11-2010, 04:43 AM
In 8-bit images there are only 256 steps. If you spread these evenly from black to white (linear) then the difference between the steps in the shadows is quite obvious as banding. And in the brights it is hard to see the difference between the steps at all. In sRGB the use of those steps is skewed (by the gamma curve) so that more are used for storing dark colors, and less for brights. this means much less chance of banding being noticeable.

David

CGTalk Moderation
08-11-2010, 04:43 AM
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.