## 3.8 Quick Reference

This is a consolidation of the entire syntax for the POV-Ray's Scene Description Language. Note that the syntax conventions used here are slightly different than those used in the user documentation.

The following syntax conventions are used:

`ITEM`
  An item not in brackets indicates that it is a required item.
`[ITEM]`
  Brackets surround an optional item. If brackets are part of the item, that is noted where applicable.
`ITEM...`
  An ellipsis indicates an item that may be used one or more times.
`[ITEM...]`
  An ellipsis within brackets indicates an item that may be used zero or more times.
`ITEM ITEM`
  Two or more juxtaposed items indicates that they should be used in the given order.
`ITEM | ITEM`
  A pipe separates two or more alternatives from which only one item should be used.
`ITEM & ITEM`
  An ampersand separates two or more items that may be used in any order.

Juxtaposition has precedence over the pipe or ampersand. In the following example, you would select one of the keyword and vector pairs. For that last pair, the keyword itself is optional.

`rgb` 3D_VECTOR | `rgbf` 4D_VECTOR | `rgbt` 4D_VECTOR | [`rgbft`] 5D_VECTOR

Some item names are simply descriptive in nature. An indication of the item's type is given by a prefix on the item name, as follows:

`F_`
  A FLOAT item
`I_`
  An INT item
`V_`
  A VECTOR item
`V4_`
  A 4-D VECTOR item

Note: This document provides only the syntax of the Scene Description Language (SDL). The intent is to provide a single reference for all statements and keywords. It does not provide definitions for the numerous keywords nor explain their usage.

### 3.8.1 Quick Reference Contents

The Scene
Language Basics
  Floats
  Vectors
  Colors
  User-Defined Functions
  Strings
  Arrays
  Splines
Language Directives
  File Inclusion
  Identifier Declaration
  File Input/Output
  Default Texture
  Version Compatibility
  Conditional Directives
  Message Streams
  Macros
  Embedded Directives
Transformations
Camera
Lights
  Light Source
  Light Group
Objects
  Finite Solid Objects
  Finite Patch Objects
  Infinite Solid Objects
  Constructive Solid Geometry

Object Modifiers
  UV Mapping
  Material
  Interior
  Interior Texture
Texture
  Plain Texture
  Layered Texture
  Patterned Texture
  Pigment
  Normal
  Finish
  Pattern
  Pattern Modifiers
Media
Atmospheric Effects
  Background
  Fog
  Sky Sphere
  Rainbow
Global Settings
  Radiosity
  Photons
  Subsurface

### 3.8.2 The Scene

Describe a POV-Ray scene:
SCENE:
  `SCENE_ITEM...`
SCENE_ITEM:
  `LANGUAGE_DIRECTIVE | CAMERA | LIGHT | OBJECT | ATMOSPHERIC_EFFECT | GLOBAL_SETTINGS`

Quick Reference Contents

### 3.8.3 Language Basics

#### 3.8.3.1 Floats

Float Expressions
FLOAT:
  `NUMERIC_TERM [SIGN NUMERIC_TERM]...`
SIGN:
  `+ | -`
NUMERIC_TERM:
  `NUMERIC_FACTOR [MULT NUMERIC_FACTOR]...`
MULT:
  `* | /`
NUMERIC_FACTOR:
  `FLOAT_LITERAL | FLOAT_IDENTIFIER | SIGN NUMERIC_FACTOR | FLOAT_FUNCTION | FLOAT_BUILT_IN_IDENT | ( FULL_EXPRESSION ) | ! NUMERIC_FACTOR | VECTOR_FACTOR DECIMAL_POINT DOT_ITEM | FLOAT_FUNCTION_INVOCATION`
FLOAT_LITERAL:
  `MANTISSA [EXP [SIGN] DIGIT...]`
MANTISSA:
  `DIGIT... [DECIMAL_POINT [DIGIT...]] | DECIMAL_POINT DIGIT...`
DIGIT:
  `0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9`
DECIMAL_POINT:
  `.`
EXP:
  `e | E`
FLOAT_FUNCTION:
  `abs (FLOAT) | acos (FLOAT) | acosh (FLOAT) | asc (STRING) | asin (FLOAT) | asinh (FLOAT) | atan (FLOAT) | atanh (FLOAT) | atan2 (FLOAT,FLOAT) | ceil (FLOAT) | cos (FLOAT) | cosh (FLOAT) | defined (IDENTIFIER) | degrees (FLOAT) | dimensions (ARRAY_IDENTIFIER) | dimension_size (ARRAY_IDENTIFIER,INT) | div (FLOAT,FLOAT) | exp (FLOAT) | file_exists (STRING) | floor (FLOAT) | int (FLOAT) | inside (SOLID_OBJECT_IDENT, VECTOR) | ln (FLOAT) | log (FLOAT) | max (FLOAT,FLOAT[,FLOAT]...) | min (FLOAT,FLOAT[,FLOAT]...) | mod (FLOAT,FLOAT) | pow (FLOAT,FLOAT) | radians (FLOAT) | rand (FLOAT) | seed (FLOAT) | select (FLOAT,FLOAT,FLOAT,[FLOAT]) | sin (FLOAT) | sinh (FLOAT) | sqrt (FLOAT) | strcmp (STRING,STRING) | strlen (STRING) | tan (FLOAT) | tanh (FLOAT) | val (STRING) | vdot (VECTOR,VECTOR) | vlength (VECTOR)`
FLOAT_BUILT_IN_IDENT:
  `BOOLEAN_KEYWORD | clock | clock_delta | clock_on | final_clock | final_frame | frame_number | image_height | image_width | initial_clock | initial_frame | pi | version`
BOOLEAN_KEYWORD:
  `true | yes | on | false | no | off`
FULL_EXPRESSION:
  `FLOAT | LOGICAL_EXPRESSION [? FULL_EXPRESSION : FULL_EXPRESSION]`
LOGICAL_EXPRESSION:
  `REL_TERM [LOGICAL_OPERATOR REL_TERM]...`
LOGICAL_OPERATOR:
  `& | |`
REL_TERM:
  `FLOAT [REL_OPERATOR FLOAT]... | STRING REL_OPERATOR STRING`
REL_OPERATOR:
  `< | <= | = | >= | > | !=`
DOT_ITEM:
  `x | y | z | t | u | v | red | green | blue | filter | transmit | gray`
INT:
  `FLOAT`
  Any fractional part is discarded.
BOOL:
  `BOOLEAN_KEYWORD | LOGICAL_EXPRESSION`

Quick Reference Contents

#### 3.8.3.2 Vectors

Vector Expressions
VECTOR:
  `VECTOR_TERM [SIGN VECTOR_TERM]...`
VECTOR_TERM:
  `VECTOR_FACTOR [MULT VECTOR_FACTOR]...`
VECTOR_FACTOR:
  `VECTOR_LITERAL | VECTOR_IDENTIFIER | SIGN VECTOR_FACTOR | VECTOR_FUNCTION | VECTOR_BUILT_IN_IDENT | ( VECTOR_FULL_EXPRESSION ) | ! VECTOR_FACTOR | FLOAT_FACTOR | VECTOR_FUNCTION_INVOCATION | COLOR_FUNCTION_INVOCATION | SPLINE_INVOCATION`
VECTOR_LITERAL:
  `< FLOAT, FLOAT [, FLOAT [, FLOAT [, FLOAT ]]] >`
VECTOR_FUNCTION:
  `min_extent (OBJECT_IDENTIFIER) | max_extent (OBJECT_IDENTIFIER) | trace (OBJECT_IDENTIFIER,VECTOR,VECTOR[,VECTOR_IDENTIFIER]) | vaxis_rotate (VECTOR,VECTOR,FLOAT) | vcross (VECTOR,VECTOR) | vrotate (VECTOR,VECTOR) | vnormalize (VECTOR) | vturbulence (FLOAT,FLOAT,FLOAT,VECTOR)`
VECTOR_BUILT_IN_IDENT:
  `x | y | z | t | u | v`
VECTOR_FULL_EXPRESSION:
  `VECTOR | LOGICAL_EXPRESSION ? VECTOR_FULL_EXPRESSION : VECTOR_FULL_EXPRESSION`

Quick Reference Contents

#### 3.8.3.3 Colors

Color Expressions
COLOR:
  `[color] COLOR_BODY | colour COLOR_BODY`
COLOR_BODY:
  `COLOR_VECTOR | COLOR_KEYWORD_GROUP | COLOR_IDENTIFIER`
COLOR_VECTOR:
  `rgb 3D_VECTOR | rgbf 4D_VECTOR | rgbt 4D_VECTOR | [rgbft] 5D_VECTOR | srgb 3D_VECTOR | srgbf 4D_VECTOR | srgbt 4D_VECTOR | srgbft 5D_VECTOR`
COLOR_KEYWORD_GROUP:
  `[COLOR_IDENTIFIER] COLOR_KEYWORD_ITEMS`
COLOR_KEYWORD_ITEMS:
  `[red FLOAT] & [green FLOAT] & [blue FLOAT] & [filter FLOAT] & [transmit FLOAT]`

Quick Reference Contents

#### 3.8.3.4 User defined Functions

User-Defined Functions
USER_FUNCTION:
  `FLOAT_USER_FUNCTION | VECTOR_USER_FUNCTION | COLOR_USER_FUNCTION`
