POV-Ray : Newsgroups : povray.binaries.images : Lens flare in scene Server Time
14 Nov 2024 00:21:46 EST (-0500)
  Lens flare in scene (Message 1 to 5 of 5)  
From: Tek
Subject: Lens flare in scene
Date: 7 Mar 2010 06:29:01
Message: <4b938dfd@news.povray.org>
I've had no internet at home for the last 2 months, but that doesn't mean I 
haven't been povving! This is something I came up with a few weeks ago. I'm 
probably not the first person to attempt this, but I decided to experiment 
with lens flare/bloom effects without any post-processing.

The trick is there's a mirror behind the camera with multiple normal maps 
blended together (by averaging the texture), and another mirror just in 
front of the camera that's part-reflective part-transparent. The transparent 
part lets us see the scene, the reflective part shows the mirror behind, 
which reflects multiple rays to trace all the samples needed for lens flare.

This is a ludicrously elaborate way to do things, and makes a simple scene 
take AGES to render, but it's kind of fun to play with these things :)

I'll post an animation in p.b.a and source in p.b.s-f shortly...

-- 
Tek
http://evilsuperbrain.com


Post a reply to this message


Attachments:
Download 'lens_flare_in_scene.jpg' (36 KB)

Preview of image 'lens_flare_in_scene.jpg'
lens_flare_in_scene.jpg


 

From: Alain
Subject: Re: Lens flare in scene
Date: 7 Mar 2010 11:03:44
Message: <4b93ce60$1@news.povray.org>

> I've had no internet at home for the last 2 months, but that doesn't mean I
> haven't been povving! This is something I came up with a few weeks ago. I'm
> probably not the first person to attempt this, but I decided to experiment
> with lens flare/bloom effects without any post-processing.
>
> The trick is there's a mirror behind the camera with multiple normal maps
> blended together (by averaging the texture), and another mirror just in
> front of the camera that's part-reflective part-transparent. The transparent
> part lets us see the scene, the reflective part shows the mirror behind,
> which reflects multiple rays to trace all the samples needed for lens flare.
>
> This is a ludicrously elaborate way to do things, and makes a simple scene
> take AGES to render, but it's kind of fun to play with these things :)
>
> I'll post an animation in p.b.a and source in p.b.s-f shortly...
>
Nice trick.

You can probably do with one less mirror.

Instead of having a miror behind the camera and a partialy transparent 
one in front, use only one in front of the camera and place the scene 
itself behind the camera. The mirror need a flat normal. Give that flat 
normal a higher weight than the others.

For a sample, there is a scene named "hot thing" that use that trick. It 
use specular highlight and several lights to create a bloom effect.

Another way would be to have a transparent poligon in front of the 
camera. Give that poligon an averaged normal and an ior.


Alain


Post a reply to this message

From: Samuel Benge
Subject: Re: Lens flare in scene
Date: 7 Mar 2010 13:45:00
Message: <web.4b93f2d63b6032157052cdec0@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote:
> I've had no internet at home for the last 2 months, but that doesn't mean I
> haven't been povving! This is something I came up with a few weeks ago. I'm
> probably not the first person to attempt this, but I decided to experiment
> with lens flare/bloom effects without any post-processing.

I tried a similar thing in the past, but not this exact Teknique. I used a
transparent plane with several averaged normals via a texture map. I can't
remember how it turned out, only that it took for frickin' ever, and there
wasn't the benefit of specular highlights...

Your method looks pretty good! It's actually quite natural, at least where you
can't see the flare from the light directly.

Sam


Post a reply to this message

From: Tek
Subject: Re: Lens flare in scene
Date: 7 Mar 2010 20:23:13
Message: <4b945181$1@news.povray.org>
I thought about using ior, but it's harder to control the direction of the 
rays (reflections are pretty simple) and you can't get specular highlights 
on the light source.

However, the backwards camera is a good point. I'll do that if I ever want 
to use this in a real image (unlikely unless I have a few months for 
rendering!).

-- 
Tek
http://evilsuperbrain.com


"Alain" <aze### [at] qwertyorg> wrote in message 
news:4b93ce60$1@news.povray.org...

>> I've had no internet at home for the last 2 months, but that doesn't mean 
>> I
>> haven't been povving! This is something I came up with a few weeks ago. 
>> I'm
>> probably not the first person to attempt this, but I decided to 
>> experiment
>> with lens flare/bloom effects without any post-processing.
>>
>> The trick is there's a mirror behind the camera with multiple normal maps
>> blended together (by averaging the texture), and another mirror just in
>> front of the camera that's part-reflective part-transparent. The 
>> transparent
>> part lets us see the scene, the reflective part shows the mirror behind,
>> which reflects multiple rays to trace all the samples needed for lens 
>> flare.
>>
>> This is a ludicrously elaborate way to do things, and makes a simple 
>> scene
>> take AGES to render, but it's kind of fun to play with these things :)
>>
>> I'll post an animation in p.b.a and source in p.b.s-f shortly...
>>
> Nice trick.
>
> You can probably do with one less mirror.
>
> Instead of having a miror behind the camera and a partialy transparent one 
> in front, use only one in front of the camera and place the scene itself 
> behind the camera. The mirror need a flat normal. Give that flat normal a 
> higher weight than the others.
>
> For a sample, there is a scene named "hot thing" that use that trick. It 
> use specular highlight and several lights to create a bloom effect.
>
> Another way would be to have a transparent poligon in front of the camera. 
> Give that poligon an averaged normal and an ior.
>
>
> Alain


Post a reply to this message

From: Tek
Subject: Re: Lens flare in scene
Date: 7 Mar 2010 20:25:26
Message: <4b945206$1@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote in message 
news:web.4b93f2d63b6032157052cdec0@news.povray.org...
>
> Your method looks pretty good! It's actually quite natural, at least where 
> you
> can't see the flare from the light directly.

Thanks! I think I could make it look a lot better if I spent time tweaking 
it, but I think I've spent long enough on this incredibly slow technique!

-- 
Tek
http://evilsuperbrain.com


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.