View Full Version : Multipass shadow problem

11 November 2005, 09:48 AM
I get a very tiny but annoying hairline gap in my shadows with multipass renders. It's as though the anti-aliasing of the shadow pass and the diffuse pass mismatch and cause a gap. This occurs even with Shadow Correction enabled. The only time it seems to go away is when I enable Separate Lights, but this isn't a practical solution if my lighting consists of an array of lights, as in the attached crop of a garden render. Notice the hairline gap on the left edge of the plant pot. I'm not even trying to be fancy and render separate passes for each scene element, I just want separate passes for the shadows and diffuse.

Anyone know what's happening here? I'm on 9.1 and OSX 10.3.9.

Attached a simple setup with cylinder and plane that shows the problem. At least on my set up it does.

Many thanks in advance!

11 November 2005, 12:12 PM
hi Mustard,
I can confirm it, just tried your scene and get the same result.
Seems like a bug, you could send a message to maxon to let them know.

11 November 2005, 12:19 PM
Thanks moka-j! It was driving me nuts for a while, kept diggin into the manuals wondering what I'd done wrong! Can you confirm that with a fresh scene on your set up as well?

Is there a bug report on Maxon's website?


11 November 2005, 04:45 PM
I had this on a recent multipass render, and thought I hadn't activated the 'shadow correction', but I had, so it must be a bug.

11 November 2005, 05:07 PM
Hasn't that bug been there for a long time? I always render a couple of different blend layers just in case. Diffuse & Shadow, Diffuse, Shadow, Specular, etc. The problem won't appear in these blend layers. My typical minimalistic MP setup looks something like this:

In this setup AO "apply to Scene" should be turned off in render settings. This lets you choose later how to apply it.

11 November 2005, 05:24 PM
Thanks MJV, I'll start experimenting with Blend Layers.

But what if I need to have separate layers for diffuse, spec and shadows? I always find that I need to tweak shadow density and fake blooms and glows with the spec layer for example.

If the problem lies in the difference in anti-aliasing between the diffuse and shadow passes, and the only way to workaround that is to blend them into a single pass, doesn't that defeat the purpose of multipass?

So your saying it's a very old bug that Maxon is aware of? I sure hope they fix it. Multipass is a big selling point!


11 November 2005, 06:16 PM
Not sure but maybe it's just the shadow layer that needs blending. You can still render out layers for everything and see how it goes on a case by case basis. Just render the blend passes for security, then you can decide later what passes to use and how.

11 November 2005, 07:55 AM
I got a reply from Maxon support regarding my problem:
this is a limitation of multi-pass renering that can't be solved
easily as you need to store sub-pixel information in the
multi-pass layers, which can't be done using Photoshop files
(only RLA/RPF/OpenEXR files can store sub-pixel data). to reduce
the problem you can render the image with twice its size and
reduce the maximum sub-sampling of the anti-aliasing to 2x2.
Then you can apply your postwork, then reduce all layers to one
layer and after that shrink the image again to half its size.

Following MJV's advice to use blend channels, I can a acheive a clean comp if I render out a multipass with diffuse, and a blend of diffuse+shadow. By stacking the blend over the diffuse, it's as good as having a separate shadow channel, this time without the annoying hairline. Works on my simple test file so far. I'll try it out on a more complicated scene with light arrays and report my results back here.


11 November 2005, 09:07 AM
Ok tried it out on my scenes which originally displayed the problem, and I can safely say that all gaps in shadows are gone when using blend channels, even when using light arrays. And I still retain the flexibility to adjust shadow density. Nice!

Although I've just noticed another wierd thing, this time with the alpha channel. The Straight Alpha option doesn't seem to work with multipass. Only the RGBA channel produces the correct image (ie: the edges of the rgb aren't anti-aliased). Whereas the diffuse or diffuse+shadow channels produce rgb images with anti-aliased edges (like premultiplied alpha). So it appears that I can't render out a proper multipass image with a straight alpha. Seems there's always a catch...


CGTalk Moderation
11 November 2005, 09:07 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.