FLOAT_USER_FUNCTION:
  `function { FN_FLOAT } | function (IDENT_LIST) { FN_FLOAT } | function { pattern { PATTERN [PATTERN_MODIFIERS]} }`
IDENT_LIST:
  `IDENT_ITEM [, IDENT_LIST]`
  The maximum number of parameter identifiers is 56. An identifier may not be repeated in the list.
IDENT_ITEM:
  `x | y | z | u | v | PARAM_IDENTIFIER`
PATTERN:
  `MAP_PATTERN | brick [BRICK_ITEM] | checker | hexagon | object { LIST_OBJECT }`
VECTOR_USER_FUNCTION:
  `function { SPECIAL_VECTOR_FUNCTION }`
SPECIAL_VECTOR_FUNCTION:
  `TRANSFORM | SPLINE`
COLOR_USER_FUNCTION:
  `function { PIGMENT }`

Specify a float expression in a user-defined function:
FN_FLOAT
  `LOGIC_AND [OR LOGIC_AND]`
OR:
  `|`
LOGIC_AND:
  `REL_TERM [AND REL_TERM]`
AND:
  `&`
REL_TERM:
  `TERM [REL_OPERATOR TERM]`
REL_OPERATOR:
  `< | <= | = | >= | > | !=`
TERM:
  `FACTOR [SIGN FACTOR]`
SIGN:
  `+ | -`
FACTOR:
  `EXPRESSION [MULT EXPRESSION]`
MULT:
  `* | /`
EXPRESSION:
  `FLOAT_LITERAL | FLOAT_IDENTIFIER | FN_FLOAT_FUNCTION | FLOAT_BUILT_IN_IDENT | ( FN_FLOAT ) | IDENT_ITEM | SIGN EXPRESSION | VECTOR_FUNCTION_INVOCATION.FN_DOT_ITEM | COLOR_FUNCTION_INVOCATION.FN_DOT_ITEM | FLOAT_FUNCTION_INVOCATION`
FN_DOT_ITEM:
  `DOT_ITEM | hf`
FN_FLOAT_FUNCTION:
  `abs (FN_FLOAT) | acos (FN_FLOAT) | acosh (FN_FLOAT) | asin (FN_FLOAT) | asinh (FN_FLOAT) | atan (FN_FLOAT) | atanh (FN_FLOAT) | atan2 (FN_FLOAT,FN_FLOAT) | ceil (FN_FLOAT) | cos (FN_FLOAT) | cosh (FN_FLOAT) | degrees (FN_FLOAT) | exp (FN_FLOAT) | floor (FN_FLOAT) | int (FN_FLOAT) | ln (FN_FLOAT) | log (FN_FLOAT) | max (FN_FLOAT,FN_FLOAT[,FN_FLOAT]...) | min (FN_FLOAT,FN_FLOAT[,FN_FLOAT]...) | mod (FN_FLOAT,FN_FLOAT) | pow (FN_FLOAT,FN_FLOAT) | prod (IDENTIFIER, FN_FLOAT, FN_FLOAT, FN_FLOAT) | radians (FN_FLOAT) | sin (FN_FLOAT) | sinh (FN_FLOAT) | sqrt (FN_FLOAT) | sum (IDENTIFIER, FN_FLOAT, FN_FLOAT, FN_FLOAT) |tan (FN_FLOAT) | tanh (FN_FLOAT) | select (FN_FLOAT,FN_FLOAT,FN_FLOAT [,FN_FLOAT])`

Create an identifier for a user-defined function:
USER_FUNCTION_DECLARATION:
  `#declare FLOAT_FUNCTION_IDENTIFIER = FLOAT_USER_FUNCTION |
  #local FLOAT_FUNCTION_IDENTIFIER = FLOAT_USER_FUNCTION |
  #declare VECTOR_FUNCTION_IDENTIFIER = VECTOR_USER_FUNCTION |
  #local VECTOR_FUNCTION_IDENTIFIER = VECTOR_USER_FUNCTION |
  #declare COLOR_FUNCTION_IDENTIFIER = COLOR_USER_FUNCTION |
  #local COLOR_FUNCTION_IDENTIFIER = COLOR_USER_FUNCTION`

Reference a user-defined function:
FLOAT_FUNCTION_INVOCATION:
  `FLOAT_FUNCTION_IDENTIFIER (FN_PARAM_LIST)`
VECTOR_FUNCTION_INVOCATION:
  `VECTOR_FUNCTION_IDENTIFIER (FN_PARAM_LIST)`
COLOR_FUNCTION_INVOCATION:
  `COLOR_FUNCTION_IDENTIFIER (FN_PARAM_LIST)`
FN_PARAM_LIST:
  `FN_PARAM_ITEM [, FN_PARAM_LIST]`
FN_PARAM_ITEM:
  `x | y | z | u | v | FLOAT`

Quick Reference Contents

#### 3.8.3.5 Strings

String Expressions
STRING:
  `STRING_FUNCTION | STRING_IDENTIFIER | STRING_LITERAL`
STRING_FUNCTION:
  `chr (INT) | concat (STRING,STRING[,STRING]...) | str (FLOAT,INT,INT) | strlwr (STRING) | strupr (STRING) | substr (STRING,INT,INT) | vstr (INT,VECTOR,STRING,INT,INT)`
STRING_LITERAL:
  `QUOTE [CHARACTER...] QUOTE`
  Limited to 256 characters.
QUOTE:
  `"`
CHARACTER:
  Any ASCII or Unicode character, depending on the charset setting in global_settings. The following escape sequences might be useful when writing to files or message streams:
  `\a` - alarm
  `\b` - backspace
  `\f` - form feed
  `\n` - new line
  `\r` - carriage return
  `\t` - horizontal tab
  `\u` `NNNN` - unicode character four-digit code
  `\v` - vertical tab
  `\\` - backslash
  `\'` - single quote
  `\"` - double quote
STRING_REL_TERM:
  `STRING_LITERAL [STRING_REL_OPERATOR STRING_LITERAL]...`
STRING_REL_OPERATOR:
  `< | <= | = | >= | > | !=`

Quick Reference Contents

#### 3.8.3.6 Arrays

Define an array:
ARRAY_DECLARATION:
  `#declare ARRAY_IDENTIFIER = array DIMENSION... [ARRAY_INITIALIZER] |
  #local ARRAY_IDENTIFIER = array DIMENSION... [ARRAY_INITIALIZER]`
  Limited to five dimensions.
DIMENSION:
  `[ INT ]`
  The brackets here are part of the dimension specification. The integer must be greater than zero.
ARRAY_INITIALIZER:
  `{ ARRAY_INITIALIZER [, ARRAY_INITIALIZER]... } |
  { RVALUE [, RVALUE]... }`

Place a value into an array:
ARRAY_ELEMENT_ASSIGNMENT:
  `#declare ARRAY_REFERENCE = RVALUE [;] |
  #local ARRAY_REFERENCE = RVALUE [;]`
  The semicolon is required for a FLOAT, VECTOR or COLOR assignment.

Reference an array:
ARRAY_REFERENCE:
  `ARRAY_IDENTIFIER ELEMENT...`
ELEMENT:
  `[ INT ]`
  The brackets here are part of the element specification.

Quick Reference Contents

#### 3.8.3.7 Splines

Define a spline:
SPLINE:
  `spline { SPLINE_ITEMS }`
SPLINE_ITEMS
  `[SPLINE_TYPE] PATH_LIST | SPLINE_IDENTIFIER [SPLINE_TYPE][PATH_LIST]`
SPLINE_TYPE:
  `linear_spline | quadratic_spline | cubic_spline | natural_spline`
PATH_LIST:
  `FLOAT, VECTOR [[,] PATH_LIST]`

Reference a spline:
SPLINE_INVOCATION:
  `SPLINE_IDENTIFIER ( FLOAT [, SPLINE_TYPE] )`

Quick Reference Contents

### 3.8.4 Language Directives

Control the parsing of sections of the scene file:
LANGUAGE_DIRECTIVE:
  `INCLUDE_DIRECTIVE | IDENTIFIER_DECLARATION | UNDEF_DIRECTIVE | FOPEN_DIRECTIVE | FCLOSE_DIRECTIVE | READ_DIRECTIVE | WRITE_DIRECTIVE | DEFAULT_DIRECTIVE | VERSION_DIRECTIVE | IF_DIRECTIVE | IFDEF_DIRECTIVE | IFNDEF_DIRECTIVE | SWITCH_DIRECTIVE | WHILE_DIRECTIVE | FOR_DIRECTIVE | TEXT_STREAM_DIRECTIVE | MACRO_DEFINITION`

Quick Reference Contents

#### 3.8.4.1 File Inclusion

Insert content of another scene file:
INCLUDE_DIRECTIVE:
  `#include FILE_NAME`
  File inclusion may be nested at most 10 levels deep.
FILE_NAME:
  `STRING`

Quick Reference Contents

#### 3.8.4.2 Identifier Declaration

Create an identifier for a value, object, etc.
IDENTIFIER_DECLARATION:
  `#declare [deprecated] IDENTIFIER = RVALUE [;] |
  #local [deprecated] IDENTIFIER = RVALUE [;]`
  Up to 127 characters, starting with a letter, consisting of letters, digits and/or the underscore. The semicolon is required for a FLOAT, VECTOR or COLOR declaration.
