|
|
|
|
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Parsing issue. Density and blend_mode, blend_gamma.
Date: 9 Feb 2021 08:04:59
Message: <6022887b$1@news.povray.org>
|
|
|
| |
| |
|
|
Documenting apparent bug with parsing and new to v3.8 blend_mode and
blend_gamma options.
In playing some with a media scene Bald Eagle posted, had the thought to
try the new to v3.8 blend_mode and blend_gamma options for his color map
because I'd never used the features with media.
This fails to parse:
density {
gradient x
color_map {
blend_mode 2 blend_gama 2.5
[0.0 rgb 0.0]
[1.0 rgb 1.0]
} // end color_map
} // end density
while this works:
#declare CM = color_map {
blend_mode 0 blend_gamma 2.5
[0.0 rgb 0.0]
[1.0 rgb 1.0]
} // end color_map
density {
gradient x
color_map { CM }
} // end density
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Parsing issue. Density and blend_mode, blend_gamma.
Date: 10 Feb 2021 02:50:30
Message: <60239046@news.povray.org>
|
|
|
| |
| |
|
|
Op 09/02/2021 om 14:04 schreef William F Pokorny:
> This fails to parse:
Says: "Must have at least one color in color map"
Strange.
Otherwise, this is a nice feature which I had not been aware of (or
forgot about; so many features in POV....)
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: Parsing issue. Density and blend_mode, blend_gamma.
Date: 10 Feb 2021 14:20:48
Message: <60243210$1@news.povray.org>
|
|
|
| |
| |
|
|
On 2/10/21 2:50 AM, Thomas de Groot wrote:
> Op 09/02/2021 om 14:04 schreef William F Pokorny:
>> This fails to parse:
>
> Says: "Must have at least one color in color map"
>
> Strange.
>
> Otherwise, this is a nice feature which I had not been aware of (or
> forgot about; so many features in POV....)
>
Yes & yes.
Chased this one for most of the day - and still not got it.
For reasons still a mystery, it appears the issue is with just
'blend_gamma'. If you you specify only blend_mode everything is OK. You
can change blend_mode with no issue.
For some reason the blend_gamma token is not getting picked/seen up when
specified inside the density (or maybe media) block - that is the real
error despite the message.
I usually define my maps stand alone (this not an issue for me basically
in normal work flow) so I wondered how general the issue. Only tested
color_maps defined within a pigment - and there blend_gamma works as
expected.
Complicating things some, there is code for the color map parsing apart
from all other map parsing due trying to maintain compatibility with
some aspect of v1.0 of POV-Ray. I'll probably dump that special version
in the povr branch - if I an work out how.
In any case, this is starting to look like some sort of deeper parser
issue. At the moment I'm baffled.
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: Parsing issue. Density and blend_mode, blend_gamma.
Date: 10 Feb 2021 18:48:07
Message: <602470b7$1@news.povray.org>
|
|
|
| |
| |
|
|
On 2/10/21 2:20 PM, William F Pokorny wrote:
> On 2/10/21 2:50 AM, Thomas de Groot wrote:
>> Op 09/02/2021 om 14:04 schreef William F Pokorny:
...
>
> In any case, this is starting to look like some sort of deeper parser
> issue. At the moment I'm baffled.
>
It turns out this old fool cannot type or see very well... :-(
If I change 'blend_gama' to 'blend_gamma' all is good with color_maps.
I'm in the process now of adding new error messages to make clear the
problem is with a token blend* token (or passed id token) when that is
the issue - and not something with the color map entry count.
Not all a waste, fixed a couple peripheral issues like not accepting the
blend_map, blend_gamma in a density_map while I was otherwise chasing a
ghost of my own creation.
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
From: Thomas de Groot
Subject: Re: Parsing issue. Density and blend_mode, blend_gamma.
Date: 11 Feb 2021 02:23:52
Message: <6024db88$1@news.povray.org>
|
|
|
| |
| |
|
|
Op 11/02/2021 om 00:48 schreef William F Pokorny:
> On 2/10/21 2:20 PM, William F Pokorny wrote:
>> On 2/10/21 2:50 AM, Thomas de Groot wrote:
>>> Op 09/02/2021 om 14:04 schreef William F Pokorny:
> ...
>>
>> In any case, this is starting to look like some sort of deeper parser
>> issue. At the moment I'm baffled.
>>
>
> It turns out this old fool cannot type or see very well... :-(
>
> If I change 'blend_gama' to 'blend_gamma' all is good with color_maps.
>
> I'm in the process now of adding new error messages to make clear the
> problem is with a token blend* token (or passed id token) when that is
> the issue - and not something with the color map entry count.
>
> Not all a waste, fixed a couple peripheral issues like not accepting the
> blend_map, blend_gamma in a density_map while I was otherwise chasing a
> ghost of my own creation.
>
> Bill P.
>
And this old fool here, was not even able to spot the typing error while
looking forcibly at it... :-/
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
From: William F Pokorny
Subject: Re: Parsing issue. Density and blend_mode, blend_gamma.
Date: 11 Feb 2021 05:31:17
Message: <60250775$1@news.povray.org>
|
|
|
| |
| |
|
|
On 2/11/21 2:23 AM, Thomas de Groot wrote:
> Op 11/02/2021 om 00:48 schreef William F Pokorny:
...
>
> And this old fool here, was not even able to spot the typing error while
> looking forcibly at it... :-/
>
Thanks. Misery loves a little company, but I doubt you spent a full DAY
missing the obvious!
The 'povr' branch now, for example on a color_map id typo, will issue
the parse error:
expecing first map entry '[...', 'CN'. found instead
rather than:
Must have at least one color in color map.
This 'might' be enough to help me next time... :-)
Bill P.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |