|
|
|
|
|
|
| |
| |
|
|
From: Cousin Ricky
Subject: Lightsys IV may not work correctly in POV 3.8
Date: 30 Jan 2021 15:02:37
Message: <6015bb5d@news.povray.org>
|
|
|
| |
| |
|
|
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, because I wanted to get the info out quickly,
but it looks straightforward. Also, this workaround uses the internal
POV-Ray grayscale formula, which will keep the old behavior, but was
coded before gamma handling was seriously examined. A more accurate
formula can be found in the p.unix thread, although that formula is
accurate only for the sRGB/BT.709 color systems (which yours probably is
anyway).
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Lightsys IV may not work correctly in POV 3.8
Date: 31 Jan 2021 02:20:30
Message: <60165a3e$1@news.povray.org>
|
|
|
| |
| |
|
|
Op 30/01/2021 om 21:02 schreef Cousin Ricky:
> 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:
>
Thanks for this. One question: after 3.8 is debugged, do we need to put
Lightsys IV back to its original values? If yes, it might be worthwhile
to keep the existing code commented out.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
From: Cousin Ricky
Subject: Re: Lightsys IV may not work correctly in POV 3.8
Date: 31 Jan 2021 10:32:33
Message: <6016cd91$1@news.povray.org>
|
|
|
| |
| |
|
|
On 2021-01/31 3:20 AM (-4), Thomas de Groot wrote:
>
> Thanks for this. One question: after 3.8 is debugged, do we need to put
> Lightsys IV back to its original values? If yes, it might be worthwhile
> to keep the existing code commented out.
No, it is not necessary. In fact, if you're up to the challenge, an
even better idea would be to utilize the xyY macros in CIE.inc. But
keeping the original code commented out is not a bad idea.
I typically rename the original file anyway.
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Lightsys IV may not work correctly in POV 3.8
Date: 1 Feb 2021 02:18:57
Message: <6017ab61$1@news.povray.org>
|
|
|
| |
| |
|
|
Op 31/01/2021 om 16:32 schreef Cousin Ricky:
> On 2021-01/31 3:20 AM (-4), Thomas de Groot wrote:
>>
>> Thanks for this. One question: after 3.8 is debugged, do we need to
>> put Lightsys IV back to its original values? If yes, it might be
>> worthwhile to keep the existing code commented out.
>
> No, it is not necessary. In fact, if you're up to the challenge, an
> even better idea would be to utilize the xyY macros in CIE.inc. But
> keeping the original code commented out is not a bad idea.
>
> I typically rename the original file anyway.
Very good. I generally do the last too, with a comment in the header.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|