POV-Ray : Newsgroups : povray.advanced-users : function pigment problems : Re: function pigment problems Server Time
5 Jul 2024 16:33:47 EDT (-0400)
  Re: function pigment problems  
From: Jan Dvorak
Date: 16 Dec 2007 23:37:02
Message: <4765fcee@news.povray.org>
sooperFoX napsal(a):
> 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
> 
> 
as for the average, you can nest multiple averages. Average each 256 of 
the 1024 and then group the four results together.
as for the wrapping, I've got no idea


Post a reply to this message

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