POV-Ray : Newsgroups : povray.binaries.scene-files : eval_pigment() and trace() HowTo : Re: eval_pigment() and trace() HowTo Server Time
28 Apr 2024 12:26:16 EDT (-0400)
  Re: eval_pigment() and trace() HowTo  
From: Kenneth
Date: 12 Jul 2016 01:25:00
Message: <web.57847dd1734cd25733c457550@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:

>
> For general information purposes,
> eval_pigment is a macro that is defined in functions.inc as shown below.
>
> -----------------------------------------------
> #macro eval_pigment(pigm, vec)
>     #local fn = function { pigment { pigm } }
>     #local result = (fn(vec.x, vec.y, vec.z));
>     result
> #end
> -----------------------------------------------

It's always been interesting to me that the macro was designed to work only with
the r-g-b color components, and not with the f and t components as well. I
assume there's a reason for that (a technical one?); but evaluating a color like
rgb <.3,.5,.7,.4,.2> will return just the 'opague' colors, not the "colors +
f-and-t mix."

Or maybe my own logic about 'color mixing' is in error, when it comes to
*translucent* color shades (?). I admit that the effects of f and t on a color
are not the same as, say, adding *white* to get a pastel tint. But eval_pigment,
as-is, gives a kind of false result when working with translucency-- or so it
seems.


Post a reply to this message

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