POV-Ray : Newsgroups : povray.binaries.scene-files : eval_pigment() and trace() HowTo : Re: eval_pigment() and trace() HowTo Server Time
27 Apr 2024 20:35:35 EDT (-0400)
  Re: eval_pigment() and trace() HowTo  
From: clipka
Date: 12 Jul 2016 02:00:27
Message: <5784877b$1@news.povray.org>
Am 12.07.2016 um 07:20 schrieb Kenneth:

>> 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."

And what exactly would make you think so?

If you try it out, you'll find that eval_pigment() works perfectly fine
with full-fledged rgbft colours.

Maybe you somehow got the impression that the `.x`, `.y` and `.z`
referred to the pigment colour's components? They don't. They instead
refer to the input point, passing the individual coordinates as separate
parameters to the pigment function.


Post a reply to this message

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