POV-Ray : Newsgroups : povray.general : Colour from single trace : Re: Colour from single trace Server Time
24 Apr 2024 00:58:03 EDT (-0400)
  Re: Colour from single trace  
From: Bald Eagle
Date: 27 Oct 2018 10:05:01
Message: <web.5bd46f8f306629fe458c7afe0@news.povray.org>
"Paul Bourke" <pau### [at] gmailcom> wrote:
> I am aware of the trace macro that returns the intersection point and normal at
> that point on a object given a ray (point and direction). But is there a way to
> get the colour?

Hi Paul!
Good to see you on here.

In functions.inc, there is eval_pigment which returns the pigment at any given
vector location.

Pre defined functions
eval_pigment(Pigm, Vect): This macro evaluates the color of a pigment at a
specific point. Some pigments require more information than simply a point,
slope pattern based pigments for example, and will not work with this macro.
However, most pigments will work fine.

Parameters:

Vect = The point at which to evaluate the pigment.
Pigm = The pigment to evaluate.


Thanks for all of the information you've posted over the years - it's been a
great help as well as an inspiration.


Bill Walker


Post a reply to this message

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