POV-Ray : Newsgroups : povray.general : Reading a colour on an object : Re: Reading a colour on an object Server Time
8 Jul 2024 13:29:20 EDT (-0400)
  Re: Reading a colour on an object  
From: MichaelJF
Date: 11 Nov 2014 12:35:01
Message: <web.546247d7a4f9ea00ca410ea00@news.povray.org>
"Anthony D. Baye" <Sha### [at] spamnomorehotmailcom> wrote:
 > Thomas
>
> Since Trace only returns the point of intersection and the normal vector, and
> there's really no way to query object attributes, the best I'd think you could
> do is pass the intersection Point and the pigment to eval_pigment...
>
> Although... You might get more information from a function.   It's worth
> investigating.
>
> Regards,
> A.D.B.

That would be of help in very simple situations only. First the object must have
a pigment only and not a more complicated texture or worse an uv-mapping. Second
you must invert all transformations applied to the object after coloring it.

I can understand the wish by Thomas since one can e.g. plant grass of different
length at the object depending on the color - just a stupid idea. In fact I used
color maps, which can be evaluated with eval_pigment, sometimes to determine the
kind of vegetation in a landscape with a corresponding shape.

May be it is possible to implement it into the trace()-statement as a third
return value, but this issue and the effort necessary I cannot judge.

Best regards,
Michael


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.