POV-Ray : Newsgroups : povray.general : Transparent media for volume rendering : Re: Transparent media for volume rendering Server Time
4 Aug 2024 20:16:06 EDT (-0400)
  Re: Transparent media for volume rendering  
From: Tom Melly
Date: 11 Feb 2003 12:27:31
Message: <3e493283@news.povray.org>
"Rob Smallshire" <rob### [at] mvecom> wrote in message
news:web.3e4928b37b9552ea35ea56ad0@news.povray.org...
>
> Each of my volumes is created in its own scene file containing code like the
> following:
>
> box {
> 0 , 1
>   texture {
>     pigment {
>       rgbft 1
>     }
>   }


Are the boxes the same for each media? (same position, same dimensions).

If so, it looks like there might be a bug in povray ("looks" - these things
often turn out to have a reasonable explanation).

Looking into your problem, I found that if I had two co-incident spheres with
media, the second sphere cancelled out the first sphere's media.

The solution was to make one of the spheres a slightly different size.

Here was the code I played with (change the radius of the second sphere to 1 to
see the problem - oh, and btw, if you have a lot of media-shapes, don't forget
to set max_trace_level suitably high):

camera {
  location  <4.0, 0.0,0 >

  look_at   <0.0, 0.0,  0.0>
}

light_source {
  <0, 0, 0>            // light's position (translated below)
  color rgb <1, 1, 1>  // light's color
  translate <-30, 30, -30>
}

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

sphere{
  0, 1
  pigment{rgbf 1}
  hollow
  interior{
    media {
      emission <0.1,0,0>
      method 3
      density{agate scale 1 density_map{[0.5 rgb 0][0.5 rgb 1]}}
    }
  }
}

sphere{
  0, 1.001 // change this to 1 to see the problem
  pigment{rgbf 1}
  hollow
  interior{
    media {
      emission rgb<0,0,0.1>
      method 3
      density{wrinkles scale 1 density_map{[0.5 rgb 0][0.5 rgb 1]}}
    }
  }
}


Post a reply to this message

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