POV-Ray : Newsgroups : povray.general : Performance and inner workings of reflection Server Time
1 Nov 2024 13:19:25 EDT (-0400)
  Performance and inner workings of reflection (Message 1 to 4 of 4)  
From: Dabear
Subject: Performance and inner workings of reflection
Date: 20 Sep 2012 09:40:01
Message: <web.505b1bc6d26a41626f6047fc0@news.povray.org>
Hello guys,

i came around the documentation site
http://www.povray.org/documentation/view/3.6.1/348/
and it says: "Adding reflection to a texture makes it take longer to render
because an additional ray must be traced."
I am wondering why it would take longer if i specify "reflection {1}". I always
thought that you are then able to instantly calculate in which direction the ray
must go and then just take the first objects color which is hit by the reflected
ray. If you have some diffuse object then you must send out many rays in
different directions to find out the color at the specific point and even then
it can be inaccurate.

Did i get something wrong?

Thank you very much.


Post a reply to this message

From: clipka
Subject: Re: Performance and inner workings of reflection
Date: 20 Sep 2012 10:39:26
Message: <505b2a9e$1@news.povray.org>
Am 20.09.2012 15:36, schrieb Dabear:
> Hello guys,
>
> i came around the documentation site
> http://www.povray.org/documentation/view/3.6.1/348/
> and it says: "Adding reflection to a texture makes it take longer to render
> because an additional ray must be traced."
> I am wondering why it would take longer if i specify "reflection {1}". I always
> thought that you are then able to instantly calculate in which direction the ray
> must go and then just take the first objects color which is hit by the reflected
> ray. If you have some diffuse object then you must send out many rays in
> different directions to find out the color at the specific point and even then
> it can be inaccurate.
>
> Did i get something wrong?

Yes, you did: Diffuse surfaces are, by default, not computed by shooting 
hundreds or thousands of secondary rays around the scene, but by 
shooting rays towards the light sources only in order to determine 
shadowing. (A reflective surface just takes a single secondary ray, but 
that one will typically hit a diffuse surface, so the diffuse stuff is 
virtually always there.)

If you use radiosity, then for diffuse surfaces POV-Ray does indeed 
shoot hundreds or thousands of secondary rays around the scene, but only 
for some samples on the surface, which are then weighted and averaged 
for any points in between.

(And yes, radiosity is still slower than reflections indeed.)


Post a reply to this message

From: Warp
Subject: Re: Performance and inner workings of reflection
Date: 20 Sep 2012 11:42:24
Message: <505b3960@news.povray.org>
Dabear <nomail@nomail> wrote:
> i came around the documentation site
> http://www.povray.org/documentation/view/3.6.1/348/
> and it says: "Adding reflection to a texture makes it take longer to render
> because an additional ray must be traced."
> I am wondering why it would take longer if i specify "reflection {1}". I always
> thought that you are then able to instantly calculate in which direction the ray
> must go and then just take the first objects color which is hit by the reflected
> ray.

It's slower because now you have to trace two rays instead of one (which
would be the case when there's no reflection).

-- 
                                                          - Warp


Post a reply to this message

From: Dabear
Subject: Re: Performance and inner workings of reflection
Date: 21 Sep 2012 06:35:01
Message: <web.505c42a3a4d91e2b6f6047fc0@news.povray.org>
> > Did i get something wrong?
>
> Yes, you did: Diffuse surfaces are, by default, not computed by shooting
> hundreds or thousands of secondary rays around the scene, but by
> shooting rays towards the light sources only in order to determine
> shadowing. (A reflective surface just takes a single secondary ray, but
> that one will typically hit a diffuse surface, so the diffuse stuff is
> virtually always there.)
>
> If you use radiosity, then for diffuse surfaces POV-Ray does indeed
> shoot hundreds or thousands of secondary rays around the scene, but only
> for some samples on the surface, which are then weighted and averaged
> for any points in between.
>
> (And yes, radiosity is still slower than reflections indeed.)

Very good answer, now i got it! Thank you, both of you.


Post a reply to this message

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