POV-Ray : Newsgroups : povray.binaries.images : Focal blur tricks Server Time
2 Aug 2024 02:20:47 EDT (-0400)
  Focal blur tricks (Message 13 to 22 of 22)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: nemesis
Subject: Re: Focal blur tricks
Date: 23 Feb 2008 16:40:49
Message: <47c092e1$1@news.povray.org>
man, that's so amazing I don't even know how to thank you!  Send it to 
the povteam right now!

I don't know if a povsymbol aperture is that realistic, but as artistic 
license it's wonderful. :)  and the hexagon and circular one are spot-on!

let's workout a syntax extension for it:

camera {
	aperture .02 blur_samples 60 shape circular | hexagon | image
}

how's it?


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Focal blur tricks
Date: 23 Feb 2008 17:50:09
Message: <47c0a321@news.povray.org>

> "triple_r" <rre### [at] hotmailcom> wrote:
>> I think it would require a direct patch into
>> POV-Ray to fix the problem.
> 
> So with very little effort, here's the result of my patched POV.  It's hardly
> fair to call it that since it's only a couple lines and there's no SDL
> interface for it.  It just reads a grayscale ppm file and varies the density of
> the sample grid according to the image.  You can even tell the difference
> without the strong highlights which makes me wonder why the default is a square
> aperture.  Not quite sure when that would be preferable, but maybe people don't
> use strong focal blur too often.
> 

Did you base your patch on 3.6 or 3.7 code?


Post a reply to this message

From: triple r
Subject: Re: Focal blur tricks
Date: 23 Feb 2008 18:25:01
Message: <web.47c0ab23806ad5e4ae42298f0@news.povray.org>
"Zeger Knaepen" <zeg### [at] povplacecom> wrote:
> > You can even tell the difference
> > without the strong highlights which makes me wonder why the default is a
> > square
> > aperture.
>
> I suppose it's faster to calculate a random location inside a square than a
> random location inside a circle.  Might not be much of a difference for 1 pixel
> and 1 sample, but it could add up to a lot for 1024x786 pixels and 10 samples
> per pixel.

Well that's the interesting part.  It seems to use something like a grid with
jitter, but it's all precalculated before the render.  So it doesn't matter
what shape you choose - as best as I can tell, it's just a list of points when
rendering.

 - Ricky


Post a reply to this message

From: triple r
Subject: Re: Focal blur tricks
Date: 23 Feb 2008 18:30:00
Message: <web.47c0ab9f806ad5e4ae42298f0@news.povray.org>
"C. Cappai" <nomail@nomail> wrote:

> Wow!
>
> I want so much that all this was implemented in the next beta of POV-Ray!

It's nothing POV-Ray can't do already, it's just square and ugly by default.
Trivial to change.

 - Ricky


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Focal blur tricks
Date: 24 Feb 2008 06:54:16
Message: <47c15ae8$1@news.povray.org>
"nemesis" <nam### [at] nospamgmailcom> wrote in message 
news:47c092e1$1@news.povray.org...
> man, that's so amazing I don't even know how to thank you!  Send it to the 
> povteam right now!
>
> I don't know if a povsymbol aperture is that realistic, but as artistic 
> license it's wonderful. :)  and the hexagon and circular one are spot-on!
>
> let's workout a syntax extension for it:
>
> camera {
> aperture .02 blur_samples 60 shape circular | hexagon | image
> }
>
> how's it?

there's a bokeh-patch for povray that accepts any pigment as shape.  I think 
that's actually the best way to do it. (it's the bokeh_pigment_patch that's 
referenced on the MegaPOV-website, but that's the only hit on google, so I 
suppose it's not available anymore)

cu!
-- 
#macro G(b,e)b+(e-b)*C/50#end#macro _(b,e,k,l)#local C=0;#while(C<50)
sphere{G(b,e)+3*z.1pigment{rgb G(k,l)}finish{ambient 1}}#local C=C+1;
#end#end _(y-x,y,x,x+y)_(y,-x-y,x+y,y)_(-x-y,-y,y,y+z)_(-y,y,y+z,x+y)
_(0x+y.5+y/2x)_(0x-y.5+y/2x)            // ZK http://www.povplace.com


