POV-Ray : Newsgroups : povray.text.scene-files : Media Question Server Time
24 Dec 2024 11:57:10 EST (-0500)
  Media Question (Message 1 to 3 of 3)  
From: Tom Melly
Subject: Media Question
Date: 15 Mar 2000 12:32:31
Message: <38cfc92f$1@news.povray.org>
I'm somewhat confused by the different results shown below for BoxA and
BoxB. Both boxes are clear, below the camera and light and filled with the
same scattering media. BoxA, which is a shallow box, behaves as I expect -
the light is scattered, some back towards the camera, and hence shows up as
white. BoxB, which is much deeper, shows up as black (with white spots in
ordinary POV, solid black in MegaPOV). I don't understand why the depth of
the box has an impact on scattering media in this situation. After all, if I
look at a cloud, it shows as white irrespective of the physical thickness of
the cloud (provided the cloud is not too thin).

#include "colors.inc"

#declare AorB = 1; // 1=BoxA, any other val for BoxB

light_source{<0,0,0> color White*4 translate <-60, 30, -30>
media_interaction on}
camera{location  <0.0, 5.0, -5.0> look_at   <0.0, 0.0,  0.0>}

// ----------------------------------------

#declare Plain_White_Scattering_Media =
media{
  scattering{1, White}
}

#declare BoxA =  // nice 'n' white in both POV and MP (method 3 for MP)
box
{
  <-10000, -1, -10000>
  < 10000,  0,  10000>
  pigment{rgbf<1,1,1,1>}
  hollow on
  interior{media{Plain_White_Scattering_Media}}
}

#declare BoxB = // completely black (with white spots in POV, pure black in
MP)
box
{
  <-10000, -10000, -10000>
  < 10000,  0,  10000>
  pigment{rgbf<1,1,1,1>}
  hollow on
  interior{media{Plain_White_Scattering_Media}}
}

#if (AorB  = 1)
  object{BoxA}
#else
  object{BoxB}
#end


Post a reply to this message

From: Jerome
Subject: Re: Media Question
Date: 16 Mar 2000 07:34:46
Message: <38D0D4E6.F3426478@iname.com>
Tom Melly wrote:
> 
> I'm somewhat confused by the different results shown below for BoxA and
> BoxB. Both boxes are clear, below the camera and light and filled with the
> same scattering media. BoxA, which is a shallow box, behaves as I expect -
> the light is scattered, some back towards the camera, and hence shows up as
> white. BoxB, which is much deeper, shows up as black (with white spots in
> ordinary POV, solid black in MegaPOV). I don't understand why the depth of
> the box has an impact on scattering media in this situation. After all, if I
> look at a cloud, it shows as white irrespective of the physical thickness of
> the cloud (provided the cloud is not too thin).
> 
	With the deeper box, nearly all samples are taken in the
middle of the box where all the light from the light_source
has been absorbed while going in. In standard POV, samples
are taken at random, so for some points you've got a fair
chance of having a sample that's taken near enough the side
to be lighted. In MegaPOV with method 2 or 3, the samples
are regularly spaced and all are taken inside.
	If you push the samples count waaayyy up, you'll notice
that the effect diminishes... Another solution is to add
another box completely transparent, hollow, shadowless...
just inside your container to make POV take samples near the
sides:

#declare BoxB = // completely black (with white spots in
POV, pure black in MP)
union { // <-----------Add this
box
{
  <-10000, -10000, -10000>
  < 10000,  0,  10000>
  pigment{rgbf<1,1,1,1>}
  hollow on
  interior{media{Plain_White_Scattering_Media}}
}
box {  // <-----------Add the following lines
  <-9999, -9999, -9999>, < 9999, -1, 9999>
  pigment { rgbf 1 }
  hollow
  no_shadow
}

		Jerome
-- 

* Doctor Jekyll had something * mailto:ber### [at] inamecom
* to Hyde...                  * http://www.enst.fr/~jberger
*******************************


Post a reply to this message

From: Tom Melly
Subject: Re: Media Question
Date: 16 Mar 2000 16:07:45
Message: <38d14d21@news.povray.org>
Aha! A model for media that I can understand. I hadn't realised, and not yet
worked out, about the middle of the media being the only area sampled with
the defaults. That seems to fit with what I've seen. Many thanks. I won't
need to use the union - great tip though - as the shallow box meets my
needs. I was just very confused as to what was going on.

--
Tom Melly
tom### [at] tomandluforce9couk
http://www.tomandlu.force9.co.uk

Jerome <ber### [at] inamecom> wrote in message
news:38D0D4E6.F3426478@iname.com...

> With the deeper box, nearly all samples are taken in the
> middle of the box where all the light from the light_source
> has been absorbed while going in. In standard POV, samples
> are taken at random, so for some points you've got a fair
> chance of having a sample that's taken near enough the side
> to be lighted. In MegaPOV with method 2 or 3, the samples
> are regularly spaced and all are taken inside.
> If you push the samples count waaayyy up, you'll notice
> that the effect diminishes... Another solution is to add
> another box completely transparent, hollow, shadowless...
> just inside your container to make POV take samples near the
> sides:
>
> #declare BoxB = // completely black (with white spots in
> POV, pure black in MP)
> union { // <-----------Add this
> box
> {
>   <-10000, -10000, -10000>
>   < 10000,  0,  10000>
>   pigment{rgbf<1,1,1,1>}
>   hollow on
>   interior{media{Plain_White_Scattering_Media}}
> }
> box {  // <-----------Add the following lines
>   <-9999, -9999, -9999>, < 9999, -1, 9999>
>   pigment { rgbf 1 }
>   hollow
>   no_shadow
> }
>


Post a reply to this message

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