aspose.info
EN

3D2 - CAD-3D 2.0 File Format

Updated

What is a 3D2 file?

A file with .3D2 extension is a CAD-3D 2.0 file that stores multiple 3D objects and information about these objects. The lightning and colour palettes information used by the 3D objects are all stored in this file. A single file can hold up to 40 objects. 3D2 had been used as an early format for computer animations. 3DS files can be opened with Quick3D application software.

3D2 File Format

The 3D2 file format is similar to the older file format and comprises of two parts.

  1. A 256-byte header which contains information about the number of objects contained in the file, the light settings and the colour information.
  2. A repeating structure of data that defines the 3D objects in the file.

3D2 file format resembles to the older file format, but differs in that it doesn’t rely on the Fast Floating Point library (LIBF) of Motorola. It considerably reduces the storage requirements by storing each coordinate in a two-byte word instead of a four-byte floating point value.

3D2 Header

FieldTypeValue
File IDWORD$3D02
Count of Objects in fileWORD1-40
Light source A on/off indicatorWORD(0=off, 1=on)
Light source B on/off indicatorWORD(0=off, 1=on)
Light source C on/off indicatorWORD(0=off, 1=on)
Light source A brightnessWORD(0-7)
Light source B brightnessWORD(0-7)
Light source C brightnessWORD(0-7)
Ambient light brightnessWORD(0-7)
Light source A Z positionWORD(-50 through +50)
Light source B Z positionWORD(-50 through +50)
Light source C Z positionWORD(-50 through +50)
Light source A Y positionWORD(-50 through +50)
Light source B Y positionWORD(-50 through +50)
Light source C Y positionWORD(-50 through +50)
Light source A X positionWORD(-50 through +50)
Light source B X positionWORD(-50 through +50)
Light source C X positionWORD(-50 through +50)
Object color palette16 WORDs(BIOS format)
Color group base array16 WORDs

Color Group Base Array

The palette in the 3D2 file must be accompanied by the colour group base array which indicates the index of the first colour in the group to which that colour belongs. The following is an example palette that contains a background colour of black, followed by five reds, five greens and five blues.

INDEXCOLORBASE
00000
11001
22001
33001
44001
55001
60106
70206
80306
90406
100506
1100111
1200211
1300311
1400411
1500511

References

See also