Wednesday, November 19, 2008

Good example

I recently came across a great example of a situation that can happen when compositing that I thought I'd point out.

Basically, the example shows a limitation when working with RawLighting passes. The compositing math for this example is being done correctly, but because of the anti-aliasing you cannot composite these passes back together again and get the same image that you would get out of your 3d package in one pass. In some cases you can get away with having this problem in your comp and not see it. This thread shows a great example of the problem really showing its ugly head.

There is a work around that would allow you to create a raw lighting pass (if you wanted one) that would multiply over the diffuse pass and create the indentical output from your 3d package. To do this you need to render a lighting pass (textures and lighting together) and a diffuse pass. You could then divide the lighting pass by the diffuse pass which will give you a RawLighting pass. The difference between this RawLighting pass and if you rendered it from your 3d package is that this method will take the anti-aliased color differences into account. If you then color correct this and multiply it back over your diffuse pass you will get the exact same output as your 3d package would do.

Why would you want to do this? It is less efficient. Your basically rendering extra passes and using extra nodes in order to create the pass you just rendered anyways. You might consider doing this if you wanted to tweak the diffuse pass and have it automatically update down the chain reguardless of lighting changes. You might also want to work this way just cause its easier to actually see your lighting seperate from your textures. For lighting passes this workflow is probably more trouble than it is worth. But it does work.

Anyways, I thought the example was interesting and good to know about.


Unknown said...

Merry Christmas! Tim :)

Felipe Budinich said...

You sir, just made my morning (and probably some more during this week).

We've got to animate a lot of furry animals dancing inside a nightclub.

Of course getting the light and sound to coordinate, and several other atmosferic effects is going to be a pain, so we settled for channel lighting.

Render times will be longer, but we will have to render the lighting pass way overexposed just once at 32 bit, and we can control exposure later interactively. Piece of cake, or so we tought.

Then, we did some test renders, and yes! we were able to interactively control the light like we planned.

But antialias owned us, there was just too much saturation and hue contrast jumping around.

So, dude, seriously, you just not only made this morning. I think i got my mornings back for the rest of the week.