|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
rli### [at] everestkcnet news:412ca60c$1@news.povray.org
> from the documentation "Reflected or refracted light is not attenuated
> by distance." is this because it is computationally too expensive, or
> is this just how light works in nature?
So to summ up I suggest
1. global_settings {
global_light_fading on
global_light_distance 100 // adjust this depending on size of scene
}
2. with #version <= 3.6 default is: global_light_fading off
3. global_light_fading
a) overwrites light_source defaults to:
power 2
distance global_light_distance
b) make refracted rays also fade
c) photons... are they acting as radiosity or do they also need fading?
If they need - turn it on by default
4. defauls can be manualy overwriten ofcourse
5. perhaps add option fade_refracted ON in light_source{} to allow manualy
switching on/off fading of refracted ray of each light
This will not brake old scenes 2), it will add functionality 3.c) and
will make writting scene bit more comfortable 3.a) and 4)
Perhaps macros will be usefull:
CALCULATE_LIGHT (designated_light, object_distance)
CALCULATE_LIGHT2(designated_light, object_position, light_position)
used as:
#local W = <200,0,0>;
#local L = <0,500,0>;
sphere { W 1 pigment { rgb 1 } }
light_source { CALCULATE_LIGHT2(0.5, W, L) }
and sphere would be have resulting color as it was lighten by
light_source { rgb 0.5 } no matter where we will put it.
If someone could implement this patch I can help to write manual on it and
test it (and perhaps help coding) as I find it very usefull in creating
photorealistick scenes (especialy togeather with radiostity and exposure)
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Have you ever tried Jaime's Lightsys for lighting? If not, you can
download it at http://www.ignorancia.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ross <rli### [at] everestkcnet> wrote:
> refracted light is not governed by fade_distance/fade_power is it? i think i
> recall reading that in the docs of 3.5. (opening docs for 3.6...) i always
> wondered why.
How bright an object appears depends on it's distance to the light source,
but it does NOT depend on it's distance to the camera!
(otherwise you wouldn't be able to see the moon, for example)
Since reflections/refractions can only occur in rays between camera and object,
but not between object/lightsource (without photon mapping, photon mapping
should get the fading automatically correct, just like radiosity) it isn't
necessary to handle light fading there.
Lutz-Peter
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
lpv### [at] gmxde news:412dbf92$1@news.povray.org
> Since reflections/refractions can only occur in rays between camera
> and object, but not between object/lightsource (without photon
> mapping, photon mapping should get the fading automatically correct,
> just like radiosity) it isn't necessary to handle light fading there.
>
But what about shadow/light-test rays (not camera-rays) that got refracted?
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rafal 'Raf256' Maj <spa### [at] raf256com> wrote:
> But what about shadow/light-test rays (not camera-rays) that got refracted?
They don't.
If it would be possible to simulate ref(ra|le)cted light-rays with backwards
raytracing, photon mapping wouldn't be necessary.
Lutz-Peter
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rafal 'Raf256' Maj wrote:
> But what about shadow/light-test rays (not camera-rays) that got refracted?
Guess why there is photon mapping or faked caustics in POV-Ray. Because
normal shadow tests don't bend the rays.
Severi
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
sev### [at] NOT_THISsibafi news:412dca8d$1@news.povray.org
> Guess why there is photon mapping or faked caustics in POV-Ray. Because
> normal shadow tests don't bend the rays.
Hmm yes. (Btw - what about old "caustics" finish?).
So applying fading to photons should work all right.
--
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Rafal 'Raf256' Maj nous apporta ses lumieres ainsi en ce 26/08/2004
07:35... :
>sev### [at] NOT_THISsibafi news:412dca8d$1@news.povray.org
>
>
>
>Hmm yes. (Btw - what about old "caustics" finish?).
>So applying fading to photons should work all right.
>
>
>
The old caustics are still there and fully useable. The problem, is that
those are distance independent. So, you take a refractive sphere, shine
light thrue it, and the bright spot stay the same size 1 unit away and
1000 units away. It's OK for a water surface casting caustics under it,
but that's all.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"Ross" <rli### [at] everestkcnet> wrote:
> from the documentation "Reflected or refracted light is not attenuated by
> distance." is this because it is computationally too expensive, or is this
> just how light works in nature?
To do so, simply add media to the object (iirc, this is one of the things
media was introduced for).
....Chambers
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Among other things, wrote:
> refracted light is not governed by fade_distance/fade_power is it? i think
> i recall reading that in the docs of 3.5. (opening docs for 3.6...) i
> always wondered why. for instance if you have a candle (point light) in a
> glass candle holder, nearly all the light would be defracted, and
> therefore, not fade with distance.
>
> from the documentation "Reflected or refracted light is not attenuated by
> distance." is this because it is computationally too expensive, or is this
> just how light works in nature?
I will guess an explanation.
The "physical" fade_power=2 comes, as explained, from a geometric/topologic
fact and, ultimately, from the light traveling in (almost) straight lines.
If light travels in straight lines, in all directions, the "amount" of
light per unit area (the perceived lighting intensity) diminishes with the
square of distance, just because the surface (of a sphere, for example)
grows with the square of distance (the sphere's radius).
This effect could be obtained by using forward raytracing: Shoot light rays
in every direction, then count how many rays reach a given
object/area/surface. Using photons in POV-Ray would, I guess, reproduce the
"inverse square law" without need of any kind of fade_power, because it's
intrinsic to the way light propagates (and it's correctly simulated in this
case).
With backward raytracing, however, there is no easy way to know how many of
the "original" light rays will have reached a given object, all you know is
it is possible for a ray to reach the object. But, assuming the light
travels in straight line, it is safe (and realistic) to just use a
fade_power=2 to simulate the light fading. As soon as the light doesn't
travel in a straight line, which happens when it is "reflacted" or
"refrected" the assumption is not valid and the "fade_power=2" could be
plain wrong, you have to take into account all the possible ways a ray
could reach the object.
Summing it up: fade_power=2 is a quick and useful way to simulate light when
it travels in straight lines, but it cannot be used when it doesn't!
Now, this doesn't mean that's the actual reason it works like that in
POV-Ray. I haven't thought quite deeply about the physics and the "POV-way"
in this phenomenon and I could be wrong.
--
light_source{9+9*x,1}camera{orthographic look_at(1-y)/4angle 30location
9/4-z*4}light_source{-9*z,1}union{box{.9-z.1+x clipped_by{plane{2+y-4*x
0}}}box{z-y-.1.1+z}box{-.1.1+x}box{.1z-.1}pigment{rgb<.8.2,1>}}//Jellby
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |