With this short tutorial I’ll show you how to enlight your scene projectors, flashes, leds, lamps, lights and all those objects that are supposed to emit light thought lenses.
An example: the image below is produced with this technique.
Here there is an object for the projector and a second object for the lens, that is composited to re-create the flare and added to the final image.
In this test i’ve used the render engine cycles, but it works equally with blender internal. Let’s see how to obtain this effect in your scene!
With separated objects
If you have separated objects for the lens and the projector / camera / light you can use the Object Index parameter:
you need to choose your lense object and change the Pass Index from 0 to a number of your choice, I’ve choosed 1
With different materials
If instead of separated objects, you have a different material assigned to your light / lens, use the Material Index parameter:
you need to select the lense material and change the Pass Index from 0 to a number of your choice, I’ve choosed 1
Render Layer Passes
Now enable the Object Index pass in the render layer if you have separated objects or the Material Index pass if you used the method with the different material.
Finally use this compositing configuration to your scene.
There are an ID Mask node that catch the index = 1 that we set before, from this node starts the elaboration with:
- A Blur node to add a general glow
- A Glare Streaks node to add streaks from the light source
- A Glare Ghosts node to add the lens flare
Those nodes are then composited throught Add nodes: to control the strenght of the effect, just play with the first two add factor (Fac)
Render it and voilà!