POV-Ray : Newsgroups : povray.general : Assumed_gamma and .gray : Re: Assumed_gamma and .gray Server Time
25 Apr 2024 01:05:42 EDT (-0400)
  Re: Assumed_gamma and .gray  
From: clipka
Date: 19 Jan 2017 09:48:28
Message: <5880d1bc$1@news.povray.org>
Am 19.01.2017 um 13:45 schrieb Bald Eagle:
> clipka <ano### [at] anonymousorg> wrote:
> 
> [Lots of very interesting technical stuff as usual]
> 
> What appears superficially simple and straightforward almost always winds up
> being vastly more complex than most people ever think is possible, once someone
> dares to open the hood and pick underneath at the actual inner workings of a
> thing.

I hope I don't scare people away by showing the gory guts of POV-Ray ;)

>> Since this formula is embedded deep in the bowels of POV-Ray's colour
>> math, I hadn't found the guts to update it along with the other gamma
>> stuff back when 3.7.0 came up, as it would have been difficult to
>> maintain backward compatibility.
> 
> Ah... that backwards-facing stance has always been a trammel on humanity.
> 
> Just out of curiosity, isn't this the sort of thing the #version statement is
> supposed to handle?
> I (probably naively and ignorantly) thought it was supposed to do something
> like:
> #if (that version)
>      Do_It (that way)
> #else
>      Do_It (this way)
> #end
> 
> (I understand that such a manner of handling things might be extraordinarily
> difficult to get to 'reach' that deeply into the structure of the code.)

Theoretically, that's /exactly/ how it should work.

But `.grey` is only one of various places where greyscale values are
computed, and I would want to make sure all of them are handled in a
consistent manner. That /could/ be achieved by placing this "if...
else..." construct right into the function designed to compute this
stuff, but that would require making this component of POV-Ray aware of
the user's `#version` choice. Not exactly the ideal thing to do when the
goal is to make the application more modular.

Alternatively, the goal could be achieved by adding a corresponding
"if... else..." construct to each place where greyscale is computed, but
that would require identifying all such places, and then making /them/
aware of the user's `#version` choice if they aren't already.

Back when 3.7.0 was about to be released, I wasn't prepared to tackle
either of these approaches.

Now I guess I would be, but as this would imply a change in default
behaviour of a very common feature for the "assumed_gamma 1.0" mode, I
don't think the transition from 3.7.0 to 3.7.1 is the right time to do
it. Even if a simple "#version" statement would fix it, I think such a
change might be too much of a surprise for the average user, so I prefer
to postpone it to a bigger version step, possibly 3.7 to 3.8.


Post a reply to this message

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