|
![](/i/fill.gif) |
use### [at] domain invalid wrote:
> I might have been more precise in my question.
> Given an object, how can I know its color at a given point ?
> I was thinking of a function getColor(obj,position), something like
> min_extent(obj), for example.
As far as I know you can't. You can, however, remember the pigment you assigned
to the object, and use that eval_pigment() macro Chris mentioned.
The *apparent* color of an object as seen from point P, however, is yet another
story: You simply cannot do that, as it depends on lighting conditions and - if
the object has a reflective or refractive material - other objects nearby. You'd
need to set up a complete scene, trace it, and use the resulting image in a
pattern function to retrieve individual pixels from it for your main shot.
Is there something specific you intend to do? Maybe there's a different way to
achieve the desired results.
Post a reply to this message
|
![](/i/fill.gif) |