POV-Ray : Newsgroups : povray.general : Scene parsing only? : Re: Scene parsing only? Server Time
8 Aug 2024 12:26:32 EDT (-0400)
  Re: Scene parsing only?  
From: Warp
Date: 24 Dec 2000 12:05:47
Message: <3a462ceb@news.povray.org>
Gigi Giorgi <plg### [at] toalespazioit> wrote:
: How do I do to tell POVray to perform scene file parsing only?

  By the way, this is a more difficult issue than it may first seem.

  What does "parsing" mean?

  I can think of four stages in the rendering process:

  1. Syntactical correctness. This means that the the file is just
syntactically correct, that is, it doesn't have any malformed expression
(invalid keywords, invalid use of operators, etc etc).

  2. Semantical correctness. The file may be syntactically correct, but
it can be semantically incorrect (for example trying to store an object
inside an array of floats is a semantical error although the syntax is
perfectly ok).

  3. Scene correctness. Even when a source code is syntactically and
semantically correct, the scene produced by it may be invalid. An extremely
simple example is a scene without objects. Another example is a camera placed
in the wrong place (in the y-axis by default, if I remember correctly).

  4. Rendering correctness. Although this happens more rarely, there are
cases where the incorrectness of a scene happens only at rendering time
(eg. "Too many nested refracting objects" and I-stack overflows).

  So which one of those you want?
  Syntactical correctness is fast to check, but it doesn't tell if the scene
is valid or not.
  Semantical correctness can be very slow (if the scene is slow to
parse) since POV-Ray would have to actually parse the entire scene in
order to be sure that there are no semantical errors (that is, go
through all the loops, evaluate all macros and so on). If the parsing
of the scene takes hours, then checking the semantical correctness of
the scene takes this same amount of time. There's no way of checking the
semantical correctness of the scene other than parsing the scene.
  If the code makes one million loops, the POV-Ray has to parse all those
million of loops to check the semantical correctness. There's no way around
it.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):_;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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