POV-Ray : Newsgroups : povray.general : Performance characteristics wrt change in lighting Server Time
31 Oct 2024 16:15:23 EDT (-0400)
  Performance characteristics wrt change in lighting (Message 1 to 9 of 9)  
From: FelixKlein
Subject: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 14:40:00
Message: <web.42a88c936982f2118d9e5d340@news.povray.org>
I have observed a curious difference in performance when rendering a scene
after just changing the lights.  It's quite drastic:

Single point light at <0,0,8>:  320x240 renders full scene in 40 seconds
Single point light at <1000,2000,10000>: 320x240 renders 3 rows in 11 hours

The scene contains one plane (the "ground") and a union of a little over 6
million spheres with a "Polished_Chrome" texture.  The spheres are mostly
very small... for example, there are about 50 of radius greater than 0.1.
All are centered on the "ground plane".

Can anyone explain this drastic change in render time?  Better yet, can you
suggest a way to simulate a distant point light without increasing the
render time significantly?

Thanks!


Post a reply to this message

From: Mike Raiford
Subject: Re: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 15:47:56
Message: <42a89cec$1@news.povray.org>
FelixKlein wrote:
> I have observed a curious difference in performance when rendering a scene
> after just changing the lights.  It's quite drastic:
> 
> Single point light at <0,0,8>:  320x240 renders full scene in 40 seconds
> Single point light at <1000,2000,10000>: 320x240 renders 3 rows in 11 hours
> 
> The scene contains one plane (the "ground") and a union of a little over 6
> million spheres with a "Polished_Chrome" texture.  The spheres are mostly
> very small... for example, there are about 50 of radius greater than 0.1.
> All are centered on the "ground plane".
> 
> Can anyone explain this drastic change in render time?  Better yet, can you
> suggest a way to simulate a distant point light without increasing the
> render time significantly?
> 
> Thanks!
> 
> 

A simple sample scene demonstrating the problem would be welcome. Other 
thyan that the only suggestion I could make is "Light is actually 
hitting the 6 million spheres?"


-- 
~Mike

Things! Billions of them!


Post a reply to this message

From: Slime
Subject: Re: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 15:56:28
Message: <42a89eec$1@news.povray.org>
> The scene contains one plane (the "ground") and a union of a little over 6
> million spheres

Sounds like it might be related to the light buffer, maybe. If you add
no_shadow to every sphere, does that have a significant effect? What about
no_image?

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


Post a reply to this message

From: FelixKlein
Subject: Re: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 16:10:01
Message: <web.42a8a1c8a42d04398d9e5d340@news.povray.org>
Mike Raiford <mra### [at] hotmailcom> wrote:
> A simple sample scene demonstrating the problem would be welcome.

I thought about including something like that, but of course if I reduce it
to 50 spheres, the render times are roughly the same.  The other option is
the actual scene file which weighs in at > 150MB.

> Other
> thyan that the only suggestion I could make is "Light is actually
> hitting the 6 million spheres?"

Not likely, since they all lie within distance 3 of the origin, and 'most'
of them have a line of sight to the camera (i.e. few of them are obscured).
 I think they are pretty much all visible in both lighting scenarios.

I'm thinking now that it might be some kind of 'light buffer' problem or
related to the shadows as was suggested.  The shadows are of little
importance so I'll try 'no_shadow'.


Post a reply to this message

From: ABX
Subject: Re: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 16:19:05
Message: <7p8ha15uhccjh2fuf3lf5msmsk8nois119@4ax.com>
On Thu,  9 Jun 2005 16:08:40 EDT, "FelixKlein" <nomail@nomail> wrote:
> > A simple sample scene demonstrating the problem would be welcome.
>
> I thought about including something like that, but of course if I reduce it
> to 50 spheres, the render times are roughly the same.  The other option is
> the actual scene file which weighs in at > 150MB.

OTOH the beauty of loops and random generators is that following scene

    #local g=seed(0);
    #local c=0;
    #while (c<1000)
        sphere{ 1000*<rand(g),rand(g),rand(g)> rand(g) }
        #local c=c+1;
    #end

