POV-Ray : Newsgroups : povray.unofficial.patches : radiosity samples: 255x255x255 probably isn't enough Server Time
30 Jun 2024 21:06:30 EDT (-0400)
  radiosity samples: 255x255x255 probably isn't enough (Message 11 to 20 of 32)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: Apache
Subject: Re: radiosity samples: 255x255x255 probably isn't enough
Date: 7 Jan 2003 19:00:32
Message: <3e1b6a20@news.povray.org>
I use this function in radiosit.cpp:

/***************************************************************************
**
*
* FUNCTION  VGet()  -  Gets 2dimensional src_vec, converts it with
*                      z=sqrt(1-x*x-y*y) into 3dimensional dest_vec.
*
* INPUT
*
* OUTPUT
*
* RETURNS   Nothing
*
* AUTHOUR   Eli Jehoel
*
* DESCRIPTION
*
*  The radiosity rays have been precomputed. For each sample, dz is derived
*  from dx and dy. Ranges of dx and dy are (-1. to 1.), range of dz is
*  (0. to 1.)
*
*  There is no VNormalizing involved in this function in order to gain
speed.
*
* CHANGES
*
*   --- Jan 2002 : Creation.
*
****************************************************************************
**/
static void VGet(VECTOR dest_vec, DOUBLE_XY * src_vec)
{
  dest_vec[X] = src_vec->x;
  dest_vec[Y] = src_vec->y;
  dest_vec[Z] = sqrt(1. - pow(src_vec->x, 2.)-pow(src_vec->x, 2.));
}


Post a reply to this message

From: Apache
Subject: Re: radiosity samples: 255x255x255 probably isn't enough
Date: 7 Jan 2003 19:10:48
Message: <3e1b6c88$1@news.povray.org>
Or maybe I should precompute the z values too? It will take 50% more space,
but it saves expensive sqrt calls and some multiplications. Anyone?


Post a reply to this message

From: Troy S  Ristow
Subject: Re: radiosity samples: 255x255x255 probably isn't enough
Date: 7 Jan 2003 20:06:46
Message: <3e1b79a6$1@news.povray.org>
"Apache" <apa### [at] yahoocom> wrote in message
news:3e1b6a20@news.povray.org...
> I use this function in radiosit.cpp:
>
>   dest_vec[Z] = sqrt(1. - pow(src_vec->x, 2.)-pow(src_vec->x, 2.));
>

I'm assuming that you meant: dest_vec[Z] = sqrt(1. - pow(src_vec->x,
2.)-pow(src_vec->y, 2.));

If you just cut and pasted this code then you may want to re-run your tests,
because this would make a huge difference.

And I would at least expand pow function to square a value into a single
multiplication for efficiency.

--- Troy S. Ristow


Post a reply to this message

From: Apache
Subject: Re: radiosity samples: 255x255x255 probably isn't enough
Date: 8 Jan 2003 01:49:46
Message: <3e1bca0a$1@news.povray.org>
Thanks! Stupid typos ....  :-)  Haven't run the code yet, because I'm
waiting for a set of 12000 samples to finish.


Post a reply to this message

From: Troy S  Ristow
Subject: Re: radiosity samples: 255x255x255 probably isn't enough
Date: 8 Jan 2003 02:00:19
Message: <3e1bcc83@news.povray.org>
"Apache" <apa### [at] yahoocom> wrote in message
news:3e1bca0a$1@news.povray.org...
> Thanks! Stupid typos ....  :-)  Haven't run the code yet, because I'm
> waiting for a set of 12000 samples to finish.
>

Keep in mind that the reason (in my belief) that the sample set is difficult
to create, is because it must not only be valid for 12000 samples, but also
the first 9000 of that set and the first 6000 and... etc.  (sorry for the
run-on.)

I have worked with creating dither patterns that are built up in this way.
When I get some time I will try to articulate the algorithms I used about 8
years ago to generate a cascading set of blue noise at various intensity
levels.  In the mean time, carry on with the tests, I have a few (always
have something) running in the background.

--- Troy


Post a reply to this message

From: Apache
Subject: Re: radiosity samples: 255x255x255 probably isn't enough
Date: 8 Jan 2003 09:03:13
Message: <3e1c2fa1$1@news.povray.org>
I have come up with a new algorithm that creates exactly the same set with
extremely high speed. First have to implement it. but probably I can get it
to create a set of 65535 samples in an acceptible time :-)


Post a reply to this message

From: Apache
Subject: Re: radiosity samples: 255x255x255 probably isn't enough
Date: 8 Jan 2003 10:04:18
Message: <3e1c3df2@news.povray.org>
That's exactly what I've kept in my mind all the time :-) I think "my" set
is pretty good at it.


Post a reply to this message

From: Gilles Tran
Subject: Re: radiosity samples: 255x255x255 probably isn't enough
Date: 8 Jan 2003 10:09:07
Message: <3e1c3f13$1@news.povray.org>

3e1c2fa1$1@news.povray.org...
> I have come up with a new algorithm that creates exactly the same set with
> extremely high speed. First have to implement it. but probably I can get
it
> to create a set of 65535 samples in an acceptible time :-)

Just a general comment about this "search for more radiosity" samples, which
I sincerely hope will be fruitful and lead to better, faster radiosity.
In my experience, "more samples" doesn't mean "better radiosity". In fact,
this is true between, say, 0 and 500, but after that, having more samples
just doesn't address the artefact issues : radiosity-created splotches just
tend to get smoother and more organised (with some luck, they may look like
natural dirt...) but they're still there and I'm not sure that raising the
count will make them disappear, i.e. more samples will lead asymptotically
to "nice", regular artefacts instead of messy ones. There are even some
cases where having less samples results in locally better results, something
puzzling enough to suggest that some sort of adaptive sampling could be used
(I'm clueless about the whole thing, don't ask for details!).
Anyone has investigated this problem or will raising the count to 65000
actually solve it ?

G.

--

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


Post a reply to this message

From: Vadim Sytnikov
Subject: pow()??? (Re: radiosity samples: 255x255x255 probably isn't enough)
Date: 8 Jan 2003 11:58:44
Message: <3e1c58c4@news.povray.org>
"Apache" <apa### [at] yahoocom> wrote:
>   dest_vec[Z] = sqrt(1. - pow(src_vec->x, 2.)-pow(src_vec->x, 2.));

Why on Earth are you using such an expensive thing as pow() here? It is slow
as hell compared to simple multiplication. What's the catch? Am I missing
something?


Post a reply to this message

From: Apache
Subject: Re: pow()??? (Re: radiosity samples: 255x255x255 probably isn't enough)
Date: 8 Jan 2003 12:08:02
Message: <3e1c5af2@news.povray.org>
Maybe you're right. I don't know. But I know that x*x is faster than
src_vec->x*src_vec->x. Haven't thought about it really. I have this blurry
and faint feeling that the power function is incorporated in most cpus. If
not, please tell me.


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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