RVALUE:
  `FLOAT | VECTOR | COLOR | USER_FUNCTION | STRING | ARRAY_REFERENCE | SPLINE | TRANSFORM | CAMERA | LIGHT | OBJECT | MATERIAL | INTERIOR | TEXTURE | TEXTURE_MAP | PIGMENT | COLOR_MAP | PIGMENT_MAP | NORMAL | SLOPE_MAP | NORMAL_MAP | FINISH | MEDIA | DENSITY | DENSITY_MAP | FOG | RAINBOW | SKY_SPHERE`

Destroy an identifier:
UNDEF_DIRECTIVE:
  `#undef IDENTIFIER`

Quick Reference Contents

#### 3.8.4.3 File Input/Output

Open a text file:
FOPEN_DIRECTIVE:
  `#fopen FILE_HANDLE_IDENTIFIER FILE_NAME OPEN_TYPE`
OPEN_TYPE:
  `read | write | append`

Close a text file:
FCLOSE_DIRECTIVE:
  `#fclose FILE_HANDLE_IDENTIFIER`

Read string, float and/or vector values from a text file:
READ_DIRECTIVE:
  `#read ( FILE_HANDLE_IDENTIFIER, DATA_IDENTIFIER [, DATA_IDENTIFIER]... )`
  Use defined (FILE_HANDLE_IDENTIFIER) to detect end-of-file after a read.
DATA_IDENTIFIER:
  `UNDECLARED_IDENTIFIER | FLOAT_IDENTIFIER | VECTOR_IDENTIFIER | STRING_IDENTIFIER | ARRAY_REFERENCE`
  May read a value into an array reference if the array element's type has already been established.

Write string, float and/or vector values to a file:
WRITE_DIRECTIVE:
  `#write ( FILE_HANDLE_IDENTIFIER, [BINARY_WORD_TYPE,] DATA_ITEM [, DATA_ITEM]... )`
BINARY_WORD_TYPE:
  `uint8 | sint8 | uint16be | uint16le | sint16be | sint16le | sint32be | sint32le`
DATA_ITEM:
  `FLOAT | VECTOR | STRING`

Quick Reference Contents

#### 3.8.4.4 Default Texture

Specify a default texture, pigment, normal or finish:
DEFAULT_DIRECTIVE:
  `#default { DEFAULT_ITEM }`
DEFAULT_ITEM:
  `PLAIN_TEXTURE | PIGMENT | NORMAL | FINISH`

Quick Reference Contents

#### 3.8.4.5 Version Identifier

Specify the POV-Ray compatibility version number:
VERSION_DIRECTIVE:
  `#version FLOAT;`

Quick Reference Contents

#### 3.8.4.6 Control Flow Directives

Conditionally parse a section of the scene file, depending on a boolean expression:
IF_DIRECTIVE:
  `#if ( BOOL ) TOKENS [#elseif ( BOOL ) TOKENS] [#else TOKENS] #end`
TOKENS:
  Any number of POV-Ray keywords, identifiers, values and/or punctuation.

Conditionally parse a section of the scene file, depending on the existence of an identifier:
IFDEF_DIRECTIVE:
  `#ifdef ( IDENTIFIER ) TOKENS [#elseif ( IDENTIFER ) TOKENS] [#else TOKENS] #end`
IFNDEF_DIRECTIVE:
  `#ifndef ( IDENTIFIER ) TOKENS [#elseif ( IDENTIFER ) TOKENS] [#else TOKENS] #end`

Conditionally parse a section of the scene file, depending on the value of a float expression:
SWITCH_DIRECTIVE:
  `#switch ( FLOAT ) SWITCH_CLAUSE... [#else TOKENS] #end`
SWITCH_CLAUSE:
  `#case ( FLOAT ) TOKENS [#break] |
  #range ( F_LOW, F_HIGH ) TOKENS [#break]`

Repeat a section of the scene file while a boolean condition is true:
WHILE_DIRECTIVE:
  `#while ( LOGICAL_EXPRESSION ) TOKENS [#break] #end`

Increment an Identifier from Start to End (inclusive) with the given Step size:
FOR_DIRECTIVE:
  `#for (Identifier, Start, End [, Step]) TOKENS [#break] #end`

Quick Reference Contents

#### 3.8.4.7 Message Streams

Send a message to a text stream:
TEXT_STREAM_DIRECTIVE:
  `#debug STRING | #error STRING | #warning STRING`

Quick Reference Contents

#### 3.8.4.8 Macro

Define a macro:
MACRO_DEFINITION:
  `#macro MACRO_IDENTIFIER ( [PARAM_IDENTIFIER [, PARAM_IDENTIFIER]...] ) TOKENS [#break] #end`
  A parameter identifier may not be repeated in the list.

Invoke a macro:
MACRO_INVOCATION:
  `MACRO_IDENTIFIER ( [ACTUAL_PARAM [, ACTUAL_PARAM]...] )`
ACTUAL_PARAM:
  `IDENTIFIER | RVALUE`

Quick Reference Contents

#### 3.8.4.9 Embedded Directives

Some directives may be embedded in CAMERA, LIGHT, OBJECT and ATMOSPHERIC_EFFECT statements. However, the directives should only include items (if any) that are valid for a given statement. Also, they should not disrupt the required order of items, where applicable.
EMBEDDED_DIRECTIVE:
  `IDENTIFIER_DECLARATION | UNDEF_DIRECTIVE | READ_DIRECTIVE | WRITE_DIRECTIVE | IF_DIRECTIVE | IFDEF_DIRECTIVE | IFNDEF_DIRECTIVE | SWITCH_DIRECTIVE | WHILE_DIRECTIVE | TEXT_STREAM_DIRECTIVE`

Quick Reference Contents

### 3.8.5 Transformations

Rotate, resize, move, or otherwise manipulate the coordinates of an object or texture
TRANSFORMATION:
  `rotate VECTOR | scale VECTOR | translate VECTOR | TRANSFORM | MATRIX`
TRANSFORM:
  `transform TRANSFORM_IDENTIFIER | transform { [TRANSFORM_ITEM...] }`
TRANSFORM_ITEM:
  `TRANSFORM_IDENTIFIER | TRANSFORMATION | inverse`
MATRIX:
  `matrix < F_VAL00, F_VAL01, F_VAL02, F_VAL10, F_VAL11, F_VAL12, F_VAL20, F_VAL21, F_VAL22, F_VAL30, F_VAL31, F_VAL32 >`

Quick Reference Contents

### 3.8.6 Camera

Describe the position, projection type and properties of the camera viewing the scene
CAMERA:
  Jump to SDL
  `camera { [CAMERA_TYPE] [CAMERA_ITEMS] [CAMERA_MODIFIERS] } |`
  `camera { CAMERA_IDENTIFIER [TANSFORMATIONS ...] }`
CAMERA_TYPE:
  `perspective | orthographic | mesh_camera {MESHCAM_MODIFIERS} location direction smooth | fisheye | ultra_wide_angle | omnimax | panoramic | spherical | cylinder CYLINDER_TYPE`
CYLINDER_TYPE:
  `1 | 2 | 3 | 4`
CAMERA_ITEMS:
  `[location VECTOR] & [right VECTOR] & [up VECTOR] & [direction VECTOR] & [sky VECTOR]`
CAMERA_MODIFIERS:
  `[angle [angle F_HORIZONTAL] [,F_VERTICAL]] & [look_at VECTOR] & [FOCAL_BLUR] & [NORMAL] & [TRANSFORMATION...]`
FOCAL_BLUR:
  `aperture FLOAT & blur_samples [MIN_SAMPLES,] MAX_SAMPLES & [focal_point VECTOR] & [confidence FLOAT] & [variance FLOAT] & [bokeh {pigment {BOKEH}}]`
MESHCAM_MODIFIERS:
  `RAYS_PER_PIXEL & DISTRIBUTION_TYPE & [MAX_DISTANCE] & MESH_OBJECT & [MESH_OBJECT...]`
RAYS_PER_PIXEL:
  `FLOAT > 1`
DISTRIBUTION_TYPE:
  `0 | 1 | 2 | 3`
MAX_DISTANCE:
  `FLOAT > EPSILON`
MIN_SAMPLES:
  `INT`
MAX_SAMPLES:
  `INT`
BOKEH:
  `COLOR_VECTOR in the range of <0,0,0> ... <1,1,0>`

Quick Reference Contents

### 3.8.7 Lights

Specify light sources for the scene or for specific objects
LIGHT:
  `LIGHT_SOURCE | LIGHT_GROUP`

Describe the position, type and properties of a light source for the scene:
LIGHT_SOURCE:
  Jump to SDL
  `light_source { V_LOCATION, COLOR [LIGHT_SOURCE_ITEMS] }`
LIGHT_SOURCE_ITEMS:
  `[LIGHT_TYPE] & [AREA_LIGHT_ITEMS] & [LIGHT_MODIFIERS]`
LIGHT_TYPE:
  `spotlight [SPOTLIGHT_ITEMS] | cylinder [SPOTLIGHT_ITEMS]`
SPOTLIGHT_ITEMS:
  `[radius FLOAT] & [falloff FLOAT] & [tightness FLOAT] & [point_at VECTOR]`
AREA_LIGHT_ITEMS:
  `area_light V_AXIS1, V_AXIS2, I_SIZE1, I_SIZE2 [AREA_LIGHT_MODIFIERS]`
AREA_LIGHT_MODIFIERS:
  `[adaptive INT] & [jitter] & [circular] & [orient] & [area_illumination [BOOL]]`
LIGHT_MODIFIERS:
  `[LIGHT_PHOTONS] & [looks_like { OBJECT }] & [TRANSFORMATION...] & [fade_distance FLOAT] &[fade_power FLOAT] & [media_attenuation [BOOL]] & [media_interaction [BOOL]] &[shadowless] & [projected_through { OBJECT_IDENTIFIER }] & [parallel [point_at VECTOR]]`

Specify how a light source should interact with photons:
LIGHT_PHOTONS:
  `photons { LIGHT_PHOTON_ITEMS }`
LIGHT_PHOTON_ITEMS:
  `[refraction BOOL] & [reflection BOOL] & [area_light]`

Quick Reference Contents

#### 3.8.7.1 Lightgroup

Assign objects to specific light sources:
LIGHT_GROUP:
  Jump to SDL
  `light_group { LIGHT_GROUP_ITEM... [LIGHT_GROUP_MODIFIERS] }`
LIGHT_GROUP_ITEM:
  `LIGHT_SOURCE | OBJECT | LIGHT_GROUP`
LIGHT_GROUP_MODIFIERS:
  `[global_lights BOOL] & [TRANSFORMATION...]`

Quick Reference Contents

### 3.8.8 Objects

Describe an object in the scene
OBJECT:
  `FINITE_SOLID_OBJECT | FINITE_PATCH_OBJECT | INFINITE_SOLID_OBJECT | ISOSURFACE | PARAMETRIC | CSG_OBJECT | OBJECT_STATEMENT`
OBJECT_STATEMENT:
  `object { OBJECT_IDENTIFIER [OBJECT_MODIFIERS] }`

Quick Reference Contents

#### 3.8.8.1 Finite Solid Objects

Describe a solid finite shape:
FINITE_SOLID_OBJECT:
  `BLOB | BOX | CONE | CYLINDER | HEIGHT_FIELD | ISOSURFACE | JULIA_FRACTAL | LATHE | OVUS | PARAMETRIC | PRISM | SPHERE | SPHERE_SWEEP | SUPERELLIPSOID | SOR | TEXT | TORUS`

The blob object:
BLOB:
  Jump to SDL
  `blob { [threshold FLOAT] BLOB_ITEM... [BLOB_MODIFIERS] }`
BLOB_ITEM:
  `sphere { V_CENTER, F_RADIUS, [strength] F_STRENGTH [COMPONENT_MODIFIERS] } |
  cylinder { V_END1, V_END2, F_RADIUS, [strength] F_STRENGTH [COMPONENT_MODIFIERS] }`
COMPONENT_MODIFIERS:
  `[TEXTURE] & [PIGMENT] & [NORMAL] & [FINISH] & [TRANSFORMATION...]`
BLOB_MODIFIERS:
  `[hierarchy [BOOL]] & [sturm [BOOL]] & [OBJECT_MODIFIERS]`

The box object:
BOX:
  Jump to SDL
  `box { V_CORNER1, V_CORNER2 [BOX_MODIFIERS] }`
BOX_MODIFIERS:
  `[UV_MAPPING] & [OBJECT_MODIFIERS]`

The cone object:
CONE:
  Jump to SDL
  `cone { V_BASE_CENTER, F_BASE_RADIUS, V_CAP_CENTER, F_CAP_RADIUS [open] [OBJECT_MODIFIERS] }`

The cylinder object:
CYLINDER:
  Jump to SDL
  `cylinder { V_BASE_CENTER, V_CAP_CENTER, F_RADIUS [open] [OBJECT_MODIFIERS] }`

The height field object:
HEIGHT_FIELD:
  Jump to SDL
  `height_field { HF_IMAGE [HF_MODIFIERS] }`
HF_IMAGE:
  `FUNCTION_IMAGE | [HF_TYPE] FILE_NAME [gamma HF_GAMMA] [premultiplied BOOL]`
HF_TYPE:
  `exr | gif | hdr | iff | jpeg | pgm | png | ppm | sys | tga | tiff`
HF_GAMMA:
  `FLOAT | srgb`
HF_MODIFIERS:
  `[hierarchy [BOOL]] & [smooth] & [water_level FLOAT] & [OBJECT_MODIFIERS]`

The isosurface object:
ISOSURFACE:
  Jump to SDL
  `isosurface { FLOAT_USER_FUNCTION [ISOSURFACE_ITEMS] [OBJECT_MODIFIERS] }`
ISOSURFACE_ITEMS:
  `[contained_by { CONTAINER }] & [threshold FLOAT] & [accuracy FLOAT] & [max_gradient FLOAT [evaluate F_MIN_ESTIMATE, F_MAX_ESTIMATE, F_ATTENUATION]] & [open] & [INTERSECTION_LIMIT]`
CONTAINER:
  `sphere { V_CENTER, F_RADIUS } | box { V_CORNER1, V_CORNER2 }`
INTERSECTION_LIMIT:
  `max_trace INT | all_intersections`

The Julia fractal object:
JULIA_FRACTAL:
  Jump to SDL
  `julia_fractal { 4D_VECTOR [JF_ITEMS] [OBJECT_MODIFIERS] }`
JF_ITEMS:
  `[ALGEBRA_ITEM] & [max_iteration INT] & [precision FLOAT] & [slice V4_NORMAL, F_DISTANCE]`
ALGEBRA_ITEM:
  `quaternion [QUATER_FUNCTION] | hypercomplex [HYPER_FUNCTION]`
QUATER_FUNCTION:
  `sqr | cube`
HYPER_FUNCTION:
  `sqr | cube | exp | reciprocal | sin | asin | sinh | asinh | cos | acos | cosh | acosh | tan | atan | tanh | atanh | ln | pwr (FLOAT,FLOAT)`

The lathe object:
LATHE:
  Jump to SDL
  `lathe { [LATHE_SPLINE_TYPE] I_NUM_POINTS, POINT_LIST [LATHE_MODIFIERS] }`
LATHE_SPLINE_TYPE:
  `linear_spline | quadratic_spline | cubic_spline | bezier_spline`
POINT_LIST:
  `2D_VECTOR [, 2D_VECTOR]...`
  The quantity of 2D_VECTORs is specified by the I_NUM_POINTS value.
LATHE_MODIFIERS:
  `[sturm [BOOL]] & [UV_MAPPING] & [OBJECT_MODIFIERS]`

The ovus object:
OVUS:
  Jump to SDL
  `ovus { BOTTOM_RADIUS, TOP_RADIUS [OBJECT_MODIFIERS] }`

The parametric object:
PARAMETRIC:
  Jump to SDL
  `parametric { FLOAT_USER_FUNCTION, FLOAT_USER_FUNCTION, FLOAT_USER_FUNCTION 2D_VECTOR, 2D_VECTOR [PARAMETRIC_ITEMS] [UV_MAPPING] & [OBJECT_MODIFIERS] }`
PARAMETRIC_ITEMS:
  `[contained_by { CONTAINER }] & [max_gradient FLOAT] & [accuracy FLOAT] & [precompute I_DEPTH, x, y, z]`
CONTAINER:
  `sphere { V_CENTER, F_RADIUS } | box { V_CORNER1, V_CORNER2 }`

The prism object:
PRISM:
  Jump to SDL
  `prism { [PRISM_ITEMS] F_HEIGHT1, F_HEIGHT2, I_NUM_POINTS, POINT_LIST [open] [PRISM_MODIFIERS] }`
PRISM_ITEMS:
  `[PRISM_SPLINE_TYPE] & [PRISM_SWEEP_TYPE]`
PRISM_SPLINE_TYPE:
  `linear_spline | quadratic_spline | cubic_spline | bezier_spline`
PRISM_SWEEP_TYPE:
  `linear_sweep | conic_sweep`
PRISM_MODIFIERS:
  `[sturm [BOOL]] & [OBJECT_MODIFIERS]`

The sphere object:
SPHERE:
  Jump to SDL
  `sphere { V_CENTER, F_RADIUS [SPHERE_MODIFIERS] }`
SPHERE_MODIFIERS:
  `[UV_MAPPING] & [OBJECT_MODIFIERS]`

The sphere sweep object:
SPHERE_SWEEP:
  Jump to SDL
  `sphere_sweep { SWEEP_SPLINE_TYPE I_NUM_SPHERES, SPHERE_LIST [tolerance F_DEPTH_TOLERANCE] [OBJECT_MODIFIERS] }`
SWEEP_SPLINE_TYPE:
  `linear_spline | b_spline | cubic_spline`
SPHERE_LIST:
  `V_CENTER, F_RADIUS [, SPHERE_LIST]`
  The quantity of V_CENTER, F_RADIUS pairs is specified by the I_NUM_SPHERES value.

The superquadric ellipsoid object:
SUPERELLIPSOID:
  Jump to SDL
  `superellipsoid { < FLOAT, FLOAT > [OBJECT_MODIFIERS] }`

The surface of revolution object:
SOR:
  Jump to SDL
  `sor { I_NUM_POINTS, POINT_LIST [open] [SOR_MODIFIERS] }`
SOR_MODIFIERS:
  `[sturm [BOOL]] & [UV_MAPPING] & [OBJECT_MODIFIERS]`

The text object:
TEXT:
  Jump to SDL
  `text { ttf FILE_NAME STRING F_THICKNESS, V_OFFSET [OBJECT_MODIFIERS] }`

The torus object:
TORUS:
  Jump to SDL
  `torus { F_MAJOR_RADIUS, F_MINOR_RADIUS [TORUS_MODIFIERS] }`
TORUS_MODIFIERS:
  `[sturm [BOOL]] & [UV_MAPPING] & [OBJECT_MODIFIERS]`

Quick Reference Contents

#### 3.8.8.2 Finite Patch Objects

Describe a totally thin, finite shape:
FINITE_PATCH_OBJECT:
  Jump to SDL
  `BICUBIC_PATCH | DISC | MESH | MESH2 | POLYGON | TRIANGLE | SMOOTH_TRIANGLE`

The bicubic patch object:
BICUBIC_PATCH:
  Jump to SDL
  `bicubic_patch { PATCH_ITEMS [PATCH_UV_VECTORS] CONTROL_POINTS [BICUBIC_PATCH_MODIFIERS] }`
PATCH_ITEMS:
  `type PATCH_TYPE & [u_steps INT] & [v_steps INT] & [flatness FLOAT]`
PATCH_TYPE:
  `0 | 1`
PATCH_UV_VECTORS:
  `uv_vectors V2_CORNER1, V2_CORNER2, V2_CORNER3, V2_CORNER4`
CONTROL_POINTS:
  16 VECTORs, optionally separated by commas.
BICUBIC_PATCH_MODIFIERS:
  `[UV_MAPPING] & [OBJECT_MODIFIERS]`

The disc object:
DISC:
  Jump to SDL
  `disc { V_CENTER, V_NORMAL, F_RADIUS [, F_HOLE_RADIUS] [OBJECT_MODIFIERS] }`

The mesh object:
MESH:
  Jump to SDL
  `mesh { MESH_TRIANGLE... [MESH_MODIFIERS] }`
MESH_TRIANGLE:
  `triangle { V_CORNER1, V_CORNER2, V_CORNER3 [MESH_UV_VECTORS] [MESH_TEXTURE] } |
  smooth_triangle { V_CORNER1, V_NORMAL1, V_CORNER2, V_NORMAL2, V_CORNER3, V_NORMAL3 [MESH_UV_VECTORS] [MESH_TEXTURE] }`
MESH_UV_VECTORS:
  `uv_vectors V2_CORNER1, V2_CORNER2, V2_CORNER3`
MESH_TEXTURE:
  `texture { TEXTURE_IDENTIFIER } |
  texture_list { TEXTURE_IDENTIFIER TEXTURE_IDENTIFIER TEXTURE_IDENTIFIER }`
MESH_MODIFIERS:
  `[inside_vector V_DIRECTION] & [hierarchy [BOOL]] & [UV_MAPPING] & [OBJECT_MODIFIERS]`

The mesh2 object:
MESH2:
  Jump to SDL
  `mesh2 { MESH2_VECTORS [TEXTURE_LIST] MESH2_INDICES [MESH2_MODIFIERS] }`
MESH2_VECTORS:
  `VERTEX_VECTORS [NORMAL_VECTORS] [UV_VECTORS]`
VERTEX_VECTORS:
  `vertex_vectors { I_NUM_VERTICES, VECTOR [, VECTOR]... }`
NORMAL_VECTORS:
  `normal_vectors { I_NUM_NORMALS, VECTOR [, VECTOR]... }`
UV_VECTORS:
  `uv_vectors { I_NUM_UV_VECTORS, 2D_VECTOR [, 2D_VECTOR]... }`
TEXTURE_LIST:
  `texture_list { I_NUM_TEXTURES, TEXTURE [, TEXTURE]... }`
MESH2_INDICES:
  `FACE_INDICES [NORMAL_INDICES] [UV_INDICES]`
FACE_INDICES:
  `face_indices { I_NUM_FACES, FACE_INDICES_ITEM [, FACE_INDICES_ITEM]... }`
FACE_INDICES_ITEM:
  `VECTOR [, I_TEXTURE_INDEX [, I_TEXTURE_INDEX, I_TEXTURE_INDEX ]]`
NORMAL_INDICES:
  `normal_indices { I_NUM_FACES, VECTOR [, VECTOR]... }`
UV_INDICES:
  `uv_indices { I_NUM_FACES, VECTOR [, VECTOR]... }`
MESH2_MODIFIERS:
  `[inside_vector V_DIRECTION] & [UV_MAPPING] & [OBJECT_MODIFIERS]`

The polygon object:
POLYGON:
  Jump to SDL
  `polygon { I_NUM_POINTS, V_POINT [, V_POINT]... [OBJECT_MODIFIERS] }`
  The quantity of V_POINTs is specified by the I_NUM_POINTS value.

The triangle object:
TRIANGLE:
  Jump to SDL
  `triangle { V_CORNER1, V_CORNER2, V_CORNER3 [OBJECT_MODIFIERS] }`

The smooth triangle object:
SMOOTH_TRIANGLE:
  Jump to SDL
  `smooth_triangle { V_CORNER1, V_NORMAL1, V_CORNER2, V_NORMAL2, V_CORNER3, V_NORMAL3 [OBJECT_MODIFIERS] }`

Quick Reference Contents

#### 3.8.8.3 Infinite Solid Objects

Describe a solid, possibly infinite, shape:
INFINITE_SOLID_OBJECT:
  `PLANE | POLY | CUBIC | QUARTIC | QUADRIC`

The plane object:
PLANE:
  Jump to SDL
  `plane { V_NORMAL, F_DISTANCE [OBJECT_MODIFIERS] }`

The poly object:
POLY:
  Jump to SDL
  `poly { ORDER, < POLY_COEFFICIENTS > [POLY_MODIFIERS] }`
ORDER:
  An integer value between 2 and 35 inclusive.
POLY_COEFFICIENTS:
  A quantity n of FLOATs separated by commas, where n is `((ORDER+1)*(ORDER+2)*(ORDER+3))/6.`
POLY_MODIFIERS:
  `[sturm [BOOL]] & [OBJECT_MODIFIERS]`

The polynomial object:
POLYNOMIAL:
  Jump to SDL
  `polynomial { ORDER, [POLYNOMIAL_COEFFICIENTS]... [POLY_MODIFIERS] }`
ORDER:
  An integer value between 2 and 35 inclusive. The sum of X_POWER, Y_POWER and Z_POWER of any xyz(): coefficient must never be greater than this integer.
POLYNOMIAL_COEFFICIENTS:
  `xyz( X_POWER , Y_POWER , Z_POWER):VALUE [,]`
X_POWER
  The power of x for that coefficient. It's a positive or null integer.
Y_POWER
  The power of y for that coefficient. It's a positive or null integer.
Z_POWER
  The power of z for that coefficient. It's a positive or null integer.
VALUE
  The value as a FLOAT of the coefficient of the polynomial equation for that powers of x,y and z. If a coefficient is not specified, its value defaults to 0.
POLY_MODIFIERS:
  `[sturm [BOOL]] & [OBJECT_MODIFIERS]`

The cubic object:
CUBIC:
  `cubic { < CUBIC_COEFFICIENTS > [POLY_MODIFIERS] }`
CUBIC_COEFFICIENTS:
  20 FLOATs separated by commas.

The quartic object:
QUARTIC:
  `quartic { < QUARTIC_COEFFICIENTS > [POLY_MODIFIERS] }`
QUARTIC_COEFFICIENTS:
  35 FLOATs separated by commas.

The quadric object:
QUADRIC:
  Jump to SDL
  `quadric { < FLOAT, FLOAT, FLOAT >, < FLOAT, FLOAT, FLOAT >, < FLOAT, FLOAT, FLOAT >, FLOAT [OBJECT_MODIFIERS] }`

Quick Reference Contents

#### 3.8.8.4 CSG

Describe one complex shape from multiple shapes:
CSG_OBJECT:
  Jump to SDL
  `UNION | INTERSECTION | DIFFERENCE | MERGE`

Combine multiple shapes into one:
UNION:
  `union { UNION_OBJECT UNION_OBJECT... [UNION_MODIFIERS] }`
UNION_OBJECT:
  `OBJECT | LIGHT`
UNION_MODIFIERS:
  `[split_union BOOL] & [OBJECT_MODIFIERS]`

Create a new shape from the overlapping portions of multiple shapes:
INTERSECTION:
  `intersection { SOLID_OBJECT SOLID_OBJECT... [INTERSECTION_MODIFIERS] }`
SOLID_OBJECT:
  `FINITE_SOLID_OBJECT | INFINITE_SOLID_OBJECT | ISOSURFACE | CSG_OBJECT`
INTERSECTION_MODIFIERS:
  `[cutaway_textures] & [OBJECT_MODIFIERS]`

Subtract one or more shapes from another:
DIFFERENCE:
  `difference { SOLID_OBJECT SOLID_OBJECT... [DIFFERENCE_MODIFIERS] }`
DIFFERENCE_MODIFIERS:
  `[cutaway_textures] & [OBJECT_MODIFIERS]`

Combine multiple shapes into one, removing internal surfaces:
MERGE:
  `merge { SOLID_OBJECT SOLID_OBJECT... [OBJECT_MODIFIERS] }`

