Changing object render order

Hi.

There should be a simple way to change the order in which objects are rendered, but I haven’t been able to find it.

My problem is this: I have a gradient purple background on layer 1, an object on layer 2 and some more objects on layer 3. When I render, blender seems to render layer 1, then layer 3, and then layer 2. Layer 1 renders fine, then layer 3 renders, but because I’m using OSA, the objects in layer 3 get a thin purple halo around them, so when the object in layer 2 is rendered between the background and the objects in layer 3, the objects in layer 3 retain the surrounding halo.

I’ve tried re-ordering the layers, but that doesn’t make any difference; blender just seems to like to render my objects in a particular (not-so-good) order.

I figure the solution would be to force blender to render layer 1 first, layer 2 second and layer 3 third, but I’m not really sure on how to do that.

i think you may need to render without OSA and then scale it down so that you do your own. As an alternative, check out the Object ID function and node.

I’m working on a 1000+ frame animation, so resizing a good many of those images by hand would not be worth it. Most of the halo disappears in video compression anyway; I’m asking mainly for future reference.

I played around with nodes a bit. I wasn’t able to make much of the object ID node, but I was able to force blender to render the layers in the order I wanted it to. The effect was that the purple halos were replaced by halos of the sky color. I changed the sky color to the same color as my 3rd layer objects, and since my 3rd layer objects are a solid color, that seemed to get rid of the halos. Is there any better way of doing this…maybe by making blender not render the sky at all? There should be an option for that somewhere…

Halos are usually the result of premultiplied alpha channels. Use the “Key” option instead.

For some reason, as I’ve kept working on the animation, the halos have disappeared.

I went back to an old back-up of the animation where the halos were still there. Changing the sky/premul/key didn’t seem to make any difference. After some playing around, I found that turning on the ZInvert material option for both objects got rid of the halos. I’m not sure what this option is supposed to do, but it works for me :D.

wiki improved http://wiki.blender.org/index.php/Manual/Material_Options#Links_and_Pipeline_Options

Cool. Thanks