POV-Ray : Newsgroups : povray.advanced-users : Finding Pigment / color of an object : Re: Finding Pigment / color of an object Server Time
3 Jul 2024 05:40:02 EDT (-0400)
  Re: Finding Pigment / color of an object  
From: clipka
Date: 1 Mar 2009 11:25:00
Message: <web.49aab6602533534f2ddf2a340@news.povray.org>
use### [at] domaininvalid 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

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