is minimal but complex. So perhaps (just guessing) with some effort you could
minimize scene.

ABX


Post a reply to this message

From: FelixKlein
Subject: Re: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 16:20:00
Message: <web.42a8a428a42d04398d9e5d340@news.povray.org>
"Slime" <fak### [at] emailaddress> wrote:
> Sounds like it might be related to the light buffer, maybe. If you add
> no_shadow to every sphere, does that have a significant effect? What about
> no_image?

Adding "no_shadow" to the union of spheres makes the rendering times
approximately equal (with distant or nearby light sources).  Thanks!

I'm guessing that the subtle change in position of the light source (notice
the distant one wasn't directly overhead) lead to lots of small shadows
being cast on other reflective objects, which in turn lead to lots of
recursion.

I haven't tried 'no_image', since this solves my rendering problem.  I don't
really want to make my objects invisible (!), so what do you expect from
this option?

Thanks again for your help!


Post a reply to this message

From: Slime
Subject: Re: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 16:39:04
Message: <42a8a8e8@news.povray.org>
> I haven't tried 'no_image', since this solves my rendering problem.  I
don't
> really want to make my objects invisible (!), so what do you expect from
> this option?


Both suggestions were just to see if they have any effect on the rendering
time. If no_shadow speeds things up, then obviously the shadows are causing
the slowdown.

The light source you're using is at a fairly shallow angle, so maybe that's
just causing more shadow ray - object checks to be necessary. However, the
speed difference you're talking about is much worse than I would expect from
that.

Does it help if you bring the light source closer by a factor of 100 or so
(<10, 20, 100>)? (If this effects other parts of your scene, you could try
using two separate light sources with light_group.)

I wouldn't suggest resorting to the no_shadow keyword as a solution until
the actual problem is more clear.

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


Post a reply to this message

From: Alain
Subject: Re: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 17:37:52
Message: <42a8b6b0@news.povray.org>
FelixKlein nous apporta ses lumieres en ce 2005-06-09 14:38:
> I have observed a curious difference in performance when rendering a scene
> after just changing the lights.  It's quite drastic:
> 
> Single point light at <0,0,8>:  320x240 renders full scene in 40 seconds
> Single point light at <1000,2000,10000>: 320x240 renders 3 rows in 11 hours
> 
> The scene contains one plane (the "ground") and a union of a little over 6
> million spheres with a "Polished_Chrome" texture.  The spheres are mostly
> very small... for example, there are about 50 of radius greater than 0.1.
> All are centered on the "ground plane".
> 
> Can anyone explain this drastic change in render time?  Better yet, can you
> suggest a way to simulate a distant point light without increasing the
> render time significantly?
> 
> Thanks!
> 
> 
A way to simulate a *very* distant light is to make it a parallel one. If using such a
light, you 
need to specify a point_at coordinate just like with a spot_light. Don't place it to
close if you 
want shadows, as anything behind it's plane will get light, but won't cast nor receive
any shadow.

Alain


Post a reply to this message

From: FelixKlein
Subject: Re: Performance characteristics wrt change in lighting
Date: 9 Jun 2005 19:10:00
Message: <web.42a8cbbba42d04398d9e5d340@news.povray.org>
> Does it help if you bring the light source closer by a factor of 100 or so
> (<10, 20, 100>)? (If this effects other parts of your scene, you could try
> using two separate light sources with light_group.)

Actully it does not; I was mistaken in thinking the problem was the
_distance_ of the light source.  Rather it seems the render time increases
exponentially as the light source is moved away from the z axis, presumably
because this produces (literally) millions of shadows that aren't seen with
directly-overhead lighting.

> I wouldn't suggest resorting to the no_shadow keyword as a solution until
> the actual problem is more clear.

In this case I would prefer not to have shadows, so I'm happy with this
solution.  I think the fact that the render time increases drastically when
the light is not overhead (but stays the same with "no_shadow") indicates
that shadows are the problem.  I welcome alternate explanations, but now
that I have a good solution I'll probably stick with it.

Thanks!


Post a reply to this message

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