home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 1B
/
DATAFILE_PDCD1B.iso
/
_raytrace
/
ray
/
qrt
/
QRT_info
/
Language
< prev
next >
Wrap
Text File
|
1989-05-23
|
23KB
|
908 lines
QRT Language Reference
INTRODUCTION
This document is a reference guide to the QRT command language. One section
is devoted to each QRT command. All parameters to commands are listed.
More information on QRT can be found in the User's Manual and Technical
Reference Manual.
The following table shows the syntax used in this document:
TEXT MEANING EXAMPLE RANGE
(x,y,z) floating pt vector (10, -20, 30.56) all
(r,g,b) color value triple (0, .5, 1.00) 0 to 1
i an integer 12 0 to 127
n floating pt number -123.4 all
p positive float 123.4 >0
string text string FOO_BAR ASCII
Each section of this document contains one or more of the following
sub-sections:
Command Type : OPTIONAL or REQUIRED
Parameters (required) : Lists required parameters
Parameters (optional) : Lists optional parameters
Optional Forms : Alternatives for parameter names. Ex: 'horiz' = 'horizon'
means either can be used as a parameter name.
Example : An example of the command (with all required parameters, but not
necessarily all optional ones.
Restrictions : Things not to do
See also : Similar commands
QRT has a free format input language, and parameters can be given in any
order.
QRT Misc. Setup Commands
SKY:
Command type: OPTIONAL
The SKY command is used to specify the color of all rays that don't hit any
other object. The sky is black by default. The sky color at the zenith (up),
and horizon can be specified, and QRT will blend the colors in between as
smoothly as possible. In addition, dithering can be specified.
Parameters (optional):
zenith = (r,g,b) : the color of the zenith
horiz = (r,g,b) : the color at the horizon
dither = i : dithering
Optional forms:
'horiz' = 'horizon'
Example:
SKY ( horiz = (0, 0, .6),
zenith = (0, 0, .4),
dither = 5
)
See also : GROUND
GROUND:
Command type: OPTIONAL
QRT does not have a specific ground command. Instead, use a large
parallelogram with an optional pattern.
PARALLELOGRAM ( loc = (-10000, 0, -10000),
v1 = ( 20000, 0, 0),
v2 = ( 0, 0, 20000),
pattern = PATTERN_OF_CHOICE
)
It is also possible to use a VERY large sphere for the ground, which moves
the horizon closer to the observer. This is advisable when rendering tall,
reflecting objects.
See also : PARALLELOGRAM, SPHERE
FOC_LENGTH:
Command type: OPTIONAL
This sets the focal length of QRT's "camera". The default is 50, but it can
be changed with this command. As with 35mm photography, larger numbers
result in a 'telephoto' effect, and smaller numbers will result in wide
angle (and distorted) views. As of QRT 1.5, focal length is no longer
resolution dependent.
Example:
FOC_LENGTH = 70
Restrictions:
0 < FOC_LENGTH
FIRST_SCAN:
Command type: OPTIONAL
This command is obsolete with QRT version 1.5. Use the X_RES
and Y_RES options to the DEFAULT() command.
See also : DEFAULT
LAST_SCAN:
Command type: OPTIONAL
This command is also obsolete with QRT 1.5.
See also : DEFAULT
FILE_NAME:
Command type: REQUIRED
This is used to set the output file for QRT, which will be read by the post
processor. The file name will be mapped to upper case. Some restrictions may
arise from file naming conventions on specific computers.
Example:
FILE_NAME = QRT_IMAGE.RAW
OBSERVER:
Command type: REQUIRED
OBSERVER tells QRT where the observer is located, and his direction of
view. The view direction is specified by giving the coordinates he should
look at. In addition, the observer UP vector may be given. This is, by
default, (0,1,0).
Parameters (required):
loc = (x,y,z) : location of observer
lookat = (x,y,z) : point of interest
Parameters (optional):
up = (x,y,z) : up vector
Optional forms:
'loc' = 'pos' = 'location' = 'position'
Example:
OBSERVER ( loc = (0, 0, 0),
lookat = (100, 0, 0)
)
Restrictions:
The observer cannot look in the direction of the up vector.
'lookat' cannot be equal to 'loc'.
'up' must have non-zero length.
LAMP:
Command type: OPTIONAL
Lamps are sources of light in QRT. They can be placed anywhere, and emit
any color and intensity of light. The ambient light value is the color of
the lamp. The distance parameter is the minimum distance from the lamp that
objects will be illuminated at full intensity. Most objects should be
farther from the lamp than this value, or else they will be washed out. The
radius parameter is ignored by this version of QRT, but may eventually be
used to implement penumbral shadows.
Parameters (required):
loc = (x,y,z) : location of object
dist = p : distance of max illumination
Parameters (optional):
amb = (r,g,b) : ambient light
radius = p : radius
Optional forms:
'loc' = 'pos' = 'location' = 'position'
Example:
LAMP ( loc = (12,34,56),
radius = 123.4,
)
QRT Primitive Types
SPHERE:
Command type: OPTIONAL
SPHERE creates a sphere with a given location, radius, and surface
characteristics.
Parameters (required):
loc = (x,y,z) : location of object
radius = p : radius
Parameters (optional):
name = string : name for object
pattern = string : pattern name to attach
remove = string : pattern to cut out
amb = (r,g,b) : ambient light
diff = (r,g,b) : diffuse reflection
trans = (r,g,b) : transmission
density = (r,g,b) : light attenuation
mirror = (r,g,b) : mirror reflection
fuzz = i : currently unused
index = p : index of refraction
dither = i : dithering
sreflect = p : Phong specular refl. coeff.
reflect = p : percent specular reflection
Optional forms:
'loc' = 'pos' = 'location' = 'position'
Example:
SPHERE ( loc = (100, 100, 50.234),
radius = 123.4,
diff = (1.00, .20, .20)
)
PARALLELOGRAM:
Command type: OPTIONAL
This command creates a parallelogram with a given location, shape, and
surface characteristics. Two vectors define the shape of the parallelogram
(they need not be orthogonal).
Parameters (required):
loc = (x,y,z) : location of object
v1 = (x,y,z) : vector for side one
v2 = (x,y,z) : vector for side two
Parameters (optional):
name = string : name for object
pattern = string : pattern name to attach
remove = string : pattern to cut out
amb = (r,g,b) : ambient light
diff = (r,g,b) : diffuse reflection
trans = (r,g,b) : transmission
density = (r,g,b) : light attenuation
mirror = (r,g,b) : mirror reflection
fuzz = i : currently unused
index = p : index of refraction
dither = i : dithering
sreflect = p : Phong specular refl. coeff.
reflect = p : percent specular reflection
Optional forms:
'loc' = 'pos' = 'location' = 'position'
'vect1' = 'v1'
'vect2' = 'v2'
Example:
PARALLELOGRAM ( loc = (10, 20, 50),
vect1 = (20, 0, 0),
vect2 = ( 0, 0, 50),
diff = (0, .90, .20)
)
TRIANGLE:
Command type: OPTIONAL
The TRIANGLE command (similar to PARALLELOGRAM) creates a triangle shape.
Two vectors define the sides of the triangle.
Parameters (required):
loc = (x,y,z) : location of object
v1 = (x,y,z) : vector for side one
v2 = (x,y,z) : vector for side two
Parameters (optional):
name = string : name for object
pattern = string : pattern name to attach
remove = string : pattern to cut out
amb = (r,g,b) : ambient light
diff = (r,g,b) : diffuse reflection
trans = (r,g,b) : transmission
density = (r,g,b) : light attenuation
mirror = (r,g,b) : mirror reflection
fuzz = i : currently unused
index = p : index of refraction
dither = i : dithering
sreflect = p : Phong specular refl. coeff.
reflect = p : percent specular reflection
Optional for