|
|
I would like to know if this is possible:
when I have a surface position(X,Y,Z) of an uv-mapped object
I would like to get the Pigment of a texture for this position
Hope you can help me,
REgards,
Thor
Post a reply to this message
|
|
|
|
"McHannemann" <nomail@nomail> wrote in message
news:web.4449fb22bcde337c191c02710@news.povray.org...
>I would like to know if this is possible:
>
> when I have a surface position(X,Y,Z) of an uv-mapped object
> I would like to get the Pigment of a texture for this position
>
> Hope you can help me,
>
> REgards,
>
> Thor
>
Hi Thor,
The 'eval_pigment' macro can give you the color value of a pigment at a
point in space, but I'm not sure that you'd be able to use it directly in
this instance, if that pigment is subsequently uv-mapped to a surface.
If you are able to store the UV mapping information in a machine readable
format (e.g. in an array), you may be able to work backwards to calculate
the corresponding coordinates on the 'unmapped' pigment, then use the
'eval_pigment' macro to lookup the color. The complexity of doing this will
very much depend upon the complexity of the shape and the format of the
information you are starting with (as well as your programming skills of
course).
Regards,
Chris B.
Post a reply to this message
|
|