Quick Reference Contents

### 3.8.9 Object Modifiers

Manipulate the appearance of an object
OBJECT_MODIFIERS:
  `[OBJECT_PHOTONS] & [CLIPPED_BY] & [BOUNDED_BY] & [MATERIAL] & [INTERIOR] & [INTERIOR_TEXTURE] &[TEXTURE] & [PIGMENT] & [NORMAL] & [FINISH] & [TRANSFORMATION...] & [no_shadow] & [no_image[BOOL]] & [no_radiosity[BOOL]] & [no_reflection[BOOL]] & [inverse] & [double_illuminate[BOOL]] & [hollow [BOOL]] & [radiosity { importance IMPORTANCE }]`

Specify how an object should interact with photons:
OBJECT_PHOTONS:
  Jump to SDL
  `photons { OBJECT_PHOTON_ITEMS }`
OBJECT_PHOTON_ITEMS:
  `[target [F_SPACING_MULT]] & [refraction BOOL] & [reflection BOOL] & [collect BOOL] & [pass_through [BOOL]]`

Slice a portion of a shape:
CLIPPED_BY:
  `clipped_by { UNTEXTURED_SOLID_OBJECT... } |
  clipped_by { bounded_by }`
UNTEXTURED_SOLID_OBJECT:
  `FINITE_SOLID_OBJECT | INFINITE_SOLID_OBJECT`
  Use neither with a texture applied.

Specify a bounding shape for an object:
BOUNDED_BY:
  `bounded_by { UNTEXTURED_SOLID_OBJECT... } |
  bounded_by { clipped_by }`

Quick Reference Contents

#### 3.8.9.1 UV Mapping

Map a texture to an object using surface coordinates:
UV_MAPPING:
  Jump to SDL
  `uv_mapping PIGMENT | pigment { uv_mapping PIGMENT_BODY } |
  uv_mapping NORMAL | normal { uv_mapping NORMAL_BODY } |
  uv_mapping TEXTURE | texture { uv_mapping TEXTURE_BODY }`

Quick Reference Contents

#### 3.8.9.2 Material

Group together surface textures and interior properties:
MATERIAL:
  `material { [MATERIAL_IDENTIFIER] [MATERIAL_ITEM ...] }`
MATERIAL_ITEMS:
  `TEXTURE | INTERIOR_TEXTURE | INTERIOR | TRANSFORMATION`

Quick Reference Contents

#### 3.8.9.3 Interior

Describe the interior of an object:
INTERIOR:
  Jump to SDL
  `interior { [INTERIOR_IDENTIFIER] [INTERIOR_ITEMS] }`
INTERIOR_ITEMS:
  `[ior FLOAT] & [dispersion FLOAT] & [dispersion_samples INT] & [caustics FLOAT] & [fade_distance FLOAT] & [fade_power FLOAT] & [fade_color COLOR] & [MEDIA...]`

Quick Reference Contents

#### 3.8.9.4 Interior Texture

Describe the interior surface of an object:
INTERIOR_TEXTURE:
  `interior_texture { TEXTURE_BODY }`

Quick Reference Contents

### 3.8.10 Texture

Describe the surface of an object
TEXTURE:
  `PLAIN_TEXTURE | LAYERED_TEXTURE | PATTERNED_TEXTURE`

Quick Reference Contents

#### 3.8.10.1 Plain Texture

Describe a texture consisting of a single pigment, normal and finish:
PLAIN_TEXTURE:
  `texture { PLAIN_TEXTURE_BODY }`
PLAIN_TEXTURE_BODY:
  `[PLAIN_TEXTURE_IDENT] [PNF_IDENTIFIERS] [PNF_ITEMS]`
PNF_IDENTIFIERS:
  `[PIGMENT_IDENTIFIER] & [NORMAL_IDENTIFIER] & [FINISH_IDENTIFIER]`
PNF_ITEMS:
  `[PIGMENT] & [NORMAL] & [FINISH] & [TRANSFORMATION...]`

Quick Reference Contents

#### 3.8.10.2 Layered Texture

Describe a texture consisting of two or more semi-transparent layers:
LAYERED_TEXTURE:
  Jump to SDL
  `texture { LAYERED_TEXTURE_IDENT } |
  PLAIN_TEXTURE PLAIN_TEXTURE...`

Quick Reference Contents

#### 3.8.10.3 Patterned Texture

Describe a texture using a pattern or blending function:
PATTERNED_TEXTURE:
  Jump to SDL
  `texture { PATTERNED_TEXTURE_BODY }`
PATTERNED_TEXTURE_BODY:
  `PATTERNED_TEXTURE_IDENT [TRANSFORMATION...] | TEXTURE_PATTERN [PATTERN_MODIFIERS] | MATERIAL_MAP [TRANSFORMATION...]`
TEXTURE_PATTERN:
  `TEXTURE_LIST_PATTERN | MAP_PATTERN TEXTURE_MAP`
TEXTURE_LIST_PATTERN:
  `brick TEXTURE, TEXTURE [BRICK_ITEMS] |
  checker TEXTURE, TEXTURE |
  hexagon TEXTURE, TEXTURE, TEXTURE |
  object { LIST_OBJECT TEXTURE, TEXTURE }
  square TEXTURE, TEXTURE, TEXTURE, TEXTURE |
  tiling [PATTERN_NUMBER] [TEXTURE_MAP] |
  triangular TEXTURE, TEXTURE, TEXTURE, TEXTURE, TEXTURE, TEXTURE
  `
BRICK_ITEMS:
  `[brick_size VECTOR] & [mortar FLOAT]`
LIST_OBJECT:
  `UNTEXTURED_SOLID_OBJECT | UNTEXTURED_SOLID_OBJECT_IDENT`
TEXTURE_MAP:
  `texture_map { TEXTURE_MAP_BODY } [BLEND_MAP_MODIFIERS]`
TEXTURE_MAP_BODY:
  `TEXTURE_MAP_IDENTIFIER | TEXTURE_MAP_ENTRY...`
  There may be from 2 to 256 map entries.
TEXTURE_MAP_ENTRY:
  `[ FLOAT TEXTURE_BODY ]`
  The brackets here are part of the map entry.
TEXTURE_BODY:
  `PLAIN_TEXTURE_BODY | LAYERED_TEXTURE_IDENT | PATTERNED_TEXTURE_BODY`
MATERIAL_MAP:
  `material_map { BITMAP_IMAGE [BITMAP_MODIFIERS] TEXTURE... }`

Quick Reference Contents

#### 3.8.10.4 Pigment

Describe a color or pattern of colors for a texture:
PIGMENT:
  Jump to SDL
  `pigment { PIGMENT_BODY }`
PIGMENT_BODY:
  `[PIGMENT_IDENTIFIER] [PIGMENT_TYPE] [PIGMENT_MODIFIERS] [PAVEMENT_MODIFIERS]`
PIGMENT_TYPE:
  `COLOR | COLOR_LIST_PATTERN | PIGMENT_LIST_PATTERN | IMAGE_MAP | MAP_PATTERN [COLOR_MAP] | MAP_PATTERN PIGMENT_MAP`
COLOR_LIST_PATTERN:
  `brick [COLOR [, COLOR]] [BRICK_ITEMS] |
  checker [COLOR [, COLOR]] |
  hexagon [COLOR [, COLOR [, COLOR]]] |
  object { LIST_OBJECT]] [COLOR [, COLOR } |
  square [COLOR_1 [, COLOR_2 [, COLOR_3 [, COLOR_4]]]] |
  tiling [PATTERN_NUMBER] [COLOR_MAP] |
  triangular [COLOR_1 [, COLOR_2 [, COLOR_3 [, COLOR_4 [, COLOR_5 [, COLOR_6]]]]]]`
PIGMENT_LIST_PATTERN:
  `brick PIGMENT, PIGMENT [BRICK_ITEMS] |
  checker PIGMENT, PIGMENT |
  hexagon PIGMENT, PIGMENT, PIGMENT |
  object { LIST_OBJECT PIGMENT, PIGMENT } |
  square [COLOR_1 [, COLOR_2 [, COLOR_3 [, COLOR_4]]]] |
  tiling [PATTERN_NUMBER] [PIGMENT_MAP] |
  triangular [COLOR_1 [, COLOR_2 [, COLOR_3 [, COLOR_4 [, COLOR_5 [, COLOR_6]]]]]]`
IMAGE_MAP:
  `image_map {BITMAP_IMAGE [IMAGE_MAP_MODIFIER...] [BITMAP_MODIFIERS] }`
IMAGE_MAP_MODIFIER:
  `filter I_PALETTE, F_AMOUNT | filter all F_AMOUNT | transmit I_PALETTE, F_AMOUNT | transmit all F_AMOUNT`
COLOR_MAP:
  `color_map { COLOR_MAP_BODY } [BLEND_MAP_MODIFIERS] |
  colour_map { COLOR_MAP_BODY } [BLEND_MAP_MODIFIERS]`
COLOR_MAP_BODY:
  `COLOR_MAP_IDENTIFIER | COLOR_MAP_ENTRY...`
  There may be from 2 to 256 map entries.
COLOR_MAP_ENTRY:
  `[ FLOAT COLOR ]`
  The brackets here are part of the map entry.
PATTERN_NUMBER:
  `[ INT ]`
  1 of 24 different patterns.
