reflection in layers bug?

Here is a very frustating thing that I believe is a bug, but I would like to know if anyone knows what is it.

If you create an object, then duplicate it in another layer and give the duplicate a new material with reflection, this layer will render all buged, as if both meshes were occupying the same layer.

If both of them have reflecting materials, the same will happen in both.

I have uploaded a file with this situation to better illustrate, should it be confusing to anyone.

Any idea? I will be forced to go back to max for this work I am doing because of this, but I hope there is a sollution for future works.


layer_bug.blend (581 KB)

The ugliness is caused by the meshes influencing the raytracing calculations for each other (reflections, ambient occlusion, etc). If you turn off raytracing the problems go away, though you may want some of the other results. You can also go into each render layer and disable reflections. Not a very good solution, but at least you now know what’s causing the problem…

But I did this precisely because I need the reflections.
I know that they are influencing in one another, like if both layers were active. And that is the behaviour I want to solve.

Is this a bug then?

The duplicate, though on another layer, is occupying the exact same location in world space, right? If so, then it’s not a bug, but rather a natural consequence of coincident faces. That they are separated by Render Layers is both relevant and irrelevant depending on other aspects of the scene, such as the lighting and materials specs.

I looked into your file and figured out that since there are no lamps or any other light source for the objects, then it must be a material effect making them render visibly – you have the Emit value jacked up well over 1.0 for all three materials used. In and of itself that’s not a problem, but Render Layers do not recognize Emit as one of the material properties that is separated out by using Render Layers. I’m not sure any material properties are, except those listed on the Layers>Include: option.

When you hit F12 all three spheres are indeed rendered as if on a single layer, because the Render Layers do not segregate the Emit effect of each when rendering. Whether or not this is a bug is a matter of expectation about what Render Layers can or should do, imo.

For example, if you use actual lamps for your scene, one for each object and its respective Layer, and specify them as “This Layer Only,” then the scene works as expected because the renderer recognizes Lamps as objects that can be separated by Render Layers.

You may be able to work around this limitation (I for one hesitate to call it a bug) by not using the “global” render option (F12), but instead rendering each layer separately in the Compositor – the “camera” button in the lower right corner of each Render Layer node will render only the objects on that RL, ignoring anything else. In this way you can “manually” segregate the Emit effect for each Layer’s objects.

I can not see this as anything but a bug. How can it be intended that, when you SET a layer as invisible, you still see that layer, but only specifically to mirrors? This creates all kinds of problems.

Bug or not, this is a serious problem. Your example of lamps is a different thing. If a lamp is in an invisible layer, you will not (and should not) see it, no matter if it is configured to shine that layer or not. But if you enable the layer, then you have the option to have the lamp affecting that layer or not.

You have the option to make something invisible on a visible layer. But you should not see what is invisible. That could be an interesting option, but this is not the case as I have no option to disable this “feature”.

The objects are with emit to avoid the need of lights. But it happens with or without the emit. It is specific to the mirror property.

Your example .blend had nothing to do with either RayMirror or setting Layers to “invisible.” Perhaps you are confusing using enabled (“visible”) Layers (a 3D Window feature), and using Render Layers (a Compositor feature). Render Layers are used to segregate/isolate/organize certain aspects of a scene, mainly on an object level. Not all aspects of a rendering (e.g. many material properties) can be segregated using Render Layers in this way. This has nothing to do with making anything “invisible,” and in particular not making a Layer “invisible.”

If you do not want a Layer to render, simply disable it. Nothing on the Layer will be added to the rendering pipeline, regardless if it is also part of a Render Layer.

The “invisiblilty” options (in the Outliner) are these: You can hide an object in the 3D Window (the “eye” icon), but it can still render. This is a convenience option and does not affect rendering. You can also remove the object from the rendering pipeline (the “camera” icon) – in this case, the object will not render at all, though it may be visible in the 3D Window. If both of these options are enabled, then the object will not be seen in the UI and will also not render. Perhaps you are misinterpreting the use of these icons? It’s hard to tell because you describe one problem with your posts, but illustrate it with a file that doesn’t match what you describe.

