QRT

Also Known As: Quick Ray Trace


Type Scene description
Colors NA
Compression Uncompressed
Maximum Image Size NA
Multiple Images Per File NA
Numerical Format NA
Originator Steve Koren
Platform All
Supporting Applications QRT ray-tracing application, others
See Also NFF, POV, PRT, Radiance

Usage
Description of 3D scenes for ray tracing or other rendering applications.

Comments
A solid scene description format similar to other ray-tracing formats described in this book. It is not used much today.

Vendor specifications are available for this format.

Code fragments are available for this format.


QRT (Quick Ray Trace) is associated with the QRT ray-tracing application created by Steve Koren. As such, it implements the QRT scene-description language. Each QRT file consists of a number of ASCII lines, which define objects in the QRT system, and operations which can be performed by QRT.

Contents:
File Organization
File Details
For Further Information

File Organization

QRT files consist of a number of ASCII lines consisting of keywords. Like most ray-trace formats, it was designed to be human-readable and to be composed and altered with standard text-editing tools. Keywords may appear in any order in the file. Parameters associated with each keyword may appear in any order, provided that there is no ambiguity.

Elements in the file may be floating-point vectors, color value triples, integers, floating-point numbers, and text strings.

QRT is a prototype of many current scene-format and 3D files. Please consult the documentation on the CD-ROM for more information about usage conventions.

File Details

The following is a list of QRT keywords. Each keyword may be followed by one or more parameters, and may or may not be required. Following the list of keywords is an explanation of the parameters.

SKY FILE_NAME SPHERE
QUADRATIC POLYGON END_INSTANCES
GROUND OBSERVER PARALLELOGRAM
PATTERN BEGIN_BBOX INSTANCE_OF
FOC_LENGTH FIRST_SCAN TRIANGLE
RECTANGLE END_BBOX DEFAULT
LAST_SCAN LAMP RING
CIRCLE BEGIN_INSTANCES

SKY

Type:

optional

Parameters:

zenith = (r, g, b)

horiz = (r, g, b)

dither = x

Example:
SKY ( horiz = (0, 0, .5), zenith = (.5, 0, 0),
dither = 3 )

QUADRATIC

Type:

optional

Parameters:

loc = (x,y,z) (required)

a = floating-point (required)

b = floating-point (required)

c = floating-point (required)

d = floating-point (required)

xmax = floating-point (required)

xmin = floating-point (required)

ymax = floating-point (required)

ymin = floating-point (required)

zmax = floating-point (required)

zmin = floating-point (required)

name = string

pattern = string

remove = string

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = integer

index = positive float

dither = integer

sreflect = positive float

reflect = positive float

Example:
QUADRATIC (loc = (10,10,10), a = 1, b = 0, c = 1,
d = 100))

Notes:

Synonyms for loc are location, pos, and position. parameters a, b, c, and d are coefficients in a quadratic equation defining a surface. See the documentation on the CD-ROM for more information.

PATTERN

Type:

optional

Parameters:

name = string (required)

x_size = positive float (required)

y_size = positive float (required)

CIRCLE = circle_def

RECTANGLE = rect_def

POLYGON = poly_def

Example:
PATTERN ( x_size = 12, y_size = 12, name = TEST)

Notes:

CIRCLE, RECTANGLE, and POLYGON definitions are the same as with normal keyword syntax.

FOC_LENGTH

Type:

optional

Parameters:

focal_length (integer)

Example:
FOC_LENGTH = 60

RECTANGLE

Type:

optional

Parameters:

start_x = positive float (required)

start_y = positive float (required)

end_x = positive float (required)

end_y = positive float (required)

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = integer

index = positive float

dither = integer

sreflect = positive float

reflect = positive float

Example:
RECTANGLE ( start_x = 10, start_y = 12, end_x = 15,
end_y = 15)

Notes:

RECTANGLE is used within a pattern definition only.

LAST_SCAN

Type:

optional

Parameters:

eliminated in QRT v1.5 and greater

Example:

NA

Notes:

Replaced by use of X_RES and V_RES.

CIRCLE

Type:

optional

Parameters:

radius = positive float

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = integer

index = positive float

dither = integer

sreflect = positive float

reflect = positive float

Example:
CIRCLE ( radius = 5 )

Notes:

CIRCLE is used within a pattern definition only.

FILE_NAME

Type:

required

Parameters:

file_name (ASCII)

Example:
FILE_NAME = IMAGE.RAW

POLYGON

Type:

optional

Parameters:

point1 = (x,y) (required)

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = integer

index = positive float

dither = integer

sreflect = positive float

reflect = positive float

Example:
POLYGON ( point = (0,0), point = (8,0),
point = (0,8), point = (0,0))

Notes:

POLYGON is used within a pattern definition only. There must be at least four point parameters specified in the parameter list, with the first and last points being the same.

OBSERVER

Type:

required

Parameters:

loc = (x,y,z) (required)

lookat = (x,y,z) (required)

up = (x,y,z)

Example:
OBSERVER (loc = (0,0,0), lookat = (90, 0, 0))

Notes:

Observer cannot look up, lookat must be different from loc, and up must be nonzero. Synonyms for loc are pos, location, and position.

BEGIN_BBOX

Type:

optional

Parameters:

name = string

Example:
name = TEST_BOX
BEGIN_BBOX
   SPHERE     sphere definition here
   TRIANGLE   triangle definition here
END_BBOX
        

Notes:

BEGIN_BBOX and END_BBOX always are used together to define a block.

FIRST_SCAN

Type:

optional

Parameters:

eliminated in QRT v1.5 and greater

Example:

NA

Notes:

Replaced by use of X_RES and V_RES.

END_BBOX

Type:

optional

Parameters:

name = TEST_BOX

Example:

See BEGIN_BBOX

Notes:

END_BBOX is always paired with BEGIN_BBOX.

LAMP

Type:

optional

Parameters:

loc = (x,y,z) (required)

dist = positive float (required)

amb = (r,g,b)

radius = positive float

Example:
LAMP ( loc = (10,20,30), dist = 123.5) )

BEGIN_INSTANCES

Type:

optional

Parameters:

NA

Example:
BEGIN_INSTANCES
   NAME = object_1
   BEGIN_BBOX
      list of primitives here
   END_BBOX
   NAME = object_2
   BEGIN_BBOX
      list of primitives here
   END_BBOX
END_INSTANCES
        

Notes:

Always paired with END_INSTANCES to define a block.

SPHERE

Type:

optional

Parameters:

loc = (x,y,z) (required)

radius = x (floating-point) (required)

name = string

pattern = string

remove = string

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = a (integer)

index = p (floating-point)

dither = a (integer)

sreflect = p (floating-point)

reflect = p (floating-point)

Example:
SPHERE ( loc = (10,10,10), radius = 8.8,
diff = (1.0, .1, .1))

END_INSTANCES

Type:

optional

Parameters:

NA

Example:

See BEGIN_INSTANCES

Notes:

Always paired with a BEGIN_INSTANCES statement to define a block.

PARALLELOGRAM

Type:

optional

Parameters:

loc = (x,y,z) (required)

v1 = (x,y,z) (required)

v2 = (x,y,z) (required)

name = string

pattern = string

remove = string

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = integer

index = floating-point

dither = integer

sreflect = floating-point

reflect = floating-point

Example:
PARALLELOGRAM ( loc = (10,10,10), v1 = (10,0,0),
v2 = (0,0,20))

Notes:

Synonyms for loc are pos, location, and position. For v1 and v2 you can substitute vect1 and vect2, respectively.

INSTANCE_OF

Type:

optional

Parameters:

name = string (required)

loc = (x,y,z) (required)

scale = (x,y,z)

Example:
INSTANCE_OF (name = object_1, loc = (10, 10, 20),
scale = .5,.4,.3))

Notes:

See BEGIN_INSTANCES and END_INSTANCES keywords.

TRIANGLE

Type:

optional

Parameters:

loc = (x,y,z) (required)

v1 = (x,y,z) (required)

v2 = (x,y,z) (required)

name = string

pattern = string

remove = string

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = integer

index = floating-point

dither = integer

sreflect = floating-point

reflect = floating-point

Example:
TRIANGLE ( loc = (40,20,30), v1 = (8,4,2),
v2 = (0,0,10))

Notes:

Synonyms for loc are pos, location, and position. For v1 and v2 you can substitute vect1 and vect2, respectively.

DEFAULT

Type:

optional

Parameters:

no_shadow

threshold = positive float

x_res = positive float

y_res = positive float

aspect = positive float

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = integer

index = floating-point

dither = integer

sreflect = floating-point

reflect = floating-point

Example:
DEFAULT (no_shadow, diff = (1,0,1), aspect = .8)

RING

Type:

optional

Parameters:

loc = (x,y,z) (required)

v1 = (x,y,z) (required)

v2 = (x,y,z) (required)

rad_1 = floating-point (required)

rad_2 = floating-point (required)

name = string

pattern = string

remove = string

amb = (r,g,b)

diff = (r,g,b)

trans = (r,g,b)

density = (r,g,b)

mirror = (r,g,b)

fuzz = integer

index = floating-point

dither = integer

sreflect = floating-point

reflect = floating-point

Example:
RING (loc = (10,10,10), v1 = (8,5,0), v2 = (0,0,10),
rad_1 = 10, rad_2 = 20)

Notes:

Synonyms for loc are pos, location, and position. For v1 and v2 you can substitute vect1 and vect2, respectively. Note that rad_2 must be greater than rad_1, and both must be greater than zero.

For Further Information

Although the author, Steve Koren, says that QRT is obsolete and has been for some time, we find that the QRT distribution is still widely available via FTP from various sites. It is also downloaded with some regularity from the major PC BBSs.

For further information about the QRT file format, see the QRT specification included on the CD-ROM, and the QRT Language Reference found in the QRT distribution. You can also contact:

Steve Koren
Email: koren@hpfcogv.fc.hp.com


[Previous] [Next] [Up] [Index]
Contents | Glossary | Main | Formats | Software | Internet | Book

Copyright © 1996, 1994 O'Reilly & Associates, Inc. All Rights Reserved.