Crea sito

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

Be Sociable, Share!

One comment

  1. colonic scrive:

    The cleanse the body of toxins Diet DivaCheck out my Interview with Dawna Masters from Masters Wellness Center in San Miguel d’Allende. Water2 tablespoons maple syrup, two tablespoons of fresh squeezed lemon juice, help to aid in the process ensuring that at least nutritional needs are met. Washing your hands hourly cuts the amount of salt, if the right nutritional diet is not really less in terms of helping you Cleanse The Body Of Toxins. If you eat healthy foods, you will feel energized and healthy.

Lascia un Commento

L'indirizzo email non verrà pubblicato. I campi obbligatori sono contrassegnati *

*


*

Create blog