guismo: could you explain in a little more detail what you’re trying to do? Obviously the approach you’re taking isn’t working the way you expect it to, but maybe that’s because the logic of Blender differs from that of C4D in this particular instance… We all get that the .blend you posted doesn’t look very good, but I also imagine that isn’t exactly what you’re doing – you made that .blend to illustrate a point. You’re illustrating a feature of Blender (how it deals with raytracing and transparency) that’s frustrating you. With more info, we can probably help find another feature of Blender to make your project work!

Sorry for the delay on answering.

Chipmasque, the way I understand render layers is: you can have multiple configurations/objects/instances of your scene in different layers for different needs and then stick them together in the compositor. I have used it in this way in a lot of situations. This is the only use I see for it and it is very important. I understand that what I make visible in the render layers will render. And what I don´t WILL NOT. And I understand that I have 2 separate layers, the visible layers (that will be visible to all render layers) and the render layers (that will make only certain layers among those visible). So I have to make all layers to be rendered visible in the visible layers and select each one for each pass in the render layers.

Blender is confusing and I may be misunderstanding it. But I can not see how just the mirror feature can not be restricted to the render layer and that be not a bug. If it is a feature, it is a very non functional one.

And Benu and chipmasque, that is what I want to do. I want to have one object reflecting in one layer, and not reflecting on another. Take this 2 passes and mix them in the compositor. In this case it is the glasses of a character. I need to have the control of the refract how those glasses will behave with refraction/reflection and without, with a different collor, so I can simulate caustics and refractions that blender is not capable of doing.

In the end, I am trying to use a blender feature to overcome a blender limitation (its render engine). If the render layers are also this limited, I am forced to use something else.

I know blender have its limitations and I want to overcome them. But sometimes I just have to get the work done, as it was the case, witch is now on vray´s hand. But I hope to be able to do this in the future.

I totally agree with you guismo: you use whatever tools will get the job done. So I think using vray is a good idea for that project.

From what I understand, the render engine will be undergoing a lot of changes in the near future (not to mention the new “cycles” render engine already available in experimental builds). I don’t understand the current renderer inside and out, but one feature (which is causing you frustration) is that raytracing is carried across render layers. In many cases this is desirable, as you can have an object that isn’t appearing in a render layer cast shadows on something in a different layer, etc. And lights have options regarding which objects they illuminate and/or cast shadows on, etc. So, shadow-wise, the render layers are manageable.

But reflections are more difficult. You want some materials (but not all) to reflect in some of the render layers (but not all). For now, in the blender internal renderer, this has to be done manually, in multiple renders. Someone please correct me if I’m wrong here… Perhaps using layer indices as matte objects could help somewhat (prevent reflections on specific materials) but it can’t prevent certain materials from casting reflections in other render layers…

That is a very strange “feature” when you have, for instance, the hability to hide the object from the camera, without altering its influence in the scene AND set its alfa to -1 in the material tab, in the “sky” button under “options”.

The hability to hide the object from the camera , without altering its influence in the scene BUT without changing the alfa is a very good feature, known in max as “visible to camera”, and would obviously be found close to that sky button.

The thing is, blender lacks this feature as a real feature. And that behaviour in the render layers is a problem. Bug or not bug. And if it is not a bug, it should not behave as it does, and be found in the material tab, not influencing a whole layer, but just the object/material in case. I know that blender sometimes have some very miisplaced features, but this can not be one of them.

But I am scared of posting it as a bug because I do not think developers would be as polite as you are in trying to sell this as a feature.

But yes, they are changing it. And I pray they fix both the render engine and the material system. They are very, very below what we can find in other programs. I am using vray in blender, but it is of little use because, though the rendering is marvelous, the material system is still the same.

But at least I fixed this problem with vray. Let us hope for a better future. Blender evolves quickly and sometimes in surprising ways. I do not doubt that in one year we would have a better material system then in max.