POV-Ray : Newsgroups : povray.general : Is media only sampled on an object's surface? : Is media only sampled on an object's surface? Server Time
30 Jul 2024 14:26:12 EDT (-0400)
  Is media only sampled on an object's surface?  
From: Andy
Date: 7 Dec 2008 02:05:01
Message: <web.493b75459e6e18765e24b24a0@news.povray.org>
Hi all,

In some renderings of a cube with interior media I just did it seems like the
media is only being sampled on the surface, even though the help file says
media get sampled in intervals throughout an object.  I tried changing the
number of intervals to 10 in case the default is erroneously 1, and while it
took longer to render I got the same result.

I'm using POV-Ray version 3.7 beta 28.

Here's my scene, it's basically a box that emits with a spherical wave pattern I
defined myself:

------------------------------------------------------


#include "colors.inc"
#include "math.inc"

#declare Wave = function(ox, oy, oz, px, py, pz, amp, wl, sp, time) { amp *
cos(2 * pi / wl * sqrt(pow(px - ox, 2) + pow(py - oy, 2) + pow(pz - oz, 2)) -
time * sp / wl * 2 * pi) };

#declare TIME = clock;

box {
  -10, 10
  hollow

  material {
    texture {
      pigment { rgb 0.15 transmit 1 }
    }

    interior_texture {
      pigment { rgb 0.15 transmit 1 }
    }

    interior {
      media {
        intervals 10
        emission 0.15
        density {
          function { Wave(10, 10, -10, x, y, z, 0.25, 5, 5, TIME) + 0.25 }
        }
      }
    }
  }
}

light_source {
  <10, 10, -30>, White
}


camera {
  location <0,0,-30>
  look_at 0
  angle 70
}

--------------------------------------------------------------------

In my renderings the spherical ripples radiating from the top right-hand corner
only appear to be emitting on the surface of the box.  Also, the back face
doesn't look dark enough in the less dense areas (I bet it would look solid
grey if there weren't ripples in front.  This seems really fishy to me.  I'd
appreciate any explanations/solutions!


Post a reply to this message

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