POV-Ray : Newsgroups : povray.beta-test : Syntax error message? : Re: Syntax error message? Server Time
5 May 2024 09:52:49 EDT (-0400)
  Re: Syntax error message?  
From: clipka
Date: 7 Dec 2012 07:21:14
Message: <50c1df3a@news.povray.org>
Am 07.12.2012 09:47, schrieb Thomas de Groot:
> In an external .inc file I have the following line:
>
> #declare srgbLightTanned1 = srgb <226, 167, 135>/255;
>
> In my material definition I have written, using Poseray's macros:
>
> #declare SkinColor = srgbLightTanned2;
>
> #declare PP_Head = pigment {pigment_multiply(p_map7,pigment {srgb
> SkinColor})}
>
> ....which should be written without the /srgb/ code to be correct:
>
> #declare PP_Head = pigment {pigment_multiply(p_map7,pigment {SkinColor})}
>
> Both lines render without a glitch but give very different render results.
>
> Should there not be a warning message telling about the extra and
> unwanted srgb code?

Not really; for instance, you might be using a legacy 3rd-party include 
file, designed for a "assumed_gamma 2.2" scene, specifying

     #declare SkinColor = rgb <226, 167, 135>/255;

In that case, you'd very likely want to convert that to whatever 
assumed_gamma you're using; that's where specifying

     srgb SkinColor

does makes sense.

Note that colors specified with the "srgb" keyword are not a different 
flavor of color - they're converted "on the spot" into regular rgb 
colors. So the parser cannot catch a double application of the srgb keyword.


Post a reply to this message

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