POV-Ray : Newsgroups : povray.general : max_distance for Lightsources? Server Time
25 Nov 2024 15:48:21 EST (-0500)
  max_distance for Lightsources? (Message 1 to 5 of 5)  
From: Sereib
Subject: max_distance for Lightsources?
Date: 28 Jan 2014 16:05:02
Message: <web.52e81b12f0bda82f4f9e6d8c0@news.povray.org>
Hi,

let's assume a cave (an isosurface) illuminated with hundreds of candles close
to the wall of the cave.
Each candle gets its light_source with a certain fade_distance and fade_power in
order to attain a nice illumination, so each candle only illuminates the cave
wall very close to the candle.

Now we have the problem that rendering goes very slowly, since each point of the
isosurface has to consider each light_source. On the other hand, the result
would look much the same, if each point of the cave wall considers only the 1, 2
or 3 nearest candles (due to the small fade_distance and rather high fade_power
candles more far away won't take any effect on the brightness of this location).

A work-around would be to split the cave into many intersections, each combined
with one candle in a light_group. This, however, would not be a smart solution
(and I'm not sure if it really works).

So what about introducing a "max_distance" keyword to a light_source?

This means, each point of a scene only considers light_sources which a closer
than "max_distance". The default value, of course, would be infinity (maybe
represented by a negative value, or a zero).

I have lots of scenes which would benefit from such a (as I think very easy to
implement) keyword by means of rendering speed.

To be honest, I wonder why such a keyword has not been introduced up to now - or
have I overseen it?

Kind Regards!


Post a reply to this message

From: clipka
Subject: Re: max_distance for Lightsources?
Date: 28 Jan 2014 17:42:26
Message: <52e83252$1@news.povray.org>
Am 28.01.2014 22:03, schrieb Sereib:

> So what about introducing a "max_distance" keyword to a light_source?
...
> To be honest, I wonder why such a keyword has not been introduced up to now - or
> have I overseen it?

This idea has indeed been brought up before, and had it not been due to 
a lack of round tuits something along those lines would probably have 
been introduced already.

With the abundance of tuits coming in these days on 
povray.binary.images, chances are it will be added soon, although I 
guess it will be implemented in UberPOV first.

I suppose I won't actually expose the max_distance setting though, but 
instead auto-compute that threshold from the light source's absolute 
brightness, fade_distance and fade_power, as well as a global brightness 
threshold.

Then again I might as well do both: Compute max_distance based on a 
global threshold by default, but allow the user to specify an individual 
max_distance for any given light source if they so desire.


Post a reply to this message

From: Sereib
Subject: Re: max_distance for Lightsources?
Date: 28 Jan 2014 23:40:00
Message: <web.52e885d9dbfd8bd62d687bbc0@news.povray.org>
Hi,

thank you for your fast reply and comments!

Kind regards!


Post a reply to this message

From: Sereib
Subject: Re: max_distance for Lightsources?
Date: 31 Jan 2014 05:30:00
Message: <web.52eb7a60dbfd8bd6131792ae0@news.povray.org>
Hi,

it's me again.

Does POV-Ray consider a spotlight, when the position of a pixel to be rendered
is outside the cone defined by the radius and falloff parameter?

So it would be a good work-around to define the candles as spotlight pointing
towards the nearest wall.

Or does POV-Ray consider these spotlights even if the location is outside the
light cone, thus even if the additional brightness is zero?


Post a reply to this message

From: clipka
Subject: Re: max_distance for Lightsources?
Date: 31 Jan 2014 14:19:07
Message: <52ebf72b@news.povray.org>
Am 31.01.2014 11:26, schrieb Sereib:
> Hi,
>
> it's me again.
>
> Does POV-Ray consider a spotlight, when the position of a pixel to be rendered
> is outside the cone defined by the radius and falloff parameter?

Yes, there's a "shortcut" for that.


Post a reply to this message

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