POV-Ray : Newsgroups : povray.newusers : Should Parsing really take that long? How to speed it up? : Re: Should Parsing really take that long? How to speed it up? Server Time
23 Apr 2024 09:57:04 EDT (-0400)
  Re: Should Parsing really take that long? How to speed it up?  
From: clipka
Date: 4 Dec 2015 14:40:01
Message: <5661ec11@news.povray.org>
Am 04.12.2015 um 17:54 schrieb ILM:

> 3) What exactly is the error about? Can I fix it?

This warning is generated because POV-Ray detected that the .pov file...

- seems to have been designed for POV-Ray 3.6 or older,
- enables gamma handling, and
- loads a PNG as an input image file.

In POV-Ray 3.6, gamma handling did not extend to input image files,
except for /some/ flavours of the PNG format.

Gamma handling has been improved significantly in 3.7, and part of the
improvement includes gamma handling for all input image files; this is a
breaking change, meaning that scenes origially designed for 3.6 would no
longer render as expected, so 3.7 provides a backward compatibility mode
to mimick 3.6's behaviour.

However, due to fundamental architectural changes in 3.7 it would have
been unreasonably difficult to mimick 3.6's input file gamma handling
(or absence thereof) to every little detail, including the
inconsistencies in the handling of PNG images. Instead, POV-Ray 3.7
outputs the warning you are seeing, whenever it is in 3.6 compatibility
mode with active gamma handling and a PNG input image file is loaded, to
indicate that backward compatibility cannot be guaranteed for this case.

To disable the warning, you'd have to modify the .pov file.


Gamma handling is the compensation for a certain quirk of how we
represent colours in computer graphics. In a nutshell, the values stored
for each colour channel typically don't represent brightness levels in a
linear fashion; for instance, when using numeric values of 0 to 255, a
value of 127 (about half the maximum value) typically corresponds to a
brightness level of just about 20% on a linear scale (which happens to
be _perceived_ as about half as bright as the maximum, but physically it
isn't).

The relationship between stored values and the represented linear
brightness levels can be expressed by a formula:

    brightness = f(value/max_value)

Traditionally, the formula used to be a power law, typically written as:

             γ
    f(x) = x

(In case you're having trouble with international symbols, the "γ" above
should be the lower case greek letter gamma.)

Also traditionally, there was no global standard for the gamma parameter
in this formula, and the management of multiple differing standards for
this parameter became known as "gamma handling".

Modern standards for colour representation use a different formula, but
the term is still used in its more general sense of managing different
encoding schemes for brightness levels.

In POV-Ray, gamma handling is of particularly great importance, as the
generation of physically realistic results requires that its internal
computations operate on linear values, while users will typically expect
all material coming into and out of POV-Ray to be non-linearly encoded.
And while the common non-linear encoding schemes are at least somewhat
similar, the difference to linear encoding is significant.


> Regarding the file
> 1) It is a nearly 10 MB .pov file.

That's not a trivial scene, but I've seen .pov files four times that
size parse in less than a minute. My current guess would be that your
.pov file loads an excessive number of PNG files -- or, possibly more to
the point, that it loads a reasonable number of PNG files an excessive
number of times.


Post a reply to this message

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