Material commands set how the faces and primitives after them look. A script keeps a
current material, made of the settings below, and each face takes a copy of it when its
command is read: a Color after a Quad does not change that
quad. The sample files set the whole material before their faces, in this order, which
HUMAN.RWX repeats at the start of every prototype:
Surface 0.4 0.4 0.6
Color 1.0 0.0 1.0
LightSampling Facet
GeometrySampling Solid
Texture NULL
HUMAN.RWX.Colour and surface
| Command | Arguments | Meaning |
|---|---|---|
Color | red green blue | The colour of the faces after it, each from 0 to 1. The glyph files use Color 1.0 0.0 0.0; BANANA.RWX sets 0.996094 0.996094 0 (yellow) before its faces. The viewer draws faces in this colour, lit from above and the left, and reports a value outside 0 to 1. The sample files never leave it unset where it matters; with no Color the viewer uses a mid grey, which is its own choice. |
Surface | ambient diffuse specular | Three coefficients of how the surface takes light: 0.4 0.6 0.6 in the glyphs, 0.5 0.5 0.1 for the banana, 0.1 0.6 0.3 in TRIAD.RWX. The viewer does not use them: it lights every face the same way. |
Ambient, Diffuse, Specular | one or more numbers | Active Worlds’ separate forms of the three coefficients, as far as the author remembers. No sample file has them; the viewer keeps the numbers and does not draw with them. |
Opacity | a number from 0 to 1 | How solid the faces are, 1 being opaque. The viewer mixes the colour with the background in that proportion; it does not see through to what lies behind. No sample file uses it. |
Textures
Texture name names a bitmap to put on the faces after it, and
Texture NULL clears it. Every sample file that uses the command writes
Texture NULL, so there are no faces with a texture on this Mac. RenderWare’s
demonstration viewer reads a texture as a file of the same name; its readme speaks of
“a texture file (or any MS Windows 3.1 bitmap (.bmp) file)”. A second form adds a mask:
Texture wall Mask wallmask, from memory of Active Worlds, where the mask
marks the transparent part of a picture. The viewer names the textures in the
overview and the number of faces that use each, and does not draw them: a textured face
is drawn in its Color. Texture coordinates come from the UV of
the Vertex commands; see
Vertices and faces.
TextureModes, MaterialModes and
TextureAddressMode take words that are not in any sample file.
From memory: texture modes such as Lit, Foreshorten and
Filter, material modes such as None, Null and
Double (double-sided faces), and address modes Wrap,
Mirror and Clamp. The viewer keeps the words and ignores them.
Sampling
| Command | Words | Meaning |
|---|---|---|
LightSampling | Facet, Vertex | Whether the lighting is worked out once for each face (flat shading) or at each vertex and blended across it (smooth shading). Both occur in the sample files; the glyphs use Vertex, the banana changes from Facet to Vertex halfway. The viewer shades every face flat. |
GeometrySampling | Pointcloud, Wireframe, Solid | Whether the faces after it are drawn as their points, their edges or filled. The sample files only have Solid. The viewer draws every face filled and has its own wireframe picture. |
Scope
MaterialBegin saves the current material and
MaterialEnd sets it back, so a part can be given a colour
without the next part having it. TRIAD.RWX opens one for the ball at the origin and one for each axis, sets
Color inside and draws the arrow and the letter in it. Only the material
is saved: the transform is not.
A ClumpBegin saves the material too, and a clump’s changes end at its
ClumpEnd; that is how this viewer does it, and the files do not
show otherwise, as HUMAN.RWX gives each part its own Color
inside its clump.
A prototype instanced with ProtoInstance is drawn with the material its
own commands set, starting from the default, which may be why each prototype of
HUMAN.RWX opens with a full material block. With
ProtoInstanceGeometry the commands in the prototype that set a material
are ignored, and its faces take the material in force at the instance. The text of
both is how this viewer reads the two command names and the files that use them; it
is not checked against RenderWare.
Not described
Only Color, Surface, LightSampling, GeometrySampling and Texture NULL appear in the sample files.
- Reference: Ambient, Diffuse, Specular, Opacity, Texture with a name or Mask, TextureModes, MaterialModes and TextureAddressMode are from memory and unverified.
- Reference: the default material, what Surface’s three numbers do, and the exact scope rules for clumps and prototype instances are not known.
- Viewer: does not draw textures (a face keeps its Color), ignores Surface, treats every face as flat-shaded, filled and double-sided, and only blends Opacity toward the background.
- Viewer: with no Color it uses a mid grey of its own choosing.