POV-Ray : Newsgroups : povray.general : No matching } in 'image_map', undeclared identifier 'gamma' found instead Server Time
1 Nov 2024 11:15:11 EDT (-0400)
  No matching } in 'image_map', undeclared identifier 'gamma' found instead (Message 1 to 6 of 6)  
From: Gfans
Subject: No matching } in 'image_map', undeclared identifier 'gamma' found instead
Date: 19 Sep 2014 06:55:00
Message: <web.541c0b069ebbba2545f6c5070@news.povray.org>
Hi all,

I tried to render a scene containing several objects, it ran correctly with
Povray 3.7, but got an error under Povray 3.6:

Parse Error: No matching } in 'image_map', undeclared identifier 'gamma' found
instead

The yellow line which shows the error is as following:
//==================================================
//Map definitions
#declare p_map1=pigment {image_map{jpeg "banana1_www.cgtsj.com__1_.jpg" gamma
srgb  transmit all 0 } }

Any suggestions?

Thank you.

Regards,
Gfans

PS: I have to use Povray 3.6, so please do not just tell me to use 3.7 instead,
thanks.


Post a reply to this message

From: James Holsenback
Subject: Re: No matching } in 'image_map', undeclared identifier 'gamma' found instead
Date: 19 Sep 2014 07:00:08
Message: <541c0cb8$1@news.povray.org>
On 09/19/2014 06:52 AM, Gfans wrote:
> Hi all,
>
> I tried to render a scene containing several objects, it ran correctly with
> Povray 3.7, but got an error under Povray 3.6:
>
> Parse Error: No matching } in 'image_map', undeclared identifier 'gamma' found
> instead
>
> The yellow line which shows the error is as following:
> //==================================================
> //Map definitions
> #declare p_map1=pigment {image_map{jpeg "banana1_www.cgtsj.com__1_.jpg" gamma
> srgb  transmit all 0 } }
>
> Any suggestions?
>
> Thank you.
>
> Regards,
> Gfans
>
> PS: I have to use Povray 3.6, so please do not just tell me to use 3.7 instead,
> thanks.

well sorry to tell you but that /is/ the case ... gamma handling was 
/not/ implemented until v3.7


Post a reply to this message

From: Gfans
Subject: Re: No matching } in 'image_map', undeclared identifier 'gamma' found inste=
Date: 19 Sep 2014 07:10:00
Message: <web.541c0ed34bebc45345f6c5070@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:
> On 09/19/2014 06:52 AM, Gfans wrote:
> > Hi all,
> >
> > I tried to render a scene containing several objects, it ran correctly with
> > Povray 3.7, but got an error under Povray 3.6:
> >
> > Parse Error: No matching } in 'image_map', undeclared identifier 'gamma' found
> > instead
> >
> > The yellow line which shows the error is as following:
> > //==================================================
> > //Map definitions
> > #declare p_map1=pigment {image_map{jpeg "banana1_www.cgtsj.com__1_.jpg" gamma
> > srgb  transmit all 0 } }
> >
> > Any suggestions?
> >
> > Thank you.
> >
> > Regards,
> > Gfans
> >
> > PS: I have to use Povray 3.6, so please do not just tell me to use 3.7 instead,
> > thanks.
>
> well sorry to tell you but that /is/ the case ... gamma handling was
> /not/ implemented until v3.7

Thanks, James. Are there any workarounds with v3.6?


Post a reply to this message

From: James Holsenback
Subject: Re: No matching } in 'image_map', undeclared identifier 'gamma' found inste=
Date: 19 Sep 2014 07:15:45
Message: <541c1061@news.povray.org>
On 09/19/2014 07:09 AM, Gfans wrote:
> James Holsenback <nom### [at] nonecom> wrote:
>> On 09/19/2014 06:52 AM, Gfans wrote:
>>> Hi all,
>>>
>>> I tried to render a scene containing several objects, it ran correctly with
>>> Povray 3.7, but got an error under Povray 3.6:
>>>
>>> Parse Error: No matching } in 'image_map', undeclared identifier 'gamma' found
>>> instead
>>>
>>> The yellow line which shows the error is as following:
>>> //==================================================
>>> //Map definitions
>>> #declare p_map1=pigment {image_map{jpeg "banana1_www.cgtsj.com__1_.jpg" gamma
>>> srgb  transmit all 0 } }
>>>
>>> Any suggestions?
>>>
>>> Thank you.
>>>
>>> Regards,
>>> Gfans
>>>
>>> PS: I have to use Povray 3.6, so please do not just tell me to use 3.7 instead,
>>> thanks.
>>
>> well sorry to tell you but that /is/ the case ... gamma handling was
>> /not/ implemented until v3.7
>
> Thanks, James. Are there any workarounds with v3.6?