PIGMENT_MAP:
  `pigment_map { PIGMENT_MAP_BODY } [BLEND_MAP_MODIFIERS]`
PIGMENT_MAP_BODY:
  `PIGMENT_MAP_IDENTIFIER | PIGMENT_MAP_ENTRY...`
  There may be from 2 to 256 map entries.
PIGMENT_MAP_ENTRY:
  `[ FLOAT PIGMENT_BODY ]`
  The brackets here are part of the map entry.
PAVEMENT_MODIFIERS:
  Jump to SDL
  `pavement number_of_sides SIDES_VALUE | number_of_tiles TILES_VALUE | pattern PATTERN_VALUE | exterior EXTERIOR_VALUE | interior INTERIOR_VALUE | form FORM_VALUE | PATTERN_MODIFIERS`
PIGMENT_MODIFIERS:
  `[QUICK_COLOR] & [PATTERN_MODIFIERS]`
QUICK_COLOR:
  `quick_color COLOR | quick_colour COLOR`

Quick Reference Contents

#### 3.8.10.5 Normal

Simulate the visual or tactile surface characteristics of a texture:
NORMAL:
  Jump to SDL
  `normal { NORMAL_BODY }`
NORMAL_BODY:
  `[NORMAL_IDENTIFIER] [NORMAL_TYPE] [NORMAL_MODIFIERS]`
NORMAL_TYPE:
  `NORMAL_PATTERN | BUMP_MAP`
NORMAL_PATTERN:
  `NORMAL_LIST_PATTERN |
  MAP_PATTERN [F_DEPTH] [SLOPE_MAP] |
  MAP_PATTERN NORMAL_MAP`
NORMAL_LIST_PATTERN:
  `brick NORMAL, NORMAL [BRICK_ITEMS] | brick [F_DEPTH] [BRICK_ITEMS] |
  checker NORMAL, NORMAL | checker [F_DEPTH] |
  hexagon NORMAL, NORMAL, NORMAL | hexagon [F_DEPTH] |
  object { LIST_OBJECT NORMAL, NORMAL } | object { LIST_OBJECT } [F_DEPTH]`
NORMAL_MAP:
  `normal_map { NORMAL_MAP_BODY } [BLEND_MAP_MODIFIERS]`
NORMAL_MAP_BODY:
  `NORMAL_MAP_IDENTIFIER | NORMAL_MAP_ENTRY...`
  There may be from 2 to 256 map entries.
NORMAL_MAP_ENTRY:
  `[ FLOAT NORMAL_BODY ]`
  The brackets here are part of the map entry.
SLOPE_MAP:
  `slope_map { SLOPE_MAP_BODY } [BLEND_MAP_MODIFIERS]`
SLOPE_MAP_BODY:
  `SLOPE_MAP_IDENTIFIER | SLOPE_MAP_ENTRY...`
  There may be from 2 to 256 map entries.
SLOPE_MAP_ENTRY:
  `[ FLOAT, < F_HEIGHT, F_SLOPE > ]`
  The brackets here are part of the map entry.
BUMP_MAP:
  `bump_map { BITMAP_IMAGE [BUMP_MAP_MODIFIERS] }`
BUMP_MAP_MODIFIERS:
  `[BITMAP_MODIFIERS] & [BUMP_METHOD] & [bump_size FLOAT]`
BUMP_METHOD:
  `use_index | use_color | use_colour`
NORMAL_MODIFIERS:
  `[PATTERN_MODIFIERS] & [bump_size FLOAT] & [no_bump_scale [BOOL]] & [accuracy FLOAT]`

Quick Reference Contents

#### 3.8.10.6 Finish

Describe the reflective properties of a surface:
FINISH:
  Jump to SDL
  `finish { [FINISH_IDENTIFIER] [FINISH_ITEMS] }`
FINISH_ITEMS:
  `[ambient COLOR] & [diffuse [albedo] FLOAT [, FLOAT]] & [brilliance FLOAT] & [PHONG] & [SPECULAR] & [REFLECTION] & [IRID] & [crand FLOAT] & [SUBSURFACE] & [conserve_energy [BOOL]]`
PHONG:
  `phong [albedo] FLOAT & [phong_size FLOAT] & [metallic [FLOAT]]`
SPECULAR:
  `specular [albedo] FLOAT & [roughness FLOAT] & [metallic [FLOAT]]`
REFLECTION:
  `reflection COLOR [reflection_exponent FLOAT] |
  reflection { [COLOR,] COLOR [REFLECTION_ITEMS] }`
REFLECTION_ITEMS:
  `[fresnel BOOL] & [falloff FLOAT] & [exponent FLOAT] & [metallic [FLOAT]]`
  Must also use `interior {ior FLOAT}` in the object when `fresnel` is used.
IRID:
  `irid { F_AMOUNT [IRID_ITEMS] }`
IRID_ITEMS:
  `[thickness FLOAT] & [turbulence FLOAT]`
SUBSURFACE:
  `subsurface { translucency COLOR }`

Quick Reference Contents

#### 3.8.10.7 Pattern

Specify a pattern function for a texture, pigment, normal or density:
MAP_PATTERN:
  Jump to SDL
  `AGATE | aoi | average | boxed | bozo | bumps | cells | CRACKLE | cubic | cylindrical | DENSITY_FILE | dents | FACETS | FRACTAL | function { FN_FLOAT } | gradient VECTOR | granite | IMAGE_PATTERN | leopard | marble | onion | pigment_pattern { PIGMENT_BODY } | planar | QUILTED | radial | ripples | SLOPE [SLOPE_EXTENSION] | spherical | spiral1 I_NUM_ARMS | spiral2 I_NUM_ARMS | spotted | waves | wood | wrinkles`
AGATE:
  `agate [agate_turb FLOAT]`
CRACKLE:
  `crackle [CRACKLE_TYPES]`
CRACKLE_TYPES:
  `[form VECTOR] & [metric FLOAT] & [offset FLOAT] & [solid]`
DENSITY_FILE:
  `density_file df3 FILE_NAME [interpolate DENSITY_INTERPOLATE]`
DENSITY_INTERPOLATE:
  `0 | 1 | 2`
FACETS:
  `facets FACETS_TYPE`
  Note, `facets` can only be used as a `normal` pattern.
FACETS_TYPE:
  `coords F_SCALE | size F_SIZE_FACTOR`
FRACTAL:
  `MANDELBROT_FRACTAL | JULIA_FRACTAL | MAGNET_MANDEL_FRACTAL | MAGNET_JULIA_FRACTAL`
MANDELBROT_FRACTAL:
  `mandel I_ITERATIONS [exponent INT] [exterior EXTERIOR_TYPE, F_FACTOR] [interior INTERIOR_TYPE, F_FACTOR]`
JULIA_FRACTAL:
  `julia V2_COMPLEX, I_ITERATIONS [exponent INT] [exterior EXTERIOR_TYPE, F_FACTOR] [interior INTERIOR_TYPE, F_FACTOR]`
MAGNET_MANDEL_FRACTAL:
  `magnet MAGNET_TYPE mandel I_ITERATIONS [exterior EXTERIOR_TYPE, F_FACTOR] [interior INTERIOR_TYPE, F_FACTOR]`
MAGNET_TYPE:
  `1 | 2`
MAGNET_JULIA_FRACTAL:
  `magnet MAGNET_TYPE julia V2_COMPLEX, I_ITERATIONS [exterior EXTERIOR_TYPE, F_FACTOR] [interior INTERIOR_TYPE, F_FACTOR]`
EXTERIOR_TYPE:
  `0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8`
INTERIOR_TYPE:
  `0 | 1 | 2 | 3 | 4 | 5 | 6`
IMAGE_PATTERN:
  `image_pattern {BITMAP_IMAGE [IMAGE_PATTERN_MODIFIERS] }`
IMAGE_PATTERN_MODIFIERS:
  `[BITMAP_MODIFIERS] & [use_alpha]`
QUILTED:
  `quilted [control0 FLOAT] [control1 FLOAT]`
SLOPE:
  `slope { V_DIRECTION [, F_LOW_SLOPE, F_HIGH_SLOPE ] [altitude VECTOR [, F_LOW_ALT, F_HIGH_ALT ]] }`
  The `slope` pattern does not work in media densities.
SLOPE_EXTENSION:
  `slope { point_at REFERENCE_POINT [, F_LOW_SLOPE, F_HIGH_SLOPE ] }`
  This variant currently does not allow for the `altitude` keyword to be used.

Quick Reference Contents

#### 3.8.10.8 Pattern Modifiers

Modify the evaluation of a pattern function:
PATTERN_MODIFIERS:
  Jump to SDL
  `[TURBULENCE] & [WARP...] & [TRANSFORMATION...] & [noise_generator NG_TYPE]`
NG_TYPE:
  `1 | 2 | 3`
TURBULENCE:
  `turbulence VECTOR & [octaves INT] & [omega FLOAT] & [lambda FLOAT]`
WARP:
  `warp { WARP_ITEM }`
WARP_ITEM:
  `REPEAT_WARP | BLACK_HOLE_WARP | TURBULENCE | CYLINDRICAL_WARP | SPHERICAL_WARP | TOROIDAL_WARP | PLANAR_WARP | cubic`
REPEAT_WARP:
  `repeat VECTOR [offset VECTOR] [flip VECTOR]`
