POV-Ray : Newsgroups : povray.binaries.images : Postprocessing camera (d)effects with POV-Ray Server Time
23 May 2024 07:24:44 EDT (-0400)
  Postprocessing camera (d)effects with POV-Ray (Message 8 to 17 of 17)  
<<< Previous 7 Messages Goto Initial 10 Messages
From: Jaime Vives Piqueres
Subject: Re: Postprocessing camera (d)effects with POV-Ray - Bokeh
Date: 2 Jan 2010 05:05:49
Message: <4b3f1a7d@news.povray.org>
Almost finished now, with additional parameters for the intensity
distribution, number of diaphragm blades, and even passing an object for the
bokeh shape (as with real black paperboard cuts).

The method is tricky but clean, and is somewhat fast to render... but I
still have to try to automate it (so that you can queue the consecutive passes).

-- 
Jaime Vives Piqueres

http://www.ignorancia.org


Post a reply to this message


Attachments:
Download 'atenea_bokeh3.jpg' (95 KB) Download 'atenea_bokeh4.jpg' (65 KB)

Preview of image 'atenea_bokeh3.jpg'
atenea_bokeh3.jpg

Preview of image 'atenea_bokeh4.jpg'
atenea_bokeh4.jpg


 

From: Edouard
Subject: Re: Postprocessing camera (d)effects with POV-Ray - Bokeh
Date: 2 Jan 2010 14:40:01
Message: <web.4b3f9ffa52c95067639ae1e00@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
> Almost finished now, with additional parameters for the intensity
> distribution, number of diaphragm blades, and even passing an object for the
> bokeh shape (as with real black paperboard cuts).
>
> The method is tricky but clean, and is somewhat fast to render... but I
> still have to try to automate it (so that you can queue the consecutive passes).

Looking really good!

I had some code that could take an iris image in my 35mm Camera Macros - you
rendered the scene multiple times with a slightly different camera shear matrix
each time, and when you averaged the images together you got focal blur with
shaped bokeh. Are you doing something vaguely similar? I can't wait to find out,
and to give your code a spin!

Cheers,
Edouard.


Post a reply to this message

From: Jellby
Subject: Re: Postprocessing camera (d)effects with POV-Ray - Bokeh
Date: 2 Jan 2010 14:40:07
Message: <boi417-kkm.ln1@badulaque.unex.es>
Among other things, Jaime Vives Piqueres saw fit to write:

> Almost finished now, with additional parameters for the intensity
> distribution, number of diaphragm blades, and even passing an object for
> the bokeh shape (as with real black paperboard cuts).
> 
> The method is tricky but clean, and is somewhat fast to render... but I
> still have to try to automate it (so that you can queue the consecutive
> passes).

Looks great! I wonder... how does it handle reflections? Actually, how is
bokeh affected by reflection in real cameras? (I mean, when the bright
spots are not seen directly, but through a reflection.) The same could be
asked with refraction or just transparency.

-- 
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Postprocessing camera (d)effects with POV-Ray - Bokeh
Date: 2 Jan 2010 14:57:40
Message: <4b3fa534$1@news.povray.org>

> Looks great! I wonder... how does it handle reflections? Actually, how
> is bokeh affected by reflection in real cameras? (I mean, when the
> bright spots are not seen directly, but through a reflection.) The same
> could be asked with refraction or just transparency.
>

   Ah... you really got me with the refraction/transparency thing! ;)

   With reflections there is no problem, but as the method is based on a
"focus map", it will not show the spots through a focused glass (similar to
what happens with postprocessed focal blur).


-- 
Jaime Vives Piqueres

http://www.ignorancia.org


Post a reply to this message

From: Samuel Benge
Subject: Re: Postprocessing camera (d)effects with POV-Ray
Date: 2 Jan 2010 15:10:01
Message: <web.4b3fa70d6a3a44f07f7f41ca0@news.povray.org>
Jaime Vives Piqueres <jai### [at] ignoranciaorg> wrote:
> I was trying to emulate it with The Gimp, when I figured it
> would be not difficult to do it within POV-Ray, with the help of screen.inc.

It all looks great :) I guess it's my turn to wonder, how are you doing this? I
suppose I should take a look at screen.inc!

Sam


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Postprocessing camera (d)effects with POV-Ray - Bokeh
Date: 2 Jan 2010 16:55:39
Message: <4b3fc0db$1@news.povray.org>

