Adding AO darkening without mangling scene referred colour space?

Over the past few weeks I have been diving headfirst into the world of colour grading and related things. Phew… I didn’t even know how much I didn’t know. I’m not aspiring to be an expert any time soon, but I’m at least trying to avoid doing things totally wrong. I’d love it if anyone could point me to an introduction, not on the basic theory (because I’ve found a lot of that) but on the practical side of what to actually DO.

If anyone else is going along the same path, these may be useful for at least understanding the principles, even if they don’t help a newbie like me know what to do with that information:


http://mikemost.com/?p=299#more-299

But my question here is more specific. I get the basic idea that using certain compositor nodes, like mix->multiply, will disrupt the image having proper scene referred colour space, and colour grading should be done with the Color Balance->ASC-CDL node. Also that I should be using EXR for intermediaries, and all that.

So if I have an AO pass that I want to use to darken my rendered image, how do I go about doing that correctly? The workflow I’m used to is jsut multiplying the image by AO, and Bob’s your uncle. Should I just be doing it that way, but only as the last step after all other colour grading? Or am I missing something.

Thanks! I hope this is clear. If not, I’ll show what I’m trying to do with nodes.

The general logic for figuring out if something messes up the linear relations is to find out what kind of arithmetics is involved. Basically there are only two operations which have a physical equivalent and these are add and multiply. Add means mixing/adding lights (like add more lamps to scene), multiply means absorbtion (some light is lost) or changing intensity (make lamp stronger/weaker). Subtract and divide are their complementaries, so also work, except you can’t actually subtract lights in reality (there is no negative power). Everything else that involves power functions, exponents etc are nonlinear operations and should be avoided until you start working in display referree space (grading for specific output). Nonlinear mix modes and ops include screen, gamma and the like.

ASC-CDL node gives interoperability between different applications. You can write down the numbers, punch them in somewhere else where CDL op is available and result should match (given matching inputs). But keep in mind that setting gamma at something else than 1.0 will break your scene-linearity. When already in grading phase, it does not matter though. Some other color nodes might do internal clamping or other funky stuff, which is the reason they are not always recommended.

AO is basically an element for grading the image, it has nothing to do with actual light. So I would throw it in after all the stuff that needs proper linear values is done (combining other render passes for example). But as the result is what matters and compositor has free will to do whatever is necessary, nothing can stop you from using AO pass for simulating dirt/grime in diffuse color pass. I wouldn’t worry too much about preserving all the linearity when you already feel the need to do something with AO. And yes, multiplying with AO pass is the way to go.

I see. That does make sense. It did seem odd that I was hearing that multiplying would break the linearity, but I’m at the point where unless people with more knowledge than me explain their reasoning (like you did) I kind of have to take their words for it. I appreciate the response!

With the nuances of colour, I am kind of like a cadet in the seat of a fighter jet: I’ve been told what all of these controls DO, but figuring out what I should actually do with them is another step entirely XD

Of course, it’s further complicated by the fact that I am partly colour-blind (red-green/deuteranomaly) but that shouldn’t mess up how I see most aspects of colour-mapping curves, just actual balance and tweaking of RGB separately. At least, I think…

A nice source about blending modes in Photoshop with lots of relevant information and actual equasions:

Merge modes in Nuke:
http://help.thefoundry.co.uk/nuke/8.0/content/user_guide/merging/merge_operations.html

In most softwares similarly named modes act the same, but be aware, some modes might not. Any compositing software worth their weight should have the actual equations explained somewhere, I highly recommend finding them out.

Thank you very much!