POV-Ray : Newsgroups : povray.newusers : calculation for pixel normal value and color value in source code : Re: calculation for pixel normal value and color value in source code Server Time
7 Jul 2024 07:40:14 EDT (-0400)
  Re: calculation for pixel normal value and color value in source code  
From: Warp
Date: 11 Feb 2010 10:38:39
Message: <4b74247f@news.povray.org>
Yunying <zyu### [at] gmailcom> wrote:
> This is the reply suggestion from Warp, thanks for his/her help.

> >>  You might be able to do that without having to modify the source code.

>   Define three pigments, each using a slope_map oriented towards each of
> the main axes, and each using one of the RGB components as its color map
> (ie. the first would be from black to red, the second from black to green,
> and so on). Then use the average of these pigments as your overall pigment
> of the object.

  I should have said "slope pattern" rather than "slope_map". I got the
terms confused. Anyways, here's some relevant documentation:

http://wiki.povray.org/content/Documentation:Reference_Section_5#Pigment
http://wiki.povray.org/content/Documentation:Reference_Section_5.5#Slope
http://wiki.povray.org/content/Documentation:Reference_Section_5.3#Average

  Basically: Create three pigments. Each pigment should use a slope pattern
pointing towards each of the three main axes, and their color maps should be
a desired map between black and the main RGB color component. Then the final
pigment can be constructed by creating a pigment which uses an average
pigment_map of those three.

-- 
                                                          - Warp


Post a reply to this message

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