[How-To] Lens flare in Blender compositor through IndexOB

Hi all!
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.

Overview

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!

Configuration

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.

Compositing

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à!

Una risposta a “[How-To] Lens flare in Blender compositor through IndexOB”

  1. It’s hard to find your blog in google. I found it
    on 15 spot, you should build quality backlinks , it will help you to get more visitors.
    I know how to help you, just type in google – k2 seo tips

Rispondi a Kali Annulla risposta

Il tuo indirizzo email non sarà pubblicato.


*