POV-Ray : Newsgroups : povray.advanced-users : Parse error in Ive's spectral render sample scenes Server Time
31 Oct 2024 21:23:43 EDT (-0400)
  Parse error in Ive's spectral render sample scenes (Message 1 to 4 of 4)  
From: Cousin Ricky
Subject: Parse error in Ive's spectral render sample scenes
Date: 5 Nov 2013 17:25:01
Message: <web.52796eab83d4def306548240@news.povray.org>
I finally got around to downloading Ive's spectral render rack.  When trying to
render the sample scene Ring.pov, I got a missing semicolon error.  The command
line and message output are reproduced here:
_______________________________________________________________________________

> povray Ring.pov +KI1 +KF36 +KFI38 +KFF73 +A0.01 +AM2 +R4 +w800 +h600 +FE
povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is
discouraged.
Persistence of Vision(tm) Ray Tracer Version 3.7.0.RC7 (g++ 4.7 @
 x86_64-unknown-linux-gnu)
This is a release candidate of POV-Ray version 3.7.0.
General distribution is strongly discouraged.

POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. Collins
Copyright 1991-2003 Persistence of Vision Team
Copyright 2003-2012 Persistence of Vision Raytracer Pty. Ltd.

Primary POV-Ray 3.7 Architects/Developers: (Alphabetically)
  Chris Cason         Thorsten Froehlich  Christoph Lipka

With Assistance From: (Alphabetically)
  Nicolas Calimet     Jerome Grimbert     James Holsenback    Christoph Hormann
  Nathan Kopp         Juha Nieminen

Past Contributors: (Alphabetically)
  Steve Anger         Eric Barish         Dieter Bayer        David K. Buck
  Nicolas Calimet     Chris Cason         Aaron A. Collins    Chris Dailey
  Steve Demlow        Andreas Dilger      Alexander Enzmann   Dan Farmer
  Thorsten Froehlich  Mark Gordon         James Holsenback    Christoph Hormann
  Mike Hough          Chris Huff          Kari Kivisalo       Nathan Kopp
  Lutz Kretzschmar    Christoph Lipka     Jochen Lippert      Pascal Massimino
  Jim McElhiney       Douglas Muir        Juha Nieminen       Ron Parker
  Bill Pulver         Eduard Schwan       Wlodzimierz Skiba   Robert Skinner
  Yvo Smellenbergh    Zsolt Szalavari     Scott Taylor        Massimo Valentini
  Timothy Wegner      Drew Wells          Chris Young

Other contributors are listed in the documentation.

Support libraries used by POV-Ray:
  ZLib 1.2.7, Copyright 1995-2012 Jean-loup Gailly and Mark Adler
  LibPNG 1.4.11, Copyright 1998-2012 Glenn Randers-Pehrson
  LibJPEG 80, Copyright 1991-2013 Thomas G. Lane, Guido Vollbeding
  LibTIFF 4.0.2, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
  Boost 1.49, http://www.boost.org/
  OpenEXR, Copyright (c) 2004-2007, Industrial Light & Magic.


Rendering frame 1 of 36

Rendering frame 1 of 36


Parser Options
  Input file: Ring.pov
  Remove bounds........Off
  Split unions.........Off
  Library paths:
    /usr/local/share/povray-3.7
    /usr/local/share/povray-3.7/ini
    /usr/local/share/povray-3.7/include
    /home/ricky/Documents/POV-Ray/include
    /home/ricky/Documents/POV-Ray/include_others
    /home/ricky/Documents/POV-Ray/Object_Collection
    /home/ricky/Documents/POV-Ray/LightsysIV
    /usr/share/fonts/truetype
Animation Options
  Initial Frame:       38  Final Frame:       73
  Frame Step:           1
  Initial Clock:    1.000  Final Clock:   36.000
  Cyclic Animation.....Off  Field render.........Off  Odd lines/frames.....Off
Image Output Options
  Image resolution.....800 by 600 (rows 1 to 600, columns 1 to 800).
  Output file..........Ring38.exr, 24 bpp EXR
  Graphic display......On  (gamma: sRGB)
  Mosaic preview.......Off
  Continued trace......Off
Information Output Options
  All Streams to console..........On
  Debug Stream to console.........On
  Fatal Stream to console.........On
  Render Stream to console........On
  Statistics Stream to console....On
  Warning Stream to console.......On
==== [Parsing...] ==========================================================

Spectral rendering: wavelength 380nm

File 'spectral_materials.inc' line 246: Parse Error: All #declares of float,
 vector, and color require semi-colon ';' at end if the language version is set
 to 3.5 or higher. Either add the semi-colon or set the language version to 3.1
 or lower.
