|
![](/i/fill.gif) |
In article <3c481511@news.povray.org>,
"Claude Mench" <c.m### [at] adilinstruments com> wrote:
> generaly it is a way to transport light in the interior of
> objects. I thought that POVRAY medai where only used for
> athmospheric effects.
Media is just a general "volumetric" effect, it is useful for anything
that depends on light scattering/absorption/emission in a 3D volume
instead of a surface. I have done experiments with candles before, using
media to get a translucent effect.
Here, try this quick-n-dirty scene...it isn't perfect, but demonstrates
the translucence. Real wax would have some surface characteristics like
highlights, and I don't know the typical iors of waxes, but that isn't
too critical since it is nearly opaque.
#include "colors.inc"
#version 3.5;
global_settings {assumed_gamma 1}
#default {finish {ambient 0}}
#declare CamLoc = <0, 3.5,-8>;
camera {
location CamLoc
up y*image_height/image_width right x
angle 35
look_at <0, 0, 0>
}
light_source {CamLoc color White*0.05}
box {<-100, 0,-100>, < 100, 0, 100>
texture {pigment {checker color Black, color White}}
}
light_source {< 0, 3.2, 0> color White
fade_power 2
fade_distance 2.5
looks_like {
sphere {< 0, 0, 0>, 0.2
texture {
pigment {color rgb < 1, 0.9, 0.75>}
finish {ambient 1}
}
scale < 1, 2, 1>
}
}
}
difference {
merge {
cylinder {< 0, 0, 0>, < 0, 1, 0>, 1}
sphere {< 0, 0, 0>, 1 scale < 1, 2, 1> translate y*1}
}
sphere {y*3, 0.5}
// replace with "rgb 1" to see effect without translucence
texture {pigment {color rgb 1}}
hollow
interior {
ior 1.5
media {
scattering {1, color < 1, 0.15, 0.15>*3 extinction 0}
absorption color rgb < 0.8, 1, 1>*6
method 3 intervals 3 samples 5
}
}
}
--
--
Christopher James Huff <chr### [at] mac com>
Post a reply to this message
|
![](/i/fill.gif) |