|
|
Hi, all!
I'm trying to use an image_map to color some media in a transparent
box--that is, "extruding" the image_map's colors in the +Z direction,
"filling" the box from front to back with emitting (or scattering) media,
the colors of which correspond to the image_map colors. My image_map has
an alpha channel as well (the idea being that the transparent parts of the
image_map will create NO media density.)
A recent post got me to thinking about this...
http://news.povray.org/povray.general/thread/%3Cweb.44174d8d9ca30044945ca8690%40news.povray.org%3E/
I'm not even sure that what I'm attempting to do is possible; I've tried
various ideas with no luck. Reading the POV docs in sections 3.5.11.15 and
16, I'm thinking that the image_map should first be turned into a pattern
function(?)... Like this:
#declare my_pattern =
function{
pigment{
image_map{png "my_image.png"
map_type 0
interpolate 2
once
}
}
}
and then *trying* to apply it to an interior{media} statement,
like this example (which doesn't work, and generates an error message):
interior{
media{
emission .5
density{
my_pattern
}
}
}
Am I on the wrong track entirely? When I try to use the image_map itself in
the media's density block, I get the error message, "image_map can only be
used in a pigment statement." Perhaps my image_map should instead be
turned into a color_map somehow (?)
I feel like I'm overlooking something obvious. Any help or suggestions would
be most appreciated. This technique would be *very* useful.
BTW, my_pattern works perfectly well when used properly as an isosurface
function, so I'm at a loss as to why it isn't working in media.
Ken
Post a reply to this message
|
|