Introduction
AC is the model format of AC3D, a small 3D modeller from Inivis. It is plain text and holds a palette of materials followed by a tree of objects: vertices, polygons or lines with texture coordinates, a texture file name and a position for each object.
Because it is easy to read and write, it became the usual aircraft and scenery model
format of the FlightGear flight simulator, and
loaders for it exist in libraries such as OpenSceneGraph and Assimp. A related
.acc dialect used by the racing simulators TORCS and Speed Dreams extends
it.
Structure
The first line is AC3D followed by one hexadecimal digit, the format
version: AC3Db (11) is the long-standing form and AC3Dc (12)
writes materials as multi-line blocks. Materials come next and are numbered from 0 in
file order. Then comes an object, usually of type world, whose last line
kids n says how many child objects follow, each of which may
have children of its own.
AC3Db
MATERIAL "" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0
OBJECT world
kids 1
OBJECT poly
name "rect"
loc 1 0.5 0
numvert 4
-1 0.5 0
1 0.5 0
1 -0.5 0
-1 -0.5 0
numsurf 1
SURF 0x20
mat 0
refs 4
3 0 0
2 1 0
1 1 1
0 0 1
kids 0
In this reference
- Tokens and sections – the header, both material forms, every object line, surface flags, texture coordinates, transforms and where readers differ
In the explorer
A dropped AC file of up to 256 MB is read line by line. The tree and the tables list
every material, object, vertex, surface and corner, with the data strings, and name the
texture files. The 3D view draws every polygon and line, placed by rot and
loc, in the materials’ colours and transparency, smoothed according to the
surface flags and crease. Clicking a surface leads to its lines.
Not described
These pages follow the AC3D file format description, the later community-compiled guide and the loaders in OpenSceneGraph and Assimp.
Known, not yet covered
- Viewer:
subdivis shown but not applied: the 3D view draws the mesh as stored. - Viewer: texture images supplied with a model are not drawn on it; their names,
texrepandtexoffare shown. - Reference: the
.accdialect of TORCS and Speed Dreams is a separate extension; only its triangle-strip surface type is noted with the surface flags.
Links
Software
- AC3D – the modeller the format comes from (Windows, macOS, Linux)
- FlightGear – open source flight simulator that loads AC models (Windows, macOS, Linux)
- OpenSceneGraph – graphics toolkit whose viewer opens AC files (Windows, macOS, Linux)
Developers
- Assimp – model import library with an AC loader (C++)
- OpenSceneGraph AC plugin – reader and writer (C++)
Reference
- The AC3D file format – Inivis’s description, last updated March 2003
- Inivis AC3D format specification, unofficial guide – Nikolai V. Chr.’s expansion of the official text, March 2017, with the AC3Dc material block and later tokens
- OpenSceneGraph ac3d.cpp – loader source, based partly on code from the AC3D project
- Assimp ACLoader.cpp – loader source