Hi, here is what I want to do: I have a cube (it could be a rectangle later
on) and I have made it hollow and filled it with absorbing media and made
the cube clear. the light source is above it. I want to progressively
change the amount I am absorbing as I go away from the light. I want to
absorb more light the further away I get from the light source. I figure I
have to use a density_map but I'm not sure how to that for a cube (or
similar) shape. I have done a density_map for a sphere with emitting media
before. Thanks for any help. :)
From: M a r c
Subject: Re: absorbing media question
Date: 25 Jul 2006 06:01:43
Message: <44c5ec07$1@news.povray.org>
web.44c59203d1424b84a6ac26a70@news.povray.org...
> Hi, here is what I want to do: I have a cube (it could be a rectangle
later
> on) and I have made it hollow and filled it with absorbing media and made> the cube clear. the light source is above it. I want to progressively> change the amount I am absorbing as I go away from the light. I want to> absorb more light the further away I get from the light source. I figure I> have to use a density_map but I'm not sure how to that for a cube (or> similar) shape. I have done a density_map for a sphere with emitting media> before. Thanks for any help. :)>>>
This could work
#declare Material1 =
material
{
texture
{
pigment
{
color rgbt 1
}
}
interior
{
media
{
absorption rgb <1.0, 1.0, 1.0>
density
{
boxed
color_map
{
[ 0.0 rgb 0 ]
[ 1.0 rgb 1 ]
}
}
}
}
}
mine nous apporta ses lumieres en ce 24/07/2006 23:38:
> Hi, here is what I want to do: I have a cube (it could be a rectangle later> on) and I have made it hollow and filled it with absorbing media and made> the cube clear. the light source is above it. I want to progressively> change the amount I am absorbing as I go away from the light. I want to> absorb more light the further away I get from the light source. I figure I> have to use a density_map but I'm not sure how to that for a cube (or> similar) shape. I have done a density_map for a sphere with emitting media> before. Thanks for any help. :)> > >
You can use a simple gradient pattern. As your light is above the box, a
gradient y dencity_map{[0 rgb 1][1 rgb 0]} would be apropriate. Scale it
verticaly to slightly over match the hight of the box. If the box is 2 units
high, scale the gradient by 2.001 in the y direction to prevent the pattern from
starting to repeat at the top of the box. Translate it verticaly so that it
matches the base of the box.
--
Alain
-------------------------------------------------
BACHELOR: A man who never makes the same mistake once.