POV-Ray : Newsgroups : povray.general : Is media only sampled on an object's surface? : Re: Is media only sampled on an object's surface? Server Time
4 Nov 2024 13:04:12 EST (-0500)
  Re: Is media only sampled on an object's surface?  
From: Alain
Date: 9 Dec 2008 16:02:16
Message: <493edcd8@news.povray.org>
Andy nous illumina en ce 2008-12-07 02:03 -->
> 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.
There is no eroneous value. 1 is the correct value for the default sampling method.
> 
> 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!
> 
> 

In my test, it don't look like it's comming only from the surfaces, but from the 
whole volume. A slight rotation result in a significant change in the aspect.

Increasing intarvals will greatly slow down the rendering speed, use samples 
instead and leave intervals at it's default value. 100 samples over 1 intervals 
are way faster than 30 samples over 10 intervals.

You don't need interior_texture. You only use it when you want the interior to 
have a different texture than the exterior.

You can remove that light. There is nothing for it to interact with.

Changing the container to a sphere give beter/more pleasing result.

-- 
Alain
-------------------------------------------------
   My wife's such a bad cook, the dog begs for Alka-Seltzer.
   	Rodney Dangerfield


Post a reply to this message

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