Introduction
LWO2 is the object format of LightWave 3D from version 6.0, which replaced the older LWOB. NewTek documented it in its software development kit; the description is dated 9 November 2001, and later copies add a few chunks from newer releases of LightWave.
Besides points, polygons and surfaces, an LWO2 file can hold several layers, vertex maps for texture coordinates, weights, colours and morphs, subdivision patches, skeleton bones, animated parameters (envelopes), references to images (clips), and surfaces built from stacked texture layers and shader plug-ins.
Structure
An LWO2 file is an IFF file: one big-endian FORM chunk with the form
type LWO2, holding further chunks, each a four-letter ID, a 4-byte length
and the data. Chunks may come in any order, except that a chunk refers to the most
recent chunk of the kind it depends on: POLS to the latest
PNTS, PTAG to the latest POLS and
TAGS. A LAYR chunk starts each layer.
0FORM chunk ID, length, form typeLWO212 bytes12TAGS surface, part and smoothing group namesvaries…LAYR, PNTS, BBOX, VMAP, POLS, PTAG, VMAD for each layervaries…ENVL, CLIP and SURF envelopes, images and surfacesvaries
In this reference
- Data types and chunks – the data types and every top-level chunk: layers, points, vertex maps, polygons and their types, tags, bounding box, description and icon
- Envelopes and clips – the ENVL and CLIP chunks and all their sub-chunks
- Surface parameters – the SURF chunk and its basic sub-chunks
- Surface blocks – texture layers and shaders: block headers, ordinal strings, texture mapping, image maps, procedurals and gradients
Not described
What the LWO2 reference and the viewer here leave out.
Known, not yet covered
- Reference: the polygon type
SUBD, theNORMvertex map and surface sub-chunk (Modo), and the node IDsNNDS,NTAG,NRNM,NDTA,ENUM,IBGCand the rest of Assimp’s nodal list, all defined in Assimp’s LWO loader (Surface parameters). - Reference: the parameters of envelope spans and the
LWCOLORSPACEcodes, which the description leaves to LightWave’s SDK (Envelopes and clips). - Viewer: applying textures, gradients, shaders and envelopes, which the description and Assimp’s material code define; they are decoded and listed, images are never loaded, and base colours stand in.
- Viewer: using weight, morph and metaball maps, and subdividing patches; the maps are listed and patches and cages are shown as control polygons.
Unknown
- Reference: what
VERS,NVSKand the contents ofNCONandNDTAmean; the layouts come from real files and the viewer shows labelled fields or bytes. - Reference: the data plug-ins keep in
CHAN,FUNC,IFLTandPFLT, which belongs to the plug-ins; the viewer shows it as bytes. - Reference: how
PTCHpatches are subdivided; the description says the method is not documented. - Reference: no LWO2 file written by LightWave itself has been checked, only Assimp’s 36 test files.
Variants
- LightWave object (LWOB) – the original form, written by LightWave 5 and earlier
- LightWave object (LWO2) – the form from LightWave 6 on, with layers, vertex maps and surface blocks
- LightWave object (LWO3) – the form from LightWave 2015 on, read by the LWO2 rules
Links
Software
- LightWave 3D – the modelling and animation package that writes LWO2 (Windows, macOS)
Developers
- Assimp – library that imports dozens of 3D formats, LWOB, LWO2 and LWO3 among them (C++, BSD licence). Its LWO importer and its 36 LWO2 test files were used to check this reference
Reference
- Object Files (LWO2) – a copy of NewTek’s LWO2 description from the LightWave SDK, shared on The Dark Mod forums