Scene Tree Definition and Specification

In MOAN, scene trees are specified via a text file interface, rather than programmatically. A scene file is such a textual description of a scene tree. In addition to merely listing node specifications, a scene file may contain comments, indentations, and varying cases (uppercase and lowercase letters), all used to elucidate the underlying tree structure of the scene. Hence, when the scene file is parsed line after line, are all ignored. After this preprocessing, a line is also ignored iff While editing scene files, it is easy to mess up their structure. A configurable editor such as emacs can aid in maintaining the indentation. Also, messy scene files may be re-indented by loading them in MOAN, and saving them from MOAN; the drawback of this approach is that the new file will not retain the comments present in the original file.

The following subsections cover in detail the format of each node's specification in a scene file, as well as its response and precise effect on the traversal state, when encountered. The traversal state consists of


Interior node

There is only one kind of interior node: a Group node. In a scene file, it is specified by delimiting its children nodes with
Group Begin
and
Group End
each delimiter occupying a line of its own. A Group node may have no children, in which case it effectively becomes a leaf node.

Also, right before the first child appears, i.e. immediately after the Group Begin delimiter, the node's name (or lack thereof) is specified on a separate line. This line must start with the Name keyword, followed by a mandatory colon and a single space, and end with an arbitrary string which becomes the node's name. The keyword <None> may be used in place of a name, in which case the node remains nameless.

When a Group node is encountered during traversal, it first saves the current traversal state, then it traverses its children, and concludes by restoring the traversal state to its saved configuration.


Leaf nodes

A leaf node specification starts with a line containing the node type. This should be one of the following: The node type determines the number and content of the ensuing lines in the node specification, as well as the node's effect on the traversal state, when encountered.

Primitive nodes

Material nodes

Light nodes

Camera nodes

Static Transformation nodes

Joint Transformation nodes


Last update: 2 July 1996 by
Apostolos "Toli" Lerios