This section discusses the parts that make up an .mi file.
Literal
x
|y
" means "either x
or y
" ).
x
..." means "x
, or x x
, or x x x
,
or more ).
x
[y
]" means "either x
, or x
followed by y
" ).
x
(y
|z
)" means "either x y
, or
x z
" ).
Strings are quoted with double quotes; this includes all names. mental ray permits strings containing literal double quotes if they are prefixed with a backslash. Names, such as material, light, or object names, need not be quoted, but it is highly recommended to avoid conflicts with reserved words [8], and to allow non-alphabetic characters. Without quotes, only lowercase and uppercase letters, underscores, and digits may be used; a digit may not be the first character of an unquoted name. No such restrictions apply to quoted names.
Integers are distinguished from floating-point numbers by appending the suffix int, as in degreeint. Integers are an optional "+
" or "−
"
sign followed by a sequence of digits "0
" through
"9
".
Floating-point numbers follow the same rules, but may optionally
contain a decimal point ".
" and an optional exponent. If the number
begins with a decimal point, a leading zero is assumed. Exponential
notation has the form "ne
m",
which is interpreted as n * 10m. Strings can be
distinguished from numbers because the grammar always requires them
to be enclosed in double quotes.
Comments are introduced
with the "#
" character, unless quoted, and except between
$code and $end code. Comments extend to the end
of the line.
Unquoted whitespace acts as a separator but is otherwise ignored. Line breaks and indentation have no syntactical relevance, except where otherwise noted (commands beginning with a dollar sign, for example, must appear at the beginning of the line).
By convention, the first line of any .mi file should begin with the three characters #mi, followed by a blank (not a tab), followed by the partial or full version number of the earliest required mental ray version number. For the syntax described in this manual this is 3.6 or higher. This comment serves as a "magic number" that helps interactive programs or utilities like file to decide whether this is a .mi file or something else. It is not parsed by mental ray itself.
[8] Future versions may
reserve more words than described here.
Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.