Fatal error in parser: Cannot parse input.
Render failed
_______________________________________________________________________________

There are clearly sufficient semicolons on and before line 246.  As far as I can
tell, the call seems to originate with the C_Average call on line 75 of
Ring.pov, but I cannot be completely sure.  (I will so be ecstatic when the dev
team implements the call stack postmortem.)  A bit of analysis indicates that
the parser does not interpret SpecData1 as an array, so when it sees the '[', it
thinks that the r-value is finished.  As I am still trying to figure out how
this package works, I'm not in a position to figure out exactly what went wrong.

Prism.pov produces the same error, but ColorChecker.pov renders flawlessly.

POV-Ray version: 3.7.0.RC7
Operating system: openSUSE 12.2 Linux
Hardware: Dell Inspiron 17R, Intel Core i7


Post a reply to this message

From: Ive
Subject: Re: Parse error in Ive's spectral render sample scenes
Date: 5 Nov 2013 18:54:10
Message: <52798522@news.povray.org>
Am 05.11.2013 23:18, schrieb Cousin Ricky:
> I finally got around to downloading Ive's spectral render rack.  When trying to
> render the sample scene Ring.pov, I got a missing semicolon error.  The command
> line and message output are reproduced here:
>

Yes, I know and it is all my fault due some last minute "improvement" 
without proper testing.
The problem is the "D_Metal" macro as used within "C_Average"  that does 
(in spectral mode) not return an array as it should.


#macro User_Spectral_Metal (N, K, Reflectance)
   material {
     texture {
       pigment {
         pigment_pattern {image_map{png "ornament" interpolate 2}
           rotate x*90 translate -z*0.04 scale <0.1667,0.78,0.78>
         }
         color_map {

//*** -> D_Metal in the next line causes the error ***

           [0 C_Average( D_Metal(N, K), 1, D_CC_F4, 2) ]
           [1 C_Metal(N, K) ]
         }
         warp {cylindrical orientation y dist_exp 0 }
       }
       finish {
         ambient 0  emission 0  diffuse (0.5 - Reflectance*0.45)
         reflection {0 Reflectance fresnel on
           #if (WavelengthIndex < 0) metallic #end
         }
         conserve_energy
         brilliance EXT_Metal(N, K)
         #if (WavelengthIndex < 0) metallic #end
       }
       normal {
         bump_map {png "ornament_bump" interpolate 2}
         rotate x*90 translate -z*0.04 scale <0.1667,0.78,0.78>
         bump_size 0.05
         warp {cylindrical orientation y dist_exp 0 }
       }
     }
     interior {IOR_Metal(N, K)}
   }
#end


...and well, it took me quite some time to figure this out. Some 
debugger for SDL would really have helped ;)


> Prism.pov produces the same error
>

??? Works fine here.


I have posted a (hopefully) fixed version of spectral_materials.inc to 
p.b.scene-files

Anyway, thanks for the reminder. Version 2.0 for the spectral render 
system is ready since almost a year.
But the whole project is kinda stalled as I wanted to add some nice 
example scene for minerals (as spectral rendering really makes sense 
there) but never had the time for doing it.

In case you are interested (this would actually be of great help, 
especially for avoiding such stupid mistakes) just drop me a line and 
I'll send you version 2 as it is now. This could even help to encourage 
me in *making* some free time to *do* the desired example scene.


-Ive


Post a reply to this message

From: Cousin Ricky
Subject: Re: Parse error in Ive's spectral render sample scenes
Date: 5 Nov 2013 21:50:01
Message: <web.5279ada4c592bbc7306548240@news.povray.org>
Ive <ive### [at] lilysoftorg> wrote:
> Am 05.11.2013 23:18, schrieb Cousin Ricky:
> > Prism.pov produces the same error
>
> ??? Works fine here.

I can't find that run in my command history.  I must have had some mental lapse.

> I have posted a (hopefully) fixed version of spectral_materials.inc to
> p.b.scene-files

I can't unzip the file.  I don't know whether the problem is on my end or yours,
but I'll keep trying.


Post a reply to this message

From: Cousin Ricky
Subject: Re: Parse error in Ive's spectral render sample scenes
Date: 8 Nov 2013 20:10:01
Message: <web.527d8a92c592bbc7306548240@news.povray.org>
"Cousin Ricky" <rickysttATyahooDOTcom> wrote:
> I can't unzip the file.  I don't know whether the problem is on my end or yours,
> but I'll keep trying.

Problem solved.  My archive software has a UI issue with 7z files, but I
unzipped it through the back door.  Everything works now.


Post a reply to this message

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