POV-Ray : Newsgroups : povray.advanced-users : How to make my own 3D pigment? : Re: How to make my own 3D pigment? Server Time
26 Jun 2024 08:51:31 EDT (-0400)
  Re: How to make my own 3D pigment?  
From: clipka
Date: 22 Jun 2011 18:19:56
Message: <4e026a8c$1@news.povray.org>
Am 22.06.2011 16:40, schrieb Jaime Vives Piqueres:

>> I want to render objects having a self-made 3D pigment that is
>> defined via 3 user-defined functions (one for red, one for green and
>> one for blue), or via one function that returns an RGB color vector
>> directly
>>
>> (Or even an 4- or 5-dimensional rgbf, rgbt or rgbft vector)
>>
>> Is that possible, somehow?
>>
>>
>> As far as I understand a user-defined pigment functions just returns
>> a single float that is used as an index in a color_map.
>>
>
> If I understood it correctly, I think the "average" pattern should help
> there: create 3 separate pigments for each function, then use a
> pigment_map to average them together.

Yup, AFAIK that's the only way to do it. For each channel, use a 
color_map ranging from "rgbft 0" to "red N" (or "green N", "blue N", 
etc., respectively), where N is the number of channels you intend to 
mix, e.g. 4 for rgbf. (This is required because what you really want is 
a sum, not the average.)


Post a reply to this message

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