> Looking really good!

   Thanks! But it has some limitations...

> I had some code that could take an iris image in my 35mm Camera Macros -
> you rendered the scene multiple times with a slightly different camera
> shear matrix each time, and when you averaged the images together you got
> focal blur with shaped bokeh. Are you doing something vaguely similar?

   No, not at all: my approach is not that clever... it's more like brute force.

   I'm simply tracing the image at random, evaluating the pigment at the
point, and placing an object textured with a spherical pattern. The size of
the object is controlled by the "focus map", and the transparency is
controlled by the intensity on the image.

   The problem is that these objects overlap the zone "in focus" too... so it
needs an additional pass mixing the original image and the "bokehd" image,
using the "focus map" again as guide (which is easy using a texture_map with
a pigment_pattern).

   BTW, the method works mostly with HDR input images...

   For the bloom effect I'm using something similar, but without the "focus
map". For the other camera (d)effects I'm using different methods: some are
just a texture over the camera.


> I can't wait to find out, and to give your code a spin!

   Sure it will benefit from it! ...just let me finish the film grain effect
and clean a bit the code, please.


-- 
Jaime Vives Piqueres

http://www.ignorancia.org


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Postprocessing camera (d)effects with POV-Ray
Date: 2 Jan 2010 17:09:45
Message: <4b3fc429$1@news.povray.org>

> It all looks great :)

   Thanks!

> I guess it's my turn to wonder, how are you doing this? I suppose I
> should take a look at screen.inc!

   Well, screen.inc is just the tool to place the image in front of the
camera, passing it as a texture. At first I was just experimenting with
processing that texture (chromatic aberration, noise, distortion,...), until
I figured out that I could also trace and evaluate the image texture, to put
objects in front of the camera (cross screen filter, bloom, bokeh).

   Now my problem is getting all these camera effects compatible between
them, so that you can use them together. Also, I should sort them, as the
applying order is important for photorealism.

-- 
Jaime Vives Piqueres

http://www.ignorancia.org


Post a reply to this message

From: Mike Raiford
Subject: Re: Postprocessing camera (d)effects with POV-Ray - Bokeh
Date: 11 Jan 2010 08:18:58
Message: <4b4b2542@news.povray.org>
On 1/2/2010 4:08 AM, Jaime Vives Piqueres wrote:
> Almost finished now, with additional parameters for the intensity
> distribution, number of diaphragm blades, and even passing an object for
> the
> bokeh shape (as with real black paperboard cuts).
>
> The method is tricky but clean, and is somewhat fast to render... but I
> still have to try to automate it (so that you can queue the consecutive
> passes).
>


Is the bokeh effect all done in the renderer, then? Nice work!

-- 
~Mike


Post a reply to this message

From: Mike Raiford
Subject: Re: Postprocessing camera (d)effects with POV-Ray - Bokeh
Date: 11 Jan 2010 08:24:33
Message: <4b4b2691$1@news.povray.org>
On 1/2/2010 3:58 PM, Jaime Vives Piqueres wrote:

>> Looking really good!
>
> Thanks! But it has some limitations...
>
>> I had some code that could take an iris image in my 35mm Camera Macros -
>> you rendered the scene multiple times with a slightly different camera
>> shear matrix each time, and when you averaged the images together you got
>> focal blur with shaped bokeh. Are you doing something vaguely similar?
>
> No, not at all: my approach is not that clever... it's more like brute
> force.
>

This all very much reminds me of the stoichiometric rendering rig I saw 
some time ago (I forget who posted it ...) that worked really nicely for 
bokeh, but IIRC, it had some artifacts associated with it.

Now I want to play with bokeh in POVRay ... (wonder if I could rig up 
some animation-based means of doing it....)

-- 
~Mike


Post a reply to this message

From: Jaime Vives Piqueres
Subject: Re: Postprocessing camera (d)effects with POV-Ray - Bokeh
Date: 11 Jan 2010 17:56:32
Message: <4b4baca0$1@news.povray.org>

>
> Is the bokeh effect all done in the renderer, then? Nice work!
>

   Yes, but in a second pass over the rendered image... so, technically, it's
cheating! ;)

-- 
Jaime Vives Piqueres

http://www.ignorancia.org


Post a reply to this message

<<< Previous 7 Messages Goto Initial 10 Messages

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