Introduction
ASE (ASCII Scene Export) is the text export of Autodesk 3ds Max: a readable dump of a scene with its materials, meshes, node transforms, shapes, cameras, lights, helpers and animation. Game tools adopted it as an interchange format, among them the Unreal and id Tech toolchains. The export dialogue lets the user leave out mesh definitions, materials, animation, normals, mapping coordinates, vertex colours or whole object types, and set the number of decimals, so two files can differ greatly in content.
Autodesk publishes no description of the file itself. This page is drawn from files written by the 3ds Max exporter and from the source of programs that read and write the format.
Syntax
A file is text. Each statement is a keyword that starts with an asterisk, followed by values separated by
spaces or tabs. A block is a keyword (sometimes with an index) followed by {, nested statements
and }. Strings are in double quotes. A few enumerated values are bare words
(Blinn, Target). Files are usually 8-bit text with CR LF line ends; some readers
also accept UTF-16 with a byte order mark.
*3DSMAX_ASCIIEXPORT 200
*COMMENT "AsciiExport Version 2,00 - Sat Nov 08 16:24:29 2008"
*SCENE {
*SCENE_FILENAME "TargetCameraAnim.max"
*SCENE_FIRSTFRAME 0
…
}
*MATERIAL_LIST {
…
}
*GEOMOBJECT {
…
}
The first line is *3DSMAX_ASCIIEXPORT and a version number, 200 in current exports. Older files
with a lower number, and the related .ask and .asc skin files, differ in places
(see animation and skin weights).
Top-level statements
| Keyword | Contents |
|---|---|
*3DSMAX_ASCIIEXPORT | Format version. |
*COMMENT | A string, normally the exporter version and date. |
*SCENE | Scene settings. |
*MATERIAL_LIST | All materials. |
*GEOMOBJECT | A mesh object. |
*SHAPEOBJECT | A spline shape. |
*CAMERAOBJECT | A camera. |
*LIGHTOBJECT | A light. |
*HELPEROBJECT | A helper such as a dummy. |
*GROUP | A group: a block holding the objects that belong to it. |
*MESH_SOFTSKINVERTS | Skin weights in the older layout. |
Scene block
| Keyword | Values | Meaning |
|---|---|---|
*SCENE_FILENAME | string | Name of the source .max file. |
*SCENE_FIRSTFRAME | integer | First frame of the animation range. |
*SCENE_LASTFRAME | integer | Last frame. |
*SCENE_FRAMESPEED | integer | Frames per second. |
*SCENE_TICKSPERFRAME | integer | Time ticks in one frame, usually 160. |
*SCENE_BACKGROUND_STATIC | r g b | Background colour, 0 to 1. |
*SCENE_AMBIENT_STATIC | r g b | Ambient light colour, 0 to 1. |
Times elsewhere in the file are in ticks. At 30 frames per second and 160 ticks per frame, one second is 4800 ticks.
Materials
*MATERIAL_LIST holds *MATERIAL_COUNT n (written even when it is 0) and then one
*MATERIAL index { … } block for each material, numbered from 0. Objects refer to them with
*MATERIAL_REF index.
| Keyword | Values | Meaning |
|---|---|---|
*MATERIAL_NAME | string | Material name. |
*MATERIAL_CLASS | string | 3ds Max material type, e.g. "Standard". |
*MATERIAL_AMBIENT | r g b | Ambient colour. |
*MATERIAL_DIFFUSE | r g b | Diffuse colour. |
*MATERIAL_SPECULAR | r g b | Specular colour. |
*MATERIAL_SHINE | number | Shininess, 0 to 1. |
*MATERIAL_SHINESTRENGTH | number | Strength of the highlight. |
*MATERIAL_TRANSPARENCY | number | 0 is opaque; opacity is 1 minus this value. |
*MATERIAL_WIRESIZE | number | Line width for wire rendering. |
*MATERIAL_SHADING | word | Shading model, e.g. Blinn, Phong, Flat, Wire. |
*MATERIAL_XP_FALLOFF | number | Extra opacity falloff. |
*MATERIAL_SELFILLUM | number | Self-illumination amount. |
*MATERIAL_FALLOFF | word | Opacity falloff direction, e.g. In. |
*MATERIAL_XP_TYPE | word | Transparency type, e.g. Filter. |
*MATERIAL_TWOSIDED | none | Present when the material is two-sided. |
*NUMSUBMTLS | integer | Number of sub-materials of a multi-material. |
*SUBMATERIAL | index, block | A sub-material, with the same contents as a material. |
Texture maps
A material can hold map blocks: *MAP_AMBIENT, *MAP_DIFFUSE,
*MAP_SPECULAR, *MAP_SHINESTRENGTH, *MAP_SELFILLUM,
*MAP_OPACITY and *MAP_BUMP.
| Keyword | Values | Meaning |
|---|---|---|
*MAP_NAME | string | Name of the map. |
*MAP_CLASS | string | Map type; "Bitmap" for an image file. |
*MAP_SUBNO | integer | Slot number of the map in the material (1 for diffuse in exports). |
*MAP_AMOUNT | number | Strength of the map, 0 to 1. |
*BITMAP | string | Path of the image file, often absolute on the author’s machine. |
*MAP_TYPE | word | Mapping type, e.g. Screen. |
*UVW_U_OFFSET, *UVW_V_OFFSET | number | Texture offset. |
*UVW_U_TILING, *UVW_V_TILING | number | Repeat count. |
*UVW_ANGLE | number | Rotation of the texture. |
*UVW_BLUR, *UVW_BLUR_OFFSET | number | Blur and blur offset. |
*UVW_NOUSE_AMT | number | Noise amount (spelt this way in files). |
*UVW_NOISE_SIZE, *UVW_NOISE_LEVEL, *UVW_NOISE_PHASE | number | Noise size, level and phase. |
*BITMAP_FILTER | word | Filtering, e.g. Pyramidal. |
Objects and transforms
Every object block starts with its name and, for a child, the name of its parent:
| Keyword | Meaning |
|---|---|
*NODE_NAME "name" | Name of the node. Names tie the parts of the file together. |
*NODE_PARENT "name" | Parent node. Absent for a root node. |
*NODE_TM { } | The node transform. A target camera or light has a second one, whose name is the object’s name followed by .Target. |
*TM_ANIMATION { } | Transform animation. |
*MATERIAL_REF n | Index into the material list. |
*WIREFRAME_COLOR r g b | Viewport colour, written for an object without a material. |
*PROP_MOTIONBLUR, *PROP_CASTSHADOW, *PROP_RECVSHADOW | Render flags, 0 or 1. |
NODE_TM
| Keyword | Values | Meaning |
|---|---|---|
*NODE_NAME | string | Node the transform belongs to. |
*INHERIT_POS, *INHERIT_ROT, *INHERIT_SCL | 3 integers | Inheritance flags for the x, y and z axes of position, rotation and scale. |
*TM_ROW0 | x y z | Image of the local X axis. |
*TM_ROW1 | x y z | Image of the local Y axis. |
*TM_ROW2 | x y z | Image of the local Z axis. |
*TM_ROW3 | x y z | Position of the node. |
*TM_POS | x y z | Position again, as a decomposed value. |
*TM_ROTAXIS, *TM_ROTANGLE | x y z, angle | Rotation as an axis and an angle in radians. |
*TM_SCALE | x y z | Scale factors. |
*TM_SCALEAXIS, *TM_SCALEAXISANG | x y z, angle | Orientation of the axes along which the scale acts. |
The four rows are a 4×3 matrix in the row-vector form of 3ds Max, with the translation in the last row. The coordinate system is right-handed with Z up.
Meshes
A *GEOMOBJECT holds a *MESH block. Vertex positions are in world coordinates, that
is, with the node transform already applied: a reader that wants local coordinates multiplies by the inverse
of the matrix.
| Keyword | Contents |
|---|---|
*TIMEVALUE t | Time of this mesh, in ticks. |
*MESH_NUMVERTEX n | Number of vertices. |
*MESH_NUMFACES n | Number of triangles. |
*MESH_VERTEX_LIST { } | Lines *MESH_VERTEX i x y z. |
*MESH_FACE_LIST { } | Face lines. |
*MESH_NUMTVERTEX n | Number of texture vertices; 0 when there are none. |
*MESH_TVERTLIST { } | Lines *MESH_TVERT i u v w. |
*MESH_NUMTVFACES n | Number of texture faces; equals the face count. |
*MESH_TFACELIST { } | Lines *MESH_TFACE face a b c, indices into the texture vertices, in the corner order of the face. |
*MESH_NUMCVERTEX n | Number of colour vertices; 0 when there are none. |
*MESH_CVERTLIST { } | Lines *MESH_VERTCOL i r g b, 0 to 1. |
*MESH_NUMCVFACES n | Number of colour faces. |
*MESH_CFACELIST { } | Lines *MESH_CFACE face a b c, indices into the colour vertices. |
*MESH_MAPPINGCHANNEL n { } | A further UV channel, n from 2: its own *MESH_NUMTVERTEX, *MESH_TVERTLIST, *MESH_NUMTVFACES and *MESH_TFACELIST. |
*MESH_NORMALS { } | Normals. |
*MESH_WEIGHTS { } | Skin weights. |
Face lines
*MESH_FACE 0: A: 0 B: 2 C: 3 AB: 1 BC: 1 CA: 0 *MESH_SMOOTHING 2 *MESH_MTLID 1
- The face number, followed by a colon.
A:,B:,C:are the three vertex indices, from 0.AB:,BC:,CA:are 0 or 1 for the three edges; they are understood to be the edge visibility flags.*MESH_SMOOTHINGlists the face’s smoothing groups, numbers from 0 to 31 separated by commas. The list may be empty.*MESH_MTLIDis the material ID of the face, which selects a sub-material of a multi-material.
Normals
*MESH_NORMALS is not an indexed list. For each face, in order, it has
*MESH_FACENORMAL face x y z followed by three *MESH_VERTEXNORMAL vertex x y z lines,
where vertex is one of the indices of that face. The same vertex can have different normals on
different faces.
Animated meshes
With “Animated Mesh” on, a *GEOMOBJECT also holds *MESH_ANIMATION { }, a series of
whole *MESH blocks, each with its own *TIMEVALUE.
Shapes
A *SHAPEOBJECT has a name and node transform like a mesh object, then:
*SHAPE_LINECOUNT 1
*SHAPE_LINE 0 {
*SHAPE_VERTEXCOUNT 3
*SHAPE_VERTEX_KNOT 0 -20.1490 53.7415 0.0000
*SHAPE_VERTEX_KNOT 1 28.4945 27.9187 0.0000
*SHAPE_VERTEX_KNOT 2 58.9210 -19.8598 0.0000
}
Cameras
| Keyword | Meaning |
|---|---|
*CAMERA_TYPE word | Target for a target camera; otherwise a free camera. |
*CAMERA_SETTINGS { } | *TIMEVALUE, *CAMERA_NEAR, *CAMERA_FAR, *CAMERA_FOV (radians) and *CAMERA_TDIST (distance to the target). |
Lights
| Keyword | Meaning |
|---|---|
*LIGHT_TYPE word | Kind of light, e.g. Omni, Target, Free, Directional. |
*LIGHT_SHADOWS word | Shadow method, e.g. Off. |
*LIGHT_USELIGHT n | Light on or off. |
*LIGHT_SPOTSHAPE word | Shape of a spot cone, e.g. Circle. |
*LIGHT_USEGLOBAL, *LIGHT_ABSMAPBIAS, *LIGHT_OVERSHOOT | Flags: global shadow settings, absolute map bias, overshoot. |
*LIGHT_SETTINGS { } | *TIMEVALUE, *LIGHT_COLOR r g b, *LIGHT_INTENS, *LIGHT_ASPECT, *LIGHT_HOTSPOT and *LIGHT_FALLOFF (degrees), *LIGHT_TDIST, *LIGHT_MAPBIAS, *LIGHT_MAPRANGE, *LIGHT_MAPSIZE, *LIGHT_RAYBIAS. |
Helpers
A *HELPEROBJECT has a name, optional parent and transform, plus
*HELPER_CLASS "Dummy" (the 3ds Max class name) and the corners of its box,
*BOUNDINGBOX_MIN x y z and *BOUNDINGBOX_MAX x y z.
Transform animation
*TM_ANIMATION starts with *NODE_NAME (again .Target for a target) and
holds one track for each of position, rotation and scale that is animated. The track keyword depends on the
controller and on whether the exporter wrote keys or samples.
| Track | Key line | Values |
|---|---|---|
*CONTROL_POS_TRACK | *CONTROL_POS_SAMPLE | time, x y z |
*CONTROL_ROT_TRACK | *CONTROL_ROT_SAMPLE | time, axis x y z, angle in radians |
*CONTROL_SCALE_TRACK | *CONTROL_SCALE_SAMPLE | time, x y z, then the scale axis and angle |
*CONTROL_POS_BEZIER, *CONTROL_ROT_BEZIER, *CONTROL_SCALE_BEZIER | *CONTROL_BEZIER_POS_KEY, *CONTROL_BEZIER_ROT_KEY, *CONTROL_BEZIER_SCALE_KEY | time and value first, then Bézier data |
*CONTROL_POS_TCB, *CONTROL_ROT_TCB, *CONTROL_SCALE_TCB | *CONTROL_TCB_POS_KEY, *CONTROL_TCB_ROT_KEY, *CONTROL_TCB_SCALE_KEY | time and value first, then tension, continuity and bias data |
In a version 200 file the rotation keys are incremental: the first key is the orientation and each later one is a turn relative to the key before it, so a reader multiplies them together in order. Assimp treats files of version 110 and lower as holding absolute rotations.
Skin weights
Version 200 files with skin data hold a *MESH_WEIGHTS block inside *MESH:
| Keyword | Contents |
|---|---|
*MESH_NUMVERTEX n | Number of weighted vertices. |
*MESH_NUMBONE n | Number of bones. |
*MESH_BONE_LIST { } | Lines *MESH_BONE_NAME i "name". |
*MESH_BONE_VERTEX_LIST { } | Lines *MESH_BONE_VERTEX i x y z followed by pairs of bone index and weight. A bone index of −1 marks an unused pair. |
Older exports instead append a top-level *MESH_SOFTSKINVERTS block that has no keywords inside:
for each skinned mesh a line with the node name, a line with the number of vertices, then one line per vertex
with the number of weights followed by that many pairs of quoted bone name and weight.
Recognising a file
A 3ds Max export starts with *3DSMAX_ASCIIEXPORT, optionally after a byte order mark, followed
by white space and a number. Other .ase files, such as colour swatches, are binary and begin
differently.
Divergence in software
- Assimp ignores
*MESH_ANIMATION, reads only the time and value of Bézier and TCB keys, and skips channels numbered above its limit. - Doom 3 takes only the
*BITMAPpath and the UVW offset, tiling and angle from the diffuse map, uses the path to name the material, reverses the corner order of faces, and stores the texture V coordinate as 1 − v. - Doom 3 rotates the exported normals by the node matrix before using them.
- Writers need not produce everything. The Blender ASE add-on for Unreal writes no
*SCENEor*NODE_TMblocks, puts all materials as sub-materials of*MATERIAL 0, writesAB,BCandCAas 0, and writes a*BITMAPmade from the material name because the Unreal importer matches materials by it.
Not described
There is no published specification of the file. The explorer has no ASE viewer, so a dropped file shows as text.
Known, not yet covered
- Reference: the values that follow time and value on Bézier and TCB key lines; the readers used here skip them.
- Reference: further shape statements for closed lines and curve interpolation points, inverse kinematics joint settings, the animation blocks for camera and light settings, per-face UVW coordinates of face-mapped objects, and the full lists of words for the enumerated values. The 3ds Max SDK exporter sample defines them; it was not used.
- Viewer: there is no ASE plugin.
Links
Software
- Autodesk 3ds Max – the modeller whose exporter writes ASE (Windows)
- ASCII Scene Export add-on – Blender exporter aimed at Unreal Engine (Blender)
Developers
Reference
- Exporting to ASCII – Autodesk’s help on the export options
- Assimp ASEParser.cpp – the most complete open reader
- Assimp ASE test models – files written by the 3ds Max exporter
- Doom 3 Model_ase.cpp – id Software’s reader
- Solosnake’s ASE description – an annotated export with a textured material
- mycsharp.de thread – quotes an exported shape object (German)