other than not using gamma or srgb keywords ... no


Post a reply to this message

From: Gfans
Subject: Re: No matching } in 'image_map', undeclared identifier 'gamma' found inste=
Date: 19 Sep 2014 07:30:00
Message: <web.541c12d782a779b845f6c5070@news.povray.org>
James Holsenback <nom### [at] nonecom> wrote:
> On 09/19/2014 07:09 AM, Gfans wrote:
> > James Holsenback <nom### [at] nonecom> wrote:
> >> On 09/19/2014 06:52 AM, Gfans wrote:
> >>> Hi all,
> >>>
> >>> I tried to render a scene containing several objects, it ran correctly with
> >>> Povray 3.7, but got an error under Povray 3.6:
> >>>
> >>> Parse Error: No matching } in 'image_map', undeclared identifier 'gamma' found
> >>> instead
> >>>
> >>> The yellow line which shows the error is as following:
> >>> //==================================================
> >>> //Map definitions
> >>> #declare p_map1=pigment {image_map{jpeg "banana1_www.cgtsj.com__1_.jpg" gamma
> >>> srgb  transmit all 0 } }
> >>>
> >>> Any suggestions?
> >>>
> >>> Thank you.
> >>>
> >>> Regards,
> >>> Gfans
> >>>
> >>> PS: I have to use Povray 3.6, so please do not just tell me to use 3.7 instead,
> >>> thanks.
> >>
> >> well sorry to tell you but that /is/ the case ... gamma handling was
> >> /not/ implemented until v3.7
> >
> > Thanks, James. Are there any workarounds with v3.6?
>
> other than not using gamma or srgb keywords ... no

Well, I will delete these keywords. Thanks. :-)


Post a reply to this message

From: clipka
Subject: Re: No matching } in 'image_map', undeclared identifier 'gamma' found inste=
Date: 19 Sep 2014 09:23:33
Message: <541c2e55$1@news.povray.org>
Am 19.09.2014 13:09, schrieb Gfans:
> James Holsenback <nom### [at] nonecom> wrote:
>> On 09/19/2014 06:52 AM, Gfans wrote:
>>> Hi all,
>>>
>>> I tried to render a scene containing several objects, it ran correctly with
>>> Povray 3.7, but got an error under Povray 3.6:
>>>
>>> Parse Error: No matching } in 'image_map', undeclared identifier 'gamma' found
>>> instead
>>>
>>> The yellow line which shows the error is as following:
>>> //==================================================
>>> //Map definitions
>>> #declare p_map1=pigment {image_map{jpeg "banana1_www.cgtsj.com__1_.jpg" gamma
>>> srgb  transmit all 0 } }
>>>
>>> Any suggestions?
>>>
>>> Thank you.
>>>
>>> Regards,
>>> Gfans
>>>
>>> PS: I have to use Povray 3.6, so please do not just tell me to use 3.7 instead,
>>> thanks.
>>
>> well sorry to tell you but that /is/ the case ... gamma handling was
>> /not/ implemented until v3.7
>
> Thanks, James. Are there any workarounds with v3.6?

Step 1: If you're using "assumed_gamma 1.0", convert the image from sRGB 
gamma to linear gamma.

In an image editing software like Photoshop or Gimp, you can do this by 
first assigning the sRGB colour space to it, then converting it to a 
custom colour space with sRGB primaries but a gamma of 1.0. 
Alternatively, use a software that can perform power-law tonemapping, 
such as LILYsoft's IC (highly recommended!), applying an exponent of 
2.2. (This does not give exactly the same result, but should be good 
enough in most cases.)

I recommend converting the image to 16 bit colour channel depth before 
applying the gamma change, in order to avoid colour banding. Most 
software may also require to save the image with this bit depth (which 
in turn requires an image format other than jpeg, such as png); IC 
performs dithering to avoid this, so saving with 8 bit colour channel 
depth will do.


Step 2: Strip the "gamma srgb" statements from the POV-Ray code.

If you converted to a different file format in step 1, you'll of course 
also need to change the file name and file type in the statement.


Step 3: In the long run, figure out why POV-Ray 3.6 is a requirement, 
and how it can be replaced with POV-Ray 3.7 after all.


Note that without Step 1, the image map will inevitably appear washed 
out in POV-Ray 3.6 when used with "assumed_gamma 1.0".


Post a reply to this message

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