Compositing partially hidden subjects in animation


I’m new here, so go easy on me :slight_smile:
I have a scene similar to this one:

I would like to add some glow to the center object using composting.
Something like this:


  • The glow needs to appear on top of the rear red cube.
  • The glow needs to be hidden by the front red cube.
  • The camera is rotating around the center object, so the objects behind and at front of it change all the time.

I’m unsure how such an animated scene is approached easily using composting.
I’d appreciate your insight and suggestions.

– zvi


Hi there. You’ll need to use blender cycles (Blender defaults to blender render, but you can change this in the drop down at the top of the screen) if not already and apply an emission material to the cube with nodes. You can learn more about this here;

Nodes are tricky to get your head around, but once it clicks, they can be really useful. Because this is a material, it will give you the desired effect no matter where you put the camera. I’d start here and play around with the materials.

No, you don’t particularly need to use Cycles to do this …

The “glow” behind the sun-cube could simply be a fuzzy blob on a plane positioned behind the cube. (Why not?) The so-called “billboard” technique. A spotlight positioned at the cube, in-line with the camera (yes, you can put a lamp directly in front of the camera and it won’t be “seen”), can be used to generate any “glow” on the sun-cube itself. (No light need fall on the billboard plane, [I]unless that’s how you’d like to create the “fuzzy glow” on that plane.)

(Even if you “can plainly see” the billboard-plane when setting up the comp, you will only use the channel of information that represents reflected light from the plane when you wire-up the “noodles.” Or, you can just spray-paint the thing, and be done.)

The orbiting planet-cubes can be differentiated from the sun-cube by the simple expedient of Z-depth: how far away they are from the camera.

If you’d like to make the orbiting cubes appear to reflect light from the sun-cube, simply put a light source in their render-layer, where the “glowing” cube is. Since the result will be visually consistent with the notion that “this cube is glowing … this cube is the source of light,” that’s how the audience will interpret the scene.

For maximum post-production flexibility, you might separate the “light that shines from the sun onto the planets” from the basic illumination of those planets, creating a layer of data which consists only of that added (yellow?) light. Having separated it, you can now adjust its relative strength, tint it various colors, and so on. All without re-rendering anything.

an Object ID pass would allow you to make a matte of any cubes that need to be in front of the glow. That can then be used to mask out the glow based on objects in front of it.

Yeah, “Object-ID” is yet another of the many filtering-criteria that are readily available to us … but it doesn’t know anything about distance. Seems to me that distance would be the most-important one, therefore, since you need to know whether a planet is behind the sun or in front of it. Object-ID filtering seems to me to be fairly unnecessary here, because you can simply distinguish the various objects at the RenderLayer (node …) level. We can already very-easily filter out “everything but planets,” or, “everything but the sun.”