3.4. Surfaces

A surface is a non-geometric attribute that each object must have so that it can be rendered. When a surface is defined in a certain scope, it is considered the current surface and many objects may share it without having to name it explicitly. There is even a default surface (surface white mono 0.9 mono 0.1 3 0). A surface may have its special attributes, which must appear immediately after the surface keyword, like:

emitter - the objects using this surface behave like emitters, ie, they have a constant shading, independent of the light sources.

noshadow - the objects using this surface do not have any shadows.

To specify surfaces, there are the following commands:

surface color [diffusion specularity phong metalness [transparency]] - phong and metalness are reals, the others are colors. Defaults 0.9 0.9 0.9, 0.1 0.1 0.1, 3, 0 and 0.1 0.1 0.1; if only transparency is omitted, then its default is 0 0 0.

surface strauss color smoothness metalness [transparency] - all are colors; default transparency is 0 0 0. This is an alternative to the previous command that uses a more intuitive way of specifying attributes.

surface matte color - 100% diffuse surface.
surface plastic color smoothness phong - plastic surface (high diffusion, small specularity and phong factor).

surface metal color smoothness phong - metallic surface (small diffusion, high specularity and phong factor, maximum metalness).

surface dielectric color transparency refraction - non-opaque surface (no diffusion, small specularity, large phong factor and nometalness). Needs a refraction index.

surface glass color transparency - transparent surface with refraction index near 1.52 and similar to dielectric.

refraction real - this specifies the current refraction index.

Examples:

	surface blue mono 0.7 mono 0.3 15 0.7   ; matte
	surface strauss brown mono 0.9 mono 0.1 ; matte
	surface matte red                       ; 100% matte
	surface plastic beige mono 0.8 0.5      ; plastic
	surface metal white mono 0.9 0.9        ; metallic
	surface dielectric white mono 0.8 1.2   ; translucent
	surface glass white mono 0.95           ; white glass


To Table of Contents
To 3. Syntax
Back To 3.3. Lights
Forward To 3.5. Objects