|
|
In article <3c7d1ca8@news.povray.org>, the### [at] webde (theVIPER)
wrote:
> When a slope pattern based pigment is used in a function, it always returns
> the beginning of the color_map.
> This seems logical, because the function only has the position in space and
> not the normal vector.
>
> Does anyone know a workaround (or dirty trick ;) for this?
The only thing I can think of would be to do *all* the calculations in
the function. This would be fairly easy for simple objects like spheres,
but very difficult for more complex ones. A height_field should be
fairly easy to approximate, though.
The main problem is that the functions will be extremely complex,
because functions currently can't handle vector expressions. This also
means they will be quite slow...
Hmm...use the slope pattern with a black-white color_map, a finish with
diffuse 0 and ambient 1, and render an image with that. Use that image
as input to a function...and you have slope data available to functions!
It'll only work for flat objects like height fields though.
Really, this information should be made available to functions...when a
function pattern is evaluated on a surface, the ray and intersection
information could be passed to it through predefined parameters like the
xyz coordinates are now. The information could also be passed along to a
pattern or pigment if applicable. If evaluated elsewhere, as media
density for example, dummy information could be used.
However, actually writing the code for all this is a bit more work...
--
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/
Post a reply to this message
|
|