A surface is the set of material settings for the polygons tagged with its name in a
PTAG of type SURF.
SURF – Surface
SURF { name[S0], source[S0], attributes[SUB-CHUNK] * }
The name identifies the surface and matches a string in TAGS. When
source is not empty, this surface is built on the named surface: it
can override its settings and add texture layers to it. The sub-chunks are of two
kinds: the basic parameters below, and surface
blocks for texture layers and shaders. The basic parameters are the surface’s
starting values before texturing, and are used for previews even when textures cover
them. Most end in an envelope[VX], the index of an
envelope that animates the
value.
Basic parameters
| Sub-chunk | Layout | Meaning | Default |
|---|---|---|---|
COLR | base-color[COL12], envelope[VX] | Base colour, under all texturing | |
DIFF | intensity[FP4], envelope[VX] | Diffuse level | 1.0 |
LUMI | intensity[FP4], envelope[VX] | Luminosity | 0 |
SPEC | intensity[FP4], envelope[VX] | Specular level | 0 |
REFL | intensity[FP4], envelope[VX] | Reflectivity | 0 |
TRAN | intensity[FP4], envelope[VX] | Transparency | 0 |
TRNL | intensity[FP4], envelope[VX] | Translucency | 0 |
GLOS | glossiness[FP4], envelope[VX] | Glossiness g, giving a specular exponent of 210g + 2; used only when SPEC is not 0 | 0.4 |
SHRP | sharpness[FP4], envelope[VX] | Diffuse sharpness, for non-Lambertian shading; 0.5 matches the old “sharp terminator” | |
BUMP | strength[FP4], envelope[VX] | Bump strength | 1.0 |
SIDE | sidedness[U2] | 1 front only, 3 front and back | 1 |
SMAN | max-smoothing-angle[ANG4] | Largest angle between neighbouring polygons that is smoothed; 0 or less, or missing, means no smoothing | None |
RFOP | reflection-options[U2] | How reflections work; see below | 0 |
RIMG | image[VX] | The clip wrapped around the scene as a reflection map, or 0 for none | |
RSAN | seam-angle[ANG4], envelope[VX] | Heading of the reflection map’s seam | 0 |
RBLR | blur-percentage[FP4], envelope[VX] | Reflection blurring | 0 |
RIND | refractive-index[F4], envelope[VX] | Index of refraction, for ray-traced refraction | 1.0 |
TROP | transparency-options[U2] | As RFOP, for refraction | 0 |
TIMG | image[VX] | As RIMG, for refraction | |
TBLR | blur-percentage[FP4], envelope[VX] | Refraction blurring | 0 |
CLRH | color-highlights[FP4], envelope[VX] | How much of the surface colour tints specular highlights instead of the light’s colour | |
CLRF | color-filter[FP4], envelope[VX] | How much light passing through the surface takes its colour | |
ADTR | additive[FP4], envelope[VX] | Additive transparency: the surface colour is added to what is behind it | |
GLOW | type[U2], intensity[F4], intensity-envelope[VX], size[F4], size-envelope[VX] | Glow effect: type 0 Hastings glow, 1 image convolution. Some files have a GVAL sub-chunk of 6 bytes instead, holding only the intensity and its envelope | |
LINE | flags[U2], ( size[F4], size-envelope[VX], ( color[COL12], color-envelope[VX] )? )? | Render outlines: bit 0 of flags enables them; size in pixels; colour defaults to the base colour. Shorter forms of 2 or 8 bytes occur | |
ALPH | mode[U2], value[FP4] | Alpha channel output; see below | 2 |
VCOL | intensity[FP4], envelope[VX], vmap-type[ID4], name[S0] | An RGB or RGBA vertex map that colours the surface |
Glossiness 0.2 gives an exponent of 16, the old “low” setting; 0.4 gives 64, “medium”; 0.6 gives 256, “high”; and 0.8 gives 1024, “maximum”. The description gives no defaults for the parameters left blank above.
RFOP, TROP and ALPH codes
| RFOP and TROP | Meaning |
|---|---|
| 0 | Backdrop only: only the backdrop is reflected (or refracted) |
| 1 | Ray tracing and backdrop: objects are ray traced when ray tracing is on; rays that hit nothing take the backdrop colour |
| 2 | Spherical map: the RIMG (or TIMG) image, wrapped round the scene |
| 3 | Ray tracing and spherical map: rays that hit nothing take their colour from the image |
| ALPH mode | Alpha channel |
|---|---|
| 0 | Not affected by the surface |
| 1 | The constant value that follows the mode |
| 2 | The surface’s opacity (the default) |
| 3 | The shadow density |