|
|
"Bruno Cabasson" <bru### [at] alcatelaleniaspacefr> wrote:
> "Bruno Cabasson" <bru### [at] alcatelaleniaspacefr> wrote:
>
> > AFAIK, an image_map is only defined in the x-y plane. So, I guess that using
> > it as a 3 dimensional pattern will lead to non-zero values only in that
> > plane, and therefore your density will be non-zero in an infinitely thin
> > slice of your container, ... which I am afraid will also be valuated to
> > zero.
> >
> > Regards.
>
> Ooops! not 100% awake this morning ... My reply was not very smart ...
> Forget it. Mike's is much more sensible ...
I had a cofee and my brain functions a little now ;)
This piece of code works:
#declare my_pattern = function
{
pigment
{
image_map
{
png "my_image.png"
map_type 0
interpolate 2
once
}
}
}
box
{
0, 1
pigment {rgbt 1}
hollow
interior
{
media
{
emission Red
density {function {my_pattern(x,y,z).red}}
}
media
{
emission Green
density {function {my_pattern(x,y,z).green}}
}
media
{
emission Blue
density {function {my_pattern(x,y,z).blue}}
}
}
}
Regards
Post a reply to this message
|
|