Post a reply to this message

From: Nekar
Subject: Re: Focal blur tricks
Date: 24 Feb 2008 07:46:47
Message: <47c16737@news.povray.org>
Ooh, lovely! Will it do the same with light sources? I'm thinking of a
street scene at night.


--
- Nekar X -


Post a reply to this message

From: William Tracy
Subject: Re: Focal blur tricks
Date: 24 Feb 2008 12:49:43
Message: <47c1ae37$1@news.povray.org>
Nekar wrote:
> Ooh, lovely! Will it do the same with light sources? I'm thinking of a
> street scene at night.

Probably not, but it probably would work if the lights had a really 
bright looks_like object.

-- 
William Tracy
afi### [at] gmailcom -- wtr### [at] calpolyedu

    It occurred to him that now he was going to be not only the first 
man on Mars, but the first detective. He grinned at the thought, and the 
last action of the omegendorph set his nerves aglow.
     -- Kim Stanley Robinson, _Red Mars_


Post a reply to this message

From: Gilles Tran
Subject: Re: Focal blur tricks
Date: 24 Feb 2008 14:49:32
Message: <47c1ca4c$1@news.povray.org>

web.47bfa2bb806ad5e4ae42298f0@news.povray.org...
> You'll notice in these images that the bokeh are just below a comfortable 
> noise
> threshold, but the rest of the scene is extremely oversampled.  That fix 
> might
> not be so easy, but if it could be accomplished, would make the focal_blur 
> much
> more powerful.
>
> - Ricky

Here's a link to Mael's POV-Ray patch with the bokeh feature (and other cool 
stuff)
http://pov.monde.free.fr/mael/mlpov081.html

G.

-- 
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray, Cinema 4D and Poser computer art
- Posters


Post a reply to this message

From: triple r
Subject: Re: Focal blur tricks
Date: 25 Feb 2008 01:05:01
Message: <web.47c259a5806ad5e4ae42298f0@news.povray.org>
"Gilles Tran" <gitran_nospam_@wanadoo.fr> wrote:

> Here's a link to Mael's POV-Ray patch with the bokeh feature (and other cool
> stuff)
> http://pov.monde.free.fr/mael/mlpov081.html


Hey thanks!  I'm content with the status quo right now -- which requires
recompiling POV-Ray if I want to change the pattern -- but it's interesting to
see what someone else has done.  Recompiling is really not as much of a pain as
it sounds.  Doesn't need changing too often.  But it seems like the pattern
solution would be useful enough to make it into more than a little-known
patched version now that computers are actually powerful enough to take
advantage of it.  Looks like the current render will take about four hours.
Roughly speaking,

4 hours * (2.4 Ghz/120MHz) * (4 Cores/1 CPU) ~= two weeks (and hard times for
the last computer on which I played with focal blur).

 - Ricky


Post a reply to this message

From: Mike Raiford
Subject: Re: Focal blur tricks
Date: 25 Feb 2008 12:31:37
Message: <47c2fb79$1@news.povray.org>
triple_r wrote:
> "triple_r" <rre### [at] hotmailcom> wrote:
>> I think it would require a direct patch into
>> POV-Ray to fix the problem.
> 
> So with very little effort, here's the result of my patched POV.  It's hardly
> fair to call it that since it's only a couple lines and there's no SDL
> interface for it.  It just reads a grayscale ppm file and varies the density of
> the sample grid according to the image.  You can even tell the difference
> without the strong highlights which makes me wonder why the default is a square
> aperture.  Not quite sure when that would be preferable, but maybe people don't
> use strong focal blur too often.
> 
>  - Ricky
> 
> 
> ------------------------------------------------------------------------
> 

Sweet! it even inverts the aperture shape properly. Nice :) Now, if you 
could add a parameter to the camera SDL to grab a bokeh map, or define 
blades, curvature for aperture, you'd really have something.


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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