Game Development Reference
In-Depth Information
This VMAP chunk is used by a SURF chunk which is defined as using
UV mapping. In the following example you can see the differences
between an LWO1 object and an LWO2 object. A SURF chunk still has
multiple sub-chunks, but these have changed subtly. First, we have a
name, followed by the name of the parent of the surface. COLR defines
the rgb colour of a surface; these values have changed for 1-byte integers
to floating-point values. DIFF gives the diffuse level and SPEC the
specularity. If a texture map is applied then it is defined in a BLOK
chunk.
The first field of the BLOK header (the IMAP sub-chunk) is called an
ordinal string . When multiple textures are applied to a surface channel,
the ordinal string determines the order in which they're evaluated. Object
readers can sort BLOKs by using 'strcmp' to compare the ordinal
strings.
The rest of the BLOK header identifies which surface channel the
texture layer modifies, the layer's opacity, whether it is enabled, whether
its output is inverted, and what the default axis is. The sub-chunks
following the TMAP are specific to IMAP layers. The AXIS sub-chunk
overrides the default in the IMAP header. The IMAG sub-chunk contains
a CLIP index that identifies the image. CLIP chunks work rather like TAGS
chunks in that they define an indexed list of string values. They are
formatted as follows:
CLIP 30
1
STIL 20
“Images/testbars.iff”
A full description of the UV SURF chunk follows:
SURF 348
“UVExample”
“”
COLR 14
0.78431 0.78431 0.78431 0
DIFF 6
1.0 0
SPEC 6
0.0 0
BLOK 286
IMAP 50
“\x80”
CHAN 4 COLR
OPAC 8 0 1.0 0
ENAB 21
Search Nedrilad ::




Custom Search