POV-Ray : Newsgroups : povray.binaries.images : Using a couple of proximity patterns : Re: Using a couple of proximity patterns Server Time
31 Jul 2024 20:22:36 EDT (-0400)
  Re: Using a couple of proximity patterns  
From: Edouard
Date: 5 Sep 2009 06:35:00
Message: <web.4aa23d8b9d317c83c83e2c410@news.povray.org>
"Some guy" <pov### [at] edouardinfo> wrote:

>  #declare n = 0;
>  #while ( n < 60 )
>      [ 0.5 df3_pattern translate (halton3D( n )-<0.5,0.5,0.5>)*7.5 ]
>   #declare n = n + 1;
>  #end

20 iterations of the loop looks fine to be honest. 60 looks a little bit better,
but not much. The render times don't actually change that much, but I'd try 20
first and see if it's smooth enough for you.

That "translate (halton3D( n )-<0.5,0.5,0.5>)*7.5" is the magic. It's applying a
box filter to the DF3 pattern to smooth it.

halton3D( n ) returns a (kind of) random point from 0..1 in three dimensions, so
the
"-<0.5,0.5,0.5>" just centres it around 0.

The "7.5" there is a magic number that is related to the voxel size in actual
pov units (i.e. once the DF3 scaled to the object's size during loading). Too
little or too big and it doesn't work. Sorry that that is a pain.

I'll figure out a way to hide the messy details in the loading code in 0.92, and
make it an option (Proximity_SetLoadBlurring( 60, 1.0 ) or something).

Cheers,
Edouard.


Post a reply to this message

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