POV-Ray : Newsgroups : povray.beta-test : Intended image_pattern, etc, warning not generated. (v3.8 beta 2) Server Time
15 Apr 2024 14:34:41 EDT (-0400)
  Intended image_pattern, etc, warning not generated. (v3.8 beta 2) (Message 1 to 1 of 1)  
From: William F Pokorny
Subject: Intended image_pattern, etc, warning not generated. (v3.8 beta 2)
Date: 13 Mar 2023 16:30:27
Message: <640f87e3$1@news.povray.org>
Issue seen while playing with image_pattern{} vs image_map{}.

---
In the function parse_image() located in the file:

<source install>/source/parser/parser_materials.cpp

there is code to generate a warning when no image gamma is specified and 
the image is being used in a height_field, bump_map or image_pattern. 
The code back to v3.7 at least, has never worked. Where today the code has:

if (options.gammacorrect && !options.gammaOverride)

it should read:

if (!options.gammacorrect && !options.gammaOverride)

In povr I also added a second warning about using exr and hdr images 
files with the height_field, bump_map or image_pattern.

if (!GammaCorrect)
{
     if (!options.gammacorrect && !options.gammaOverride)
     {
         Warning("...");
     }
     if ((filetype==EXR_FILE) || (filetype==HDR_FILE))
     {
         Warning("...");
     }
}

---
Using:

image_pattern { "test.exr" ... }

and not specifying a gamma correction, I now get:

File 'hmm3.pov' line 67:
Parse Warning:

Input image gamma not specified for height_field, bump_map or 
image_pattern; no gamma adjustment (equals gamma 1.0) performed on input 
image; Specify the appropriate gamma correction or, to be rid of this 
warning, "gamma 1.0".

File 'hmm3.pov' line 67:
Parse Warning:

High Dynamic Range Image being used with a height_field, bump_map or 
image_pattern; This will likely lead to artefacts as such images have 
internal values outside the zero to one range.


Post a reply to this message

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