POV-Ray : Newsgroups : povray.general : Light source performance impact problems Server Time
3 Aug 2024 18:16:09 EDT (-0400)
  Light source performance impact problems (Message 1 to 6 of 6)  
From: Stephen R  Phillips
Subject: Light source performance impact problems
Date: 3 Jan 2004 17:10:38
Message: <Xns9465AF0B848F7cybermans.pov.posts.@204.213.191.226>
I have a scene I have been working on and there are a large number of light 
sources in it, This appears to be a real problem.  Is there a way to 
'eliminate' extra sources that won't be visiable using the fade_distance 
and fade_power from the light source? (sort of like fog only for  light 
source 'consideration')

I just don't want to wait 4 hours for a 320x240 test shot on a 2.2Ghz 
machine. Upgrading is obviously a silly solution because all things 
considered it won't do anything useful (such as dramatically reduce 
rendering times).

Should I make a 'IF' statement for creating the light sources based on the 
camera location? (they have a quick fall off so they look real.) 

Another question is, this scene is ment to be in a dark place with lots of 
'torches' 'braziers' giving illumination throughout the scene.  Is it 
possible to use 'black' fog to fade parts of the scene 'unseen' etc?

The scene is basically a large flat plaza with many columns the columns 
have light sources about there bases.

Suggestions?
Commentaries?
Questions regarding how it's coded?

I automatically generate the light sources with the columns. The braziers 
are seperate objects from the light sources. For objects greater than a 
certain distance I assume these details are not visable including the light 
source (see fade settings above). So is this the right way to handle this? 
Do a 'distance' calculation, from the camera to the light source/object. If 
it's greater than XXX don't create them. I'm thinking of doing the same 
with the columns (I have 15000 of those in the scene I'm still tweaking 
that to be honest.) Only with the columns I plan on switching to a cylinder 
or a prism to simplify the look. Columns are made up of 10 sections that 
are CSG made. Thus they are quite complex and the result object IMHO is a 
waste of data space and likely tracing time.

My problem at the moment is I have some 'glowing' crystals of which there 
are 40 some, no light sources on the columns and a parallel area light. It 
seems that puting the light sources in the crystals slows things down 
immensly. Thoughts?

Stephen


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: Light source performance impact problems
Date: 3 Jan 2004 18:13:35
Message: <Xns9466207D2E17raf256com@204.213.191.226>
cyb### [at] socketnet
news:Xns9465AF0B848F7cybermans.pov.posts.@204.213.191.226 

> Should I make a 'IF' statement for creating the light sources based on
> the camera location? (they have a quick fall off so they look real.) 

Yes, it's quite good work-around

> Is it possible to use 'black' fog to fade parts of the scene 'unseen'
> etc? 

I use fog sometimes in simmilar ocasions.
 
> Suggestions?
> Commentaries?

I had simmilar problem (scene wih 100-200 small fast-fading lights).
It would be a good ida IMHO to add

light_source {
  ...
  cut_off [distance n.n | lightness n.n]
}

and when distance between a point and light is > n.n then this light source 
will not be taken into account when calculating color in this point (or in 
shadow calculations). In lightness n.n version the distance D is calculated  
bade on minimal brightes.


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

From: Christopher James Huff
Subject: Re: Light source performance impact problems
Date: 3 Jan 2004 18:23:02
Message: <cjameshuff-2FF7DF.18230003012004@netplex.aussie.org>
In article <Xns9465AF0B848F7cybermans.pov.posts.@204.213.191.226>,
 "Stephen R. Phillips" <cyb### [at] socketnet> wrote:

> I have a scene I have been working on and there are a large number of light 
> sources in it, This appears to be a real problem. Is there a way to 
> 'eliminate' extra sources that won't be visiable using the fade_distance 
> and fade_power from the light source? (sort of like fog only for  light 
> source 'consideration')

No, though this probably should be added...


> Another question is, this scene is ment to be in a dark place with lots of 
> 'torches' 'braziers' giving illumination throughout the scene.  Is it 
> possible to use 'black' fog to fade parts of the scene 'unseen' etc?

Why don't you try it?
Yes, it's possible. The fog won't be illuminated by the lights 
though...for that, you need media.


> I automatically generate the light sources with the columns. The braziers 
> are seperate objects from the light sources. For objects greater than a 
> certain distance I assume these details are not visable including the light 
> source (see fade settings above). So is this the right way to handle this? 
> Do a 'distance' calculation, from the camera to the light source/object. If 
> it's greater than XXX don't create them. I'm thinking of doing the same 
> with the columns (I have 15000 of those in the scene I'm still tweaking 
> that to be honest.)

So you have N*15000 light sources, with N lights per column? You aren't 
very clear about this. If so, you are likely getting hammered by the 
light buffers. The light buffers are actually an optimization feature, 
but can really slow things down on scenes with many light sources. This 
many light sources are going to be slow whatever you do, though.


> Only with the columns I plan on switching to a cylinder 
> or a prism to simplify the look. Columns are made up of 10 sections that 
> are CSG made. Thus they are quite complex and the result object IMHO is a 
> waste of data space and likely tracing time.

If the columns are complex and identical, you might want to consider 
using meshes.


> My problem at the moment is I have some 'glowing' crystals of which there 
> are 40 some, no light sources on the columns and a parallel area light. It 
> seems that puting the light sources in the crystals slows things down 
> immensly. Thoughts?

For a glowing crystal, you might have better luck with emitting media 
and radiosity. The same may go for the column lights...radiosity can 
handle huge numbers of lights with no trouble. A room lit with 10000 
ambient spheres using radiosity will render a lot faster than a room 
with 10000 point light sources. It doesn't do well with small light 
sources though.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Hughes, B 
Subject: Re: Light source performance impact problems
Date: 3 Jan 2004 18:45:08
Message: <3ff75404@news.povray.org>
"Rafal 'Raf256' Maj" <spa### [at] raf256com> wrote in message
news:Xns### [at] 204213191226...
> It would be a good idea IMHO to add
>
> light_source {
>   ...
>   cut_off [distance n.n | lightness n.n]
> }

Prior to version 3.5 a light's color value had to be above a certain amount
before it could appear, otherwise it didn't emit any light rays IIRC.

Considering how light_source has so much impact on the rendering times this
idea of constraining its realm might be a great thing. Especially, as
Chistopher pointed out, if shadow creation were limited to a certain
distance; as measured from camera or the light, or both.

-- 
Bob H.
http://www.3digitaleyes.com


Post a reply to this message

From: Christopher James Huff
Subject: Re: Light source performance impact problems
Date: 3 Jan 2004 19:50:29
Message: <cjameshuff-03DCF5.19502803012004@netplex.aussie.org>
In article <3ff75404@news.povray.org>,
 "Hughes, B." <omn### [at] charternet> wrote:

> Considering how light_source has so much impact on the rendering times this
> idea of constraining its realm might be a great thing. Especially, as
> Chistopher pointed out, if shadow creation were limited to a certain
> distance; as measured from camera or the light, or both.

To be precise, what I was talking about was ignoring the light if the 
attenuated illumination from it dropped below the ADC bailout or some 
new threshold value. Shadow testing would not be done in this case, 
which should speed up things quite nicely.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

From: Gilles Tran
Subject: Re: Light source performance impact problems
Date: 4 Jan 2004 17:20:32
Message: <3ff891b0@news.povray.org>

news:Xns9465AF0B848F7cybermans.pov.posts.@204.213.191.226...
> Suggestions?
> Commentaries?
> Questions regarding how it's coded?

Well, 15000 lights is a lot of lights. I remember doing similar scenes and
running into problems with a few hundreds of them... At least if you have
light buffer issues (very long parsing time) you can turn them off with -UL
but it won't help with the render time itself.
Still, the obvious question is, are all these lights really necessary ?
Wouldn't it be possible to fake the majority of them with (fast) emitting
media or even with clever texturing on the columns, leaving the actual
lighting to a few ones? With many lighting sources, the contribution of each
one is really minimal and unless you plan a very large render most won't be
seen at all. In any case, if you really need many lights, try using
spotlights instead of point lights, it should be faster.


> My problem at the moment is I have some 'glowing' crystals of which there
> are 40 some, no light sources on the columns and a parallel area light. It
> seems that puting the light sources in the crystals slows things down
> immensly.

Putting lights into transparent objects certainly requires further
calculations so it's not unexpected. Again the question is whether this
could be faked.

G.


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


Post a reply to this message

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