POV-Ray : Newsgroups : povray.advanced-users : Lightsys IV and SpectralRender yield different light levels : Re: Lightsys IV and SpectralRender yield different light levels Server Time
3 May 2024 10:14:31 EDT (-0400)
  Re: Lightsys IV and SpectralRender yield different light levels  
From: scott
Date: 27 Jul 2016 05:29:09
Message: <57987ee5$1@news.povray.org>
>   #declare Acc = <0, 0, 0>;
>   #for (I, 0, 35)
>     #local Wl = 380 + I * 10;
>     #declare Acc = Acc + CMF_xyz (Wl) * LEVEL; // Illuminant E
>   #end
>   #declare C = Acc / 36;

What units are the return value from CMF_xyz (specifically, is it nm^-1 
or does it return the xyz for a 10nm band width)? I suspect you need to 
multiply the value by 10 if you are using 10 nm width spectral bands.

Also I don't see why you need the Acc/36 line, the result should be the 
sum of all the wavelength contributions, not the average.

If you change those two things, does the below give the correct result?

#declare Acc = <0, 0, 0>;
#for (I, 0, 35)
   #local Wl = 380 + I * 10;
   #declare Acc = Acc + CMF_xyz (Wl) * 10 * LEVEL; // Illuminant E
   #end
#declare C = Acc;


Post a reply to this message

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