POV-Ray : Newsgroups : povray.general : scattering media emits light Server Time
18 Nov 2024 13:15:54 EST (-0500)
  scattering media emits light (Message 1 to 6 of 6)  
From: David Necas (Yeti)
Subject: scattering media emits light
Date: 20 Aug 2002 09:59:15
Message: <slrnam4ipk.8i6.yeti@monoceros.physics.muni.cz>
Scattering media behaves quite strangely when you put
a light_source directly into it.

Consider following scene, a box containing scattering media
and a light source just above it:

camera { location -30*z look_at 0 }
plane { y, -15 pigment { checker rgb<1,0,0> rgb<0,1,0> scale 10 } }
light_source { 10.1*y, 1 media_attenuation on }
box {
  <-10,-10,-10>, <10,10,10> hollow pigment { color rgbt<1,1,1,1> }
  interior { media { scattering { 1, 0.2 extinction 1 } } }
}

Rendering it gives what one expects: glow in the upper part
of the box, the lower part being almost dark since little
light come there (most is scattered).

But changing the third line to

light_source { 9.9*y, 1 media_attenuation on }

i.e. putting the light source inside the box, makes the media
to emit an abusrd amount of light.

I hope I didn't miss anything, but is this the way it's
supposed to work or is it a bug?  I'd expect the media to
behave more physically.

Yeti


Post a reply to this message

From: Micha Riser
Subject: Re: scattering media emits light
Date: 20 Aug 2002 10:29:53
Message: <3d625261@news.povray.org>
I can confirm this. There seems to be a problem with the light extinction 
not being considered when the light_source is inside the media. Actually 
try setting extinction to 0 and you will get the same result. POV 3.1 
behaves the same way.

- Micha

-- 
http://objects.povworld.org - the POV-Ray Objects Collection


Post a reply to this message

From: Kari Kivisalo
Subject: Re: scattering media emits light
Date: 20 Aug 2002 14:25:50
Message: <3D6289DE.A0A75FA6@luxlab.com>
"David Necas (Yeti)" wrote:
> 
> Scattering media behaves quite strangely when you put
> a light_source directly into it.

fade_power 2 makes it behave less strange. Without it the source's
energy output increases with distance. There is still a notable
difference when the source is in/out of the media. 


global_settings{assumed_gamma 1}

camera { location -30*z look_at 0 }

plane { y, -15 pigment { checker rgb<1,0,0> rgb<0,1,0> scale 10 } }

light_source{10.1*y 5
fade_power 2 fade_distance 1
media_attenuation on }

box {
  <-10,-10,-10>, <10,10,10> hollow pigment { color rgbt<1,1,1,1> }
  interior { media { scattering { 1, 0.2} } }
}


_____________
Kari Kivisalo


Post a reply to this message

From: Christopher James Huff
Subject: Re: scattering media emits light
Date: 20 Aug 2002 21:23:10
Message: <chrishuff-EFAF43.20084420082002@netplex.aussie.org>
In article <3d625261@news.povray.org>, Micha Riser <mri### [at] gmxnet> 
wrote:

> I can confirm this. There seems to be a problem with the light extinction 
> not being considered when the light_source is inside the media. Actually 
> try setting extinction to 0 and you will get the same result. POV 3.1 
> behaves the same way.

My own raytracer had a bug where the last interval of media between a 
surface and the point being calculated was ignored (simplified 
description of the problem). POV calculates things the other direction, 
from the point to the light, maybe it doesn't do attenuation from the 
last interval between a surface and the light. Since that is the only 
interval doing attenuation here, the light isn't attenuated at all. A 
simple off-by-one error...

-- 
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: David Necas (Yeti)
Subject: Re: scattering media emits light
Date: 22 Aug 2002 06:47:37
Message: <slrnam9ga9.inv.yeti@monoceros.physics.muni.cz>
In article <3D6289DE.A0A75FA6@luxlab.com>, Kari Kivisalo wrote:
> 
> fade_power 2 makes it behave less strange. Without it the source's
> energy output increases with distance.

Exactly. I observed this too, but forgotten to mention in
the first post.

I expetemented with various fade_powers and adding explicit
absrorption to the media, but it's quite hard to make some
realistic effect, moreover a small change in scattering
value changes the light a much. (After all, I had to use
emitting media with some precomputed density maps to fake
glow around light sources in my scene, instead of letting
povray to actually compute them.)

However, there's a probably a workaround: use CSG to cut
a small spehre (or whatever) just around the light source
from the media-container object to get it ``outside''.

Nevertheless I think it's a bug which should be fixed,
though it will surely break some scenes, making them too
dark ;-(

Yeti


Post a reply to this message

From: Micha Riser
Subject: Re: scattering media emits light
Date: 22 Aug 2002 07:19:34
Message: <3d64c8c5@news.povray.org>
David Necas (Yeti) wrote:

> In article <3D6289DE.A0A75FA6@luxlab.com>, Kari Kivisalo wrote:
> 
> However, there's a probably a workaround: use CSG to cut
> a small spehre (or whatever) just around the light source
> from the media-container object to get it ``outside''.

It seems to work as intended if you put a small sphere with pigment{rgbt 1} 
around the light_source. However do not use rgbft 1.. this produces a 
different result (why?)

> 
> Nevertheless I think it's a bug which should be fixed,
> though it will surely break some scenes, making them too
> dark ;-(

I think you can report it to p.bugreports.

-- 
http://objects.povworld.org - the POV-Ray Objects Collection


Post a reply to this message

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