POV-Ray : Newsgroups : povray.tools.poser : Poseray: #version and and file gamma : Re: Poseray: #version and and file gamma Server Time
19 Apr 2024 17:03:40 EDT (-0400)
  Re: Poseray: #version and and file gamma  
From: FlyerX
Date: 19 Sep 2014 15:54:05
Message: <541c89dd$1@news.povray.org>
On 9/19/2014 9:10 AM, clipka wrote:
> Having recently updated to a new version of PoseRay (v3.13.23.587 to be
> precise), I noticed two things that I suggest to change:
>
>
> (1) PoseRay does not write a "#version" statement in the scene file. As
> of POV-Ray 3.7.0, this statement is now mandatory (ideally it should
> even be the very first non-comment statement) - if such statement is
> missing, the scene is presumed to be a legacy (v3.6) scene, and certain
> features (most notably gamma handling) will operate in a compatibility
> mode. (You'll also get a waning message.)
>
> The other is directly related to this:
>
> (2) PoseRay writes image_map statements with a "gamma srgb" and bump_map
> statements with a "gamma 1.0"; both would be redundant if the scene
> specified "#version 3.7", and it is actually recommended to /not/ use
> these statements unless working with image files that are known to cause
> problems with POV-Ray's automatic image gamma handling. (And while I
> haven't tested it, using "gamma srgb" with high dynamic range images by
> default would actually be outright wrong, because these file formats
> default to a gamma of 1.0.)
>
>
> Speaking of gamma and version, it might be helpful for users of POV-Ray
> 3.6 if PoseRay would provide an option (which I'd suggest to be on by
> default) to automatically convert any non-HDR image files from sRGB (or
> whatever gamma they have according to in-file information) to a gamma of
> 1.0. (Care should be taken though to prevent colour banding; dithering
> should probably solve that.)

thank you very much for the feedback.

(1) The version is in the scene ini file as version=3.7 and it seems to 
work as the SSLT works which is a 3.7 exclusive feature. Is using 
#version (pov) instead of version (ini) the proper approach? I used the 
one on the ini file as it was a single entry but I can move it to the 
main pov file as a #version statement. Since the inc files could be used 
on other scenes, can #version be repeated on each file or would that 
lead to problems?

(2) I will make the gamma statements optional. I found some problematic 
image maps before. I suppose gamma 1.0 is still needed for transparency 
maps. I tried a while back and I think it was giving me the wrong 
transparency unless I set the gamma to 1.0. You are right about the HDR 
images, gamma srgb will give the wrong results.

The image library I use in PoseRay is rather old and very basic, gamma 
information may not readable, and any export would have to be to jpeg or 
tga. I will look into it but this may take a long time. One workaround 
would be to select "copy all maps to the same directory" in the export 
dialog. Once all the maps are in the same place run an external program 
on them like image magick and batch process them. I think I may just 
look into this instead as it may be more powerful.

FlyerX


Post a reply to this message

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