Does ray effects not respect render layers?

Hi there,

Can anyone tell me if there’s a way to make raytraced effects respect render layers? What I mean is demonstrated by this .blend

It has two render layers - one containing a blue box and a mirroring object, and one containing only a red box. When I render, both the red and blue box are reflected in the mirror! Am I doing something wrong, or have I run into a limitation of the render layer concept?

BTW, the same apparently happens with refractions, and ultimately I’d like to have separate mirroring objects on several render layers, so making one material non-traceable is not an option. I could render several passes and bring them together in post, but that sort of defeats the whole reason to have render layers in the first place.

ETA: Grr, sub “Do” for “Does” in title. Grammar are my friend!

Indeed I think you would have to render them separately. You can render your blue-Mirror layer (with only layer 1 selected), then select both layers and press the Single button for the Red layer and render again. Or, you could just turn off the Traceable button on the Red cube’s material, which will make it invisible to Ray Traced materials.

Thank you, DichotomyMatt.

I can think of workarounds, such as turning off traceability in this case. Trouble is, for the things I’m planning I need separate pairs of mirrors and objects, one render layer’s mirror should only reflect objects on that layer.

Since it’s an animation I’ll have to do separate movies and then composite or sequence them together afterwards. Which is a pain compared to doing it all at once.

Would it make sense to do a bug report or feature request for this?

Not that I’m ungrateful for the already excellent functionality we do have, but this makes some of the things I have in mind quite hard, and it’s not the largest feature request I can think of.

Ray tracing and shadow buffers are created in a separate pre-process from the rest of the render so, if you have any objects on visible but not rendering scene layers, those same objects will still cast ray traced reflections and shadows on rendering objects in addition to shadow buffers on rendering objects. If you have a problem with that then simply useI key>Layer to move objects to non-visible layers untill you’re ready for them to do their ray traced voodoo or set up- separate scenes for problematic objects. This is the first time I’ve seen anyone view this functionality as a curse rather than a blessing although I do find it annoying from time to time (I usually like it though). This is NOT a bug and was planned by Blender devs making for enhanced compositor flexibility, etc…

Separate scenes with linked objects might be more beneficial in your case.

Separate scenes sounds like a good solution. Thank you for the suggestions and for the explanation - I understand a bit more now.

Now, what I’m really trying to achieve is additive materials. The only way I’ve had any luck with that is rendering the different objects on separate render layers, and then compositing those with additive mix. The trouble is that even the reflections / refractions should add together, and that means reflections as separate renderings so things don’t obstruct each other. Maybe there’s a better way to achieve additive blending?

If you CTRL+CLICK on any of the following passes on the render layer tab (Spec, Shad, AO, Refl, Refr, & Rad … you’ll see a black dot appear in the buttonwhen you do this) then these passes will be excluded from the combined render on that particular render layer. If you then click the button normally to enable the pass it will be available for compositing separate from the combined render pass. This allows for extreme customizibility when configuring the final composite. It is not always to your advantage to exclude the pass from the combined render however via the CRTL+CLICK option because you can not achieve the same results in the compositor by recombining passes that would normally have been rendered otherwise. These options allow you to ENHANCE your composites and are NOT designed to let you faithfully rebuild a normal render. Generally, the CTRL+CLICK option is best used in situations like the one you have here — where the passes are causing you problems within the normal render. Mixing reflections back into the composite via “Add” mode does tend to faithfully reproduce reflections though.

The following page in the release notes for V.2.43 will teach you how to properly recombine the majority of the passes:

Thanks again, RamboBaby. I’ve played around with the exclusion features, and am quite comfortable with compositing in general by now.

The combined ray/shadow buffers makes sense from a performance standpoint and from a “normal use” scenario where you’re somewhat simulating reality. The thing is that I like to do abstract graphical animations, where realism is second to getting the results I want. For instance, one technique I’ve worked with is building my own refractive lens objects that are parented to the camera. Since everything is then raytraced, render layers are completely unusable. This seems somewhat arbitrary to me - use a particular rendering feature in your materials, and compositing gets vastly more difficult. Yes, I take a performance hit, and no, the results won’t be physically correct, but I’d like to have the option to do it anyway.

Well, thanks again for the linked scene tip - that might just be the workaround I need for these things.