POV-Ray : Newsgroups : povray.binaries.images : Odd blur effect: squared spheres Server Time
17 Nov 2024 12:22:21 EST (-0500)
  Odd blur effect: squared spheres (Message 1 to 10 of 25)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Rene Schwietzke
Subject: Odd blur effect: squared spheres
Date: 27 Aug 2002 05:57:31
Message: <3d6b4d0b@news.povray.org>
Hi,

Currently I am rendering a large version of a dice image. The dice points
really get angularly. Does anyone know why?

Thanx,
Rene

--
Rene Schwietzke
r.schwietzke<at>reneschwietzke.de


Post a reply to this message


Attachments:
Download 'blur.jpg' (24 KB)

Preview of image 'blur.jpg'
blur.jpg


 

From: Le Forgeron
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 06:50:40
Message: <3D6B59A8.3070709@free.fr>
Rene Schwietzke wrote:

> Hi,
> 
> Currently I am rendering a large version of a dice image. The dice points
> really get angularly. Does anyone know why?


Dive in the source code (unless it is documented ?),
the blur code as some magic values on blur_sample IIRC which
use an hexagonal grid instead of square grid. At least, it was
in 3.1 ...

Other solution might be to increase the blur_sample,
or reduce the variance or increase the confidence.

 Go read section 6.4.3 of the help (pov 3.5)


Post a reply to this message

From: Rene Schwietzke
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 08:29:14
Message: <3d6b709a@news.povray.org>
I found three constants in the help about Hex_Blur, might be related but the
camera SDL does not allow any additional settings.
Hex_Blur1 = 7
Hex_Blur2 = 19
Hex_Blur3 = 37

My settings are:

blur_samples 150
variance 0
confidence 0.9999999

Any ideas? Your assumption seems to be right...

Rene

"Le Forgeron" <jgr### [at] freefr> wrote in message
news:3D6### [at] freefr...
> Dive in the source code (unless it is documented ?),
> the blur code as some magic values on blur_sample IIRC which
> use an hexagonal grid instead of square grid. At least, it was
> in 3.1 ...
>
> Other solution might be to increase the blur_sample,
> or reduce the variance or increase the confidence.
>
>  Go read section 6.4.3 of the help (pov 3.5)
>


Post a reply to this message

From: Jan Walzer
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 12:37:32
Message: <3d6baacc@news.povray.org>
AFAIK the focal blur is achieved by scattering the camera location
point in a rectangular area, while maintaining the focal point the
same. The size of this area is determined by the aperature keyword.


Post a reply to this message

From: Slime
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 13:30:22
Message: <3d6bb72e@news.povray.org>
> AFAIK the focal blur is achieved by scattering the camera location
> point in a rectangular area, while maintaining the focal point the
> same. The size of this area is determined by the aperature keyword.

Shouldn't it be a circular area for realism?

 - Slime
[ http://www.slimeland.com/ ]


Post a reply to this message

From: Jan Walzer
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 14:05:30
Message: <3d6bbf6a$1@news.povray.org>
"Slime" <slm### [at] slimelandcom>
> > AFAIK the focal blur is achieved by scattering the camera location
> > point in a rectangular area, while maintaining the focal point the
> > same. The size of this area is determined by the aperature keyword.
>
> Shouldn't it be a circular area for realism?
  ^^^^^^
correct ...

either that or you can start modelling complex shapes for a
probability model. Meaning, you support a greyscale bitmap
where black says "no here won't get a ray shooten from" and
white means that from here will get a ray shooten with the
highest probability.

This would allow you to form flare shapes as they sometimes
appear in photography; think of hexagonal or triangular ones.

The problem would be, that it will even slower to determine
the point.


Post a reply to this message

From: Gilles Tran
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 15:10:37
Message: <3d6bcead@news.povray.org>

news: 3d6b4d0b@news.povray.org...

> Currently I am rendering a large version of a dice image. The dice points
> really get angularly. Does anyone know why?
>

See this page
http://www.kenrockwell.com/tech/bokeh.htm

There's a patch that implements this in POV-Ray that is currently being
ported to 3.5 (it's under testing and not available yet). From what I heard
it's faster that the regular focal_blur but I have not verified this myself.

G.


--
**********************
http://www.oyonale.com
**********************
- Graphic experiments
- POV-Ray and Poser computer images
- Posters


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 15:24:54
Message: <3d6bd206$1@news.povray.org>
> > Shouldn't it be a circular area for realism?
>   ^^^^^^
> correct ...
I don't think that's correct actually...

> either that or you can start modelling complex shapes for a
> probability model. Meaning, you support a greyscale bitmap
> where black says "no here won't get a ray shooten from" and
> white means that from here will get a ray shooten with the
> highest probability.
>
> This would allow you to form flare shapes as they sometimes
> appear in photography; think of hexagonal or triangular ones.
>
> The problem would be, that it will even slower to determine
> the point.
True, but I would be happy with the possibility to choose between a circular
area and an area in the shape of a regular polygon.

I was trying to do focalblur by averaging different renders earlier this day.  I
came up with the following formula to scatter points inside a regular polygon:

  #declare Seed=seed(whatever);
  #declare angles=<insert number of angles here>;
  #declare Rot=360*rand(Seed);
  #declare X=pow(rand(Seed),.5);
  #declare Rot2=Rot/(360/angles);
  #declare fraqrot=Rot2-int(Rot2);
  #declare fraqrot2=abs(fraqrot-.5);
  #declare fraqrot3=pow(fraqrot2*2,.5);
  #declare Location=vrotate(x*X*(.8+.2*fraqrot3),Rot*z);

This produces a random point within a regular polygon inside a circle with
radius 1 (I think, could be that it's a bit outside that circle...) (more or
less, it's not a perfect polygon, and it needs more than 3 angles to look like a
polygon)

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


Post a reply to this message

From: Jan Walzer
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 16:06:48
Message: <3d6bdbd8@news.povray.org>
"Zeger Knaepen" wrote:
> I was trying to do focalblur by averaging different renders earlier this day.  I
> came up with the following formula to scatter points inside a regular polygon:
>
>   #declare Seed=seed(whatever);
>   #declare angles=<insert number of angles here>;
>   #declare Rot=360*rand(Seed);
>   #declare X=pow(rand(Seed),.5);
>   #declare Rot2=Rot/(360/angles);
>   #declare fraqrot=Rot2-int(Rot2);
>   #declare fraqrot2=abs(fraqrot-.5);
>   #declare fraqrot3=pow(fraqrot2*2,.5);
>   #declare Location=vrotate(x*X*(.8+.2*fraqrot3),Rot*z);

probably right....
but please compare these lines to the simple way of determing a single point
in an rectangle concerning the time it takes to compute it ...

... and then take into account, that this has to been done multiple times
per pixel ... Maybe its ok to precompute ~2^10 such values and store them
in a table, so you can reuse them later ... but I'm not sure this will help


Post a reply to this message

From: Zeger Knaepen
Subject: Re: Odd blur effect: squared spheres
Date: 27 Aug 2002 16:17:34
Message: <3d6bde5e@news.povray.org>
> > I was trying to do focalblur by averaging different renders earlier this
day.  I
> > came up with the following formula to scatter points inside a regular
polygon:
> >
> >   #declare Seed=seed(whatever);
> >   #declare angles=<insert number of angles here>;
> >   #declare Rot=360*rand(Seed);
> >   #declare X=pow(rand(Seed),.5);
> >   #declare Rot2=Rot/(360/angles);
> >   #declare fraqrot=Rot2-int(Rot2);
> >   #declare fraqrot2=abs(fraqrot-.5);
> >   #declare fraqrot3=pow(fraqrot2*2,.5);
> >   #declare Location=vrotate(x*X*(.8+.2*fraqrot3),Rot*z);
>
> probably right....
> but please compare these lines to the simple way of determing a single point
> in an rectangle concerning the time it takes to compute it ...
>
> ... and then take into account, that this has to been done multiple times
> per pixel ... Maybe its ok to precompute ~2^10 such values and store them
> in a table, so you can reuse them later ... but I'm not sure this will help
Yes, a rectangle, or a circle, will be faster, that's why you should have the
option to use a circle (or a rectangle, but I don't think that would give
realistic results actually).

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


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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