BLACK_HOLE_WARP:
  `black_hole V_LOCATION, F_RADIUS [BLACK_HOLE_ITEMS]`
BLACK_HOLE_ITEMS:
  `[strength FLOAT] & [falloff FLOAT] & [inverse] & [repeat VECTOR [turbulence VECTOR]]`
CYLINDRICAL_WARP:
  `cylindrical [orientation VECTOR] [dist_exp FLOAT]`
SPHERICAL_WARP:
  `spherical [orientation VECTOR] [dist_exp FLOAT]`
TOROIDAL_WARP:
  `toroidal [orientation VECTOR] [dist_exp FLOAT] [major_radius FLOAT]`
PLANAR_WARP:
  `planar [V_NORMAL, F_DISTANCE]`

Modify the usage of a blend map:
BLEND_MAP_MODIFIERS:
  Jump to SDL
  [frequency FLOAT] & [phase FLOAT] & [WAVEFORM]
WAVEFORM:
  Jump to SDL
  `ramp_wave | triangle_wave | sine_wave | scallop_wave | cubic_wave | poly_wave [F_EXPONENT]`

Specify a two-dimensional bitmap image for a pattern:
BITMAP_IMAGE:
  `FUNCTION_IMAGE | BITMAP_TYPE FILE_NAME [gamma BITMAP_GAMMA] [premultiplied CAVEAT]`
FUNCTION_IMAGE:
  Jump to SDL
  `function I_WIDTH, I_HEIGHT { FUNCTION_IMAGE_BODY }`
FUNCTION_IMAGE_BODY:
  `PIGMENT | FN_FLOAT | pattern { PATTERN [PATTERN_MODIFIERS] }`
PATTERN:
  `MAP_PATTERN | brick [BRICK_ITEMS] | checker | hexagon | object { LIST_OBJECT }`
BITMAP_TYPE:
  Jump to SDL
  `exr | gif | hdr | iff | jpeg | pgm | png | ppm | sys | tga | tiff`
BITMAP_GAMMA:
  `FLOAT | srgb`
CAVEAT:
  Accepts a `BOOL` argument. This option does NOT apply when using `material_map`.

Modify how a 2-D bitmap is to be applied to a 3-D surface:
BITMAP_MODIFIERS:
  Jump to SDL
  `[once] & [map_type MAP_TYPE] & [interpolate INTERPOLATE_TYPE]`
MAP_TYPE:
  `0 | 1 | 2 | 5`
INTERPOLATE_TYPE:
  `2 | 3 | 4`

Quick Reference Contents

### 3.8.11 Media

Describe particulate matter
MEDIA:
  Jump to SDL
  `media { [MEDIA_IDENTIFIER] [MEDIA_ITEMS] }`
MEDIA_ITEMS:
  `[method METHOD_TYPE] & [intervals INT] & [samples I_MIN, I_MAX] & [confidence FLOAT] & [variance FLOAT] & [ratio FLOAT] & [absorption COLOR] & [emission COLOR] & [aa_threshold FLOAT] & [aa_level INT] & [SCATTERING] & [DENSITY...] & [TRANSFORMATION...] & [collect BOOL]`
METHOD_TYPE:
  `1 | 2 | 3`
SCATTERING:
  `scattering { SCATTERING_TYPE, COLOR [eccentricity FLOAT] [extinction FLOAT] }`
SCATTERING_TYPE:
  `1 | 2 | 3 | 4 | 5`
DENSITY:
  `density { DENSITY_BODY }`
DENSITY_BODY:
  `[DENSITY_IDENTIFIER] [DENSITY_TYPE] [PATTERN_MODIFIERS]`
DENSITY_TYPE:
  `COLOR | COLOR_LIST_PATTERN | DENSITY_LIST_PATTERN | MAP_PATTERN [COLOR_MAP] | MAP_PATTERN DENSITY_MAP`
DENSITY_LIST_PATTERN:
  `brick DENSITY, DENSITY [BRICK_ITEMS] |
  checker DENSITY, DENSITY |
  hexagon DENSITY, DENSITY, DENSITY |
  object { LIST_OBJECT DENSITY, DENSITY }`
DENSITY_MAP:
  `density_map { DENSITY_MAP_BODY } [BLEND_MAP_MODIFIERS]`
DENSITY_MAP_BODY:
  `DENSITY_MAP_IDENTIFIER | DENSITY_MAP_ENTRY...`
  There may be from 2 to 256 map entries.
DENSITY_MAP_ENTRY:
  `[ FLOAT DENSITY_BODY ]`
  The brackets here are part of the map entry.

Quick Reference Contents

### 3.8.12 Atmospheric Effects

Describe various background and atmospheric features
ATMOSPHERIC_EFFECT:
  `MEDIA | BACKGROUND | FOG | SKY_SPHERE | RAINBOW`

Quick Reference Contents

#### 3.8.12.1 Background

Specify a background color for the scene:
BACKGROUND:
  Jump to SDL
  `background { COLOR }`

Quick Reference Contents

#### 3.8.12.2 Fog

Simulate a hazy or foggy atmosphere:
FOG:
  Jump to SDL
  `CONSTANT_FOG | GROUND_FOG`
CONSTANT_FOG:
  `fog { [FOG_IDENTIFIER] [fog_type 1] FOG_ITEMS }`
FOG_ITEMS:
  `distance FLOAT & COLOR & [TURBULENCE]] [turb_depth FLOAT`
GROUND_FOG:
  `fog { [FOG_IDENTIFIER] fog_type 2 GROUND_FOG_ITEMS }`
GROUND_FOG_ITEMS:
  `FOG_ITEMS & fog_offset FLOAT & fog_alt FLOAT & [up VECTOR [TRANSFORMATION...]]`

Quick Reference Contents

#### 3.8.12.3 Sky Sphere

Specify a sky pigment:
SKY_SPHERE:
  Jump to SDL
  `sky_sphere { [SKY_SPHERE_IDENTIFIER] [SKY_SPHERE_ITEM...] }`
SKY_SPHERE_ITEM:
  `PIGMENT | TRANSFORMATION`

Quick Reference Contents

#### 3.8.12.4 Rainbow

Specify a rainbow arc:
RAINBOW:
  Jump to SDL
  `rainbow { [RAINBOW_IDENTIFIER] [RAINBOW_ITEMS] }`
RAINBOW_ITEMS:
  `direction VECTOR & angle FLOAT & width FLOAT & distance FLOAT & COLOR_MAP & [jitter FLOAT] & [up VECTOR] & [arc_angle FLOAT] & [falloff_angle FLOAT]`

Quick Reference Contents

### 3.8.13 Global Settings

Specify various settings that apply to the entire scene
GLOBAL_SETTINGS:
  Jump to SDL
  `global_settings { GLOBAL_SETTING_ITEMS }`
GLOBAL_SETTING_ITEMS:
  `[adc_bailout FLOAT] & [ambient_light COLOR] & [assumed_gamma GAMMA_VALUE] & [hf_gray_16 [BOOL]] & [irid_wavelength COLOR] & [charset GLOBAL_CHARSET] & [max_intersections INT] & [max_trace_level INT] & [mm_per_unit INT] & [number_of_waves INT] & [noise_generator NG_TYPE] & [RADIOSITY] & [PHOTONS] & [SUBSURFACE]`
GAMMA_VALUE:
  `FLOAT | srgb`
GLOBAL_CHARSET:
  `ascii | utf8 | sys`
NG_TYPE:
  `1 | 2 | 3`

Quick Reference Contents

#### 3.8.13.1 Radiosity

Enable radiosity to compute diffuse inter-reflection of light:
RADIOSITY:
  Jump to SDL
  `radiosity { [RADIOSITY_ITEMS] }`
RADIOSITY_ITEMS:
  `[adc_bailout FLOAT] & [always_sample BOOL] & [brightness FLOAT] & [count INT[,INT]] & [error_bound FLOAT] & [gray_threshold FLOAT] & [low_error_factor FLOAT] & [max_sample FLOAT] & [maximum_reuse FLOAT] & [media BOOL] & [minimum_reuse FLOAT] & [nearest_count INT[,INT]] & [normal BOOL] & [pretrace_end FLOAT] & [pretrace_start FLOAT] & [recursion_limit INT] & [subsurface BOOL]`

Quick Reference Contents

#### 3.8.13.2 Photons

Enable photon mapping to render reflective and refractive caustics:
PHOTONS:
  Jump to SDL
  `photons { PHOTON_QUANTITY [PHOTON_ITEMS] }`
PHOTON_QUANTITY:
  `spacing FLOAT | count INT`
PHOTON_ITEMS:
  `[gather I_MIN, I_MAX] & [media I_MAX_STEPS [, F_FACTOR]] & [jitter FLOAT] & [max_trace_level INT] & [adc_bailout FLOAT] & [save_file FILE_NAME] & [load_file FILE_NAME] & [autostop FLOAT] & [expand_thresholds F_INCREASE, F_MIN] & [radius [FLOAT, FLOAT, FLOAT, FLOAT]]`

Quick Reference Contents

#### 3.8.13.3 Subsurface

Enable and configure subsurface scattering:
SUBSURFACE:
  Jump to SDL
  `subsurface { [SUBSURFACE_ITEMS] }`
SUBSURFACE_ITEMS:
  `[radiosity BOOL] & [samples INT, INT]`

Quick Reference Contents