POV-Ray : Newsgroups : povray.advanced-users : function pigment problems : function pigment problems Server Time
5 Jul 2024 15:43:15 EDT (-0400)
  function pigment problems  
From: sooperFoX
Date: 16 Dec 2007 22:00:01
Message: <web.4765e6202ddb4a6763acc1e50@news.povray.org>
Hi all, I hope this is the right place to post this query. (My apologies if
not!)

I am attempting to use a pigment function to multiply the colour values of a
somewhat sizeable set (1024) of previously rendered images, by a colour value
from another source (different for each image in the set), and average the
results together.

(I have rendered the same scene 1024 times with a single light source in
different locations arranged in a hemisphere, and want to multiply each image
with the colour value at the corresponding location from an HDR image. In this
way I can see my scene with any lighting I want, without having to re-render
the geometry.)

According to the documentation the "average" pigment type only supports up to
256 pigments to average. Since I need to be able to do more than that I wrote a
function to calculate it with a loop.

So far, all is good.

The problem occurs when the colour value for any channel (R, G, B) exceeds 1.0 -
the value for that channel seems to wrap back around to 0.0 and this is causing
strange colour banding effects. I will post an image to p.b.i when I get home
from work in a few hours.

So my question is - how do I preserve my large colour values? For example, the
uffizi light probe available from Paul Debevec's gallery has very large colour
values and the banding is rather extreme.

I have already tried setting the output file type to .HDR (+FH) but it does not
help. I am using the 3.7 beta by the way.

Any help would be greatly appreciated!

- sooperFoX


Post a reply to this message

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