POV-Ray : Newsgroups : povray.binaries.images : Re: Lightsys IV may not work correctly in POV 3.8 Server Time
6 Nov 2024 02:23:56 EST (-0500)
  Re: Lightsys IV may not work correctly in POV 3.8 (Message 1 to 1 of 1)  
From: Cousin Ricky
Subject: Re: Lightsys IV may not work correctly in POV 3.8
Date: 4 Feb 2021 14:51:53
Message: <601c5059@news.povray.org>
On 2021-01-30 4:02 PM (-4), Cousin Ricky wrote:
> See thread "FYI. Watch out for bad color to grey value conversions." in 
> povray.unix.
> 
> Macro Light_Color_Filtered() in Lightsys IV uses .gray, so scenes using 
> this macro are unlikely to have proper lighting under the latest 3.8 
> build.  This situation is temporary, until 3.8 is debugged; but in the 
> meantime, this workaround should work:
> 
> First, add this macro to lightsys.inc:
> 
>    #macro Light_DotGray (C)
>      (0.297 * C.red + 0.589 * C.green + 0.114 * C.blue)
>    #end
> 
> Then change the Light_Color() call in macro Light_Color_Filtered() to:
> 
>    Light_Color(Lct*Flt,Lm*Light_DotGray(filtered)/Light_DotGray(Lct))
> 
> I haven't tested this yet, ...

I tested the workaround, and it works.  The following light sources are 
of the hues -3, 15, 50, 135, 232.5, and 270.  Not only are the light 
intensities compromised in the 3.8 original render, but any light with 
no green component is zeroed out entirely.  With a lower saturation, the 
bug is less extreme, but still noticeable.


Post a reply to this message


Attachments:
Download 'ls4-light_color_filtered-wa-s1-v37.jpg' (14 KB) Download 'ls4-light_color_filtered-wa-s1-v38a.jpg' (13 KB) Download 'ls4-light_color_filtered-wa-s1-v38w.jpg' (15 KB)

Preview of image 'ls4-light_color_filtered-wa-s1-v37.jpg'
ls4-light_color_filtered-wa-s1-v37.jpg

Preview of image 'ls4-light_color_filtered-wa-s1-v38a.jpg'
ls4-light_color_filtered-wa-s1-v38a.jpg

Preview of image 'ls4-light_color_filtered-wa-s1-v38w.jpg'
ls4-light_color_filtered-wa-s1-v38w.jpg


 

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