Sun w/debris - how to?


I’ve got a model of a sun in its own render layer, and have a nice glow effect on it in the compositor. In another render layer, I’ve got an orbiting asteroid field.

Sometimes in the animation, the camera will be in a position where the asteroids will appear in front of the sun, and other spots, it will only see asteroids moving behind it.

In my compositor, I was overlaying the sun render layer on top of the asteroid render layer - and it just dawned on me that this won’t work, because the sun will always be “in front of” (overlayed on) the asteroids, even if some of the asteroids are supposed to be in front.

Am I out of luck in attempting to use a glow effect, or is there some way to achieve this?



Google for Z-combine node. That should solve your problem.

Thank you!

Sorry for the newb question… I’m very new to the compositor! :o

No problem. Here is a .blend example.


z-combine.blend (245 KB)


Far out!!!