+ K # $ Appendix 3DS Chunk Definitions

Overview

The native binary 3D Studio file has a hierarchical file structure. It contains a number of data "chunks" constructed from a chunk header and additional data depending on the type of chunk.

Every chunk header contains an identification tag and length value. The identification tag is a 16-bit unsigned integer, and the length value is a 32-bit unsigned integer. Following the header, the data can be of any type or format, other chunks, or nothing at all.

The length value of the chunk is calculated as the total size of the chunk including the header and all the data and chunks contained within it. Only by identifying the header can the chunk contents be discovered. If a chunk is unidentifiable, every attempt should be made to ignore it by using its length as an offset to the next chunk.

3D Studio uses different file types for different kinds of information. These files include, but are not limited to, shaper (.shp extension), lofter (.lft), the materials library (.mli), editor/keyframer (.3ds), and project file (.prj). Of these files, only the .mli, .3ds, and portions of the .prj are documented here.

The 3D Studio file structure appears in the table on the next 17 pages with cross-references to the locations in this appendix where each chunk is detailed. Read chapter 2, "The 3DS File Structure," for more information on the proper order. Some chunks have additional restrictions, as documented in their descriptions. Where a chunk is applicable only to a specific release or releases of 3D Studio, that is also noted.

[TABLE REMOVED AS PAGE NUMBERS HAVE NO MEANING HERE. CLICK HERE FOR WORD DOC VERSION IN ZIP FILE]

Common Definitions

Data Types

The following are data types common to all sections.

(unsigned byte)

An unsigned 8-bit integer value.

(unsigned short)

An unsigned 16-bit integer value.

(short)

A signed 16-bit integer value.

(unsigned int)

An unsigned 32-bit integer value.

(long)

A signed 32-bit integer value.

(unsigned long)

An unsigned 32-bit integer value.

(float)

A 32-bit floating point value.

(string)

A sequential array of unsigned bytes with a NULL (ASCII value of 0) termination. Unless otherwise indicated, all strings are of variable length and their published sizes represent their maximum length only.

(point)

A list of three floats that corresponds to X, Y, and Z axis positions in 3D space.

Note: All integers are in Intel or LSB (least-significant byte first) ordering. Floating point values are IEEE standard.

File Header Chunks

Every 3D Studio file begins with a special identity or magic chunk with a length equivalent to all the chunks contained within the file. Each type of file has its own special heading chunk. 3D Studio uses these chunks to identify the file type.

M3DMAGIC 0x4D4D

The M3DMAGIC chunk is used at the beginning of a .3ds file.

(M3D_VERSION)

.3ds file version.

(MDATA)

Object section definition.

(KFDATA)

Keyframe section definition. Optional.

M3D_VERSION 0x0002

File version with a length of 10 (long+header). Can appear only once and is required.

(long)

Version of .3ds file. Currently only one version, 0x00000003, is used.

MLIBMAGIC 0x3DAA

The MLIBMAGIC chunk is used at the beginning of an .mli file.

(MAT_ENTRYs)

Material definitions.

CMAGIC 0xC23D

The CMAGIC chunk is used at the beginning of a .prj file. It contains every savable value-UI and scene-in 3D Studio. Only the scene-related values are documented in this appendix.

(SMAGIC)

Shaper section. Not documented here.

(LMAGIC)

Lofter section. Not documented here.

(MDATA)

Mesh section definition.

(KFDATA)

Keyframe section definition.

Major Section Chunks

In the larger, more complex files, such as .3ds and .prj files, major portions of the file are contained in their own sections. Each of these section chunks contains many other kinds of chunks related to that portion of the 3D Studio.

MDATA 0x3D3D

Mesh section with a length dependent upon the chunks contained within it. Can appear only once and is required.

(MESH_ VERSION)

Version.

(MAT_ENTRY)

Define materials.

(MASTER_SCALE)

Scale.

(VIEWPORT_LAYOUT)

Viewport configuration. Optional.

(LO_SHADOW_BIAS)

Shadow bias. Optional.

(HI_SHADOW_BIAS)

High shadow bias. Optional. R1.

(SHADOW_MAP_SIZE)

Shadow size. Optional.

(SHADOW_SAMPLES)

Sample size. Optional. R1.

(SHADOW_RANGE)

Shadow sample range. Optional. R1.

(SHADOW_FILTER)

Shadow filter. Optional. R2/R3.

(RAY_BIAS)

Ray traced shadow bias. R3.

(O_CONSTS)

Construction plane location. Optional.

(AMBIENT_LIGHT)

Ambient light setting. Optional.

(SOLID_BGND)

Solid color background. Optional.

(BIT_MAP)

Bit mapped background. Optional.

(V_GRADIENT)

Gradient colored background. Optional.

(USE_BIT_MAP)

Use bit mapped background. Optional.

(USE_SOLID_ BGND)

Use solid colored background. Optional.

(USE_V_ GRADIENT)

Use gradient colored background. Optional.

(FOG)

Fog definition. Optional.

(LAYER_FOG)

Layer fog definition. Optional. R3.

(DISTANCE_ CUE)

Distance cue definition. Optional.

(USE_FOG)

Use fog. Optional.

(USE_LAYER_FOG)

Use layer fog. Optional. R3.

(USE_ DISTANCE_CUE)

Use distance cue. Optional.

(DEFAULT_VIEW)

Define rendering view.

(NAMED_OBJECT)

Define mesh, light, and camera objects.

KFDATA 0xB000

Keyframe definition section with a length dependent upon the chunks contained within it. Can appear only once.

(KFHDR)

General keyframe information.

(KFSEG)

Keyframe active segment information.

(KFCURTIME)

Keyframe current frame.

The tags remaining in the definition can appear, or not appear, in any order and any number of occurrences.

(OBJECT_NODE_TAG)

Mesh object keyframe data.

(CAMERA_NODE_TAG)

Camera object keyframe data.

(TARGET_NODE_TAG)

Camera target keyframe data.

(LIGHT_NODE_TAG)

Omni-light object keyframe data.

(SPOTLIGHT_NODE_TAG)

Spotlight keyframe data.

(L_TARGET_NODE_TAG)

Spotlight target keyframe data.

(AMBIENT_NODE_TAG)

Ambient light keyframe data. Optional. R3.

Viewport Control Chunks

These chunks determine the size, placement and type of viewports used in 3D Studio and are used in other sections.

VIEWPORT_LAYOUT 0x7001

Viewport layout chunks with a length dependent upon the chunks it contains. May only be used once per section.

bit 2 (0x4)

Node render object hide.

bit 3 (0x8)

Light off in keyframer.

(short)

Viewport layout style which can be one of the following values:

0 (0x0)

A single viewport. When screens are swapped this layout is used and the original layout is stored in other fields.

1 (0x1)

Two viewports split vertically down the middle with viewport 0 on the left side and viewport 1 on the right.

2 (0x2)

Two viewport split horizonatally down the middle with viewport 0 on the top and viewport 1 on the bottom.

3 (0x3)

Four viewports dividing the screen horizontally and vertically into equal squares with viewport 0 on the upper left, viewport 1 on the upper right, viewport 2 on the lower left and viewport 3 on the lower right.

4 (0x4)

Three viewports with two viewports horizontally on the left of the screen and one rectangular viewport on the right. Viewport 0 is on the upper left, viewport 1 on the lower left, and viewport 2 on the right.

5 (0x5)

Three viewports with one viewport on the top and two viewports split vertically on the bottom. Viewport 0 is on the top, viewport 1 is on the lower left, and viewport 2 is on the lower right.

6 (0x6)

Three viewports with one viewport on the left half of the screen and two viewports split horizontally on the right side of the screen. Viewport 0 is on the left, viewport 1 is on the upper right, and viewport 2 is on the lower right.

7 (0x7)

Three viewports with two viewports split vertically on the upper half of the screen and one viewport on the bottom of the screen. Viewport 0 is on the upper left, viewport 1 is on the upper right, and viewport2 is on the bottom.

8 (0x8)

Three viewports dividing the screen vertically into thirds with viewport 0 on the left, viewport 1 in the middle, and viewport 2 on the right.

9 (0x9)

Three viewports dividing the screen horizontally into thirds with viewport 0 on the top, viewport 1 in the middle, and viewport 2 on the bottom.

10 (0xA)

Four viewports with 3 viewports divided horizontally on the left third of the screen and one viewport on the remaining right two thirds of the screen. Viewport 0 is on the upper left, viewport 1 is on the middle left, viewport 2 is on the lower left, and viewport 3 is on the right.

11 (0xB)

Four viewports with one viewport on the initial left two thirds of the screen and three viewports divided horizontally on the remaining right third of the screen. Viewport 0 is on the left, viewport 1 on the upper right, viewport 1 on the middle right, and viewport 2 on the lower right.

(short)

Index to the active viewport. Ranges from 0 to 4.

(short)

Internally used flags.

(short)

Flag which is 0x1 when a swap viewport is defined, 0x0 otherwise.

(short)

Internally used flags.

(short)

The form in use prior to the swap.

(short)

The viewport that is swaped to full size.

(VIEWPORT_SIZE)

Viewport size.

(VIEWPORT_DATA_3)

Viewport 0 data. R3.

(VIEWPORT_DATA_3)

Viewport 1 data. R3.

(VIEWPORT_DATA_3)

Viewport 2 data. R3.

(VIEWPORT_DATA_3)

Viewport 3 data. R3.

(VIEWPORT_DATA_3)

Viewport 4 data. R3.

(VIEWPORT_DATA)

Viewport 0 data. R1 & R2.

(VIEWPORT_DATA)

Viewport 1 data. R1 & R2.

(VIEWPORT_DATA)

Viewport 2 data. R1 & R2.

(VIEWPORT_DATA)

Viewport 3 data. R1 & R2.

(VIEWPORT_DATA)

Viewport 4 data. R1 & R2.

VIEWPORT_DATA 0x7011

Viewport definition with a size of 55 (7+unsigned short+3*float+point3ds+10 character fixed string+null+header). Although Release 3 supports this chunk for backwards compatibility, the VIEWPORT_DATA_3 is preferred.

(short)

Internally used flags.

(short)

Axis lockout flags.

(short)

Viewport X position.

(short)

Viewport Y position.

(short)

Viewport width.

(short)

Viewport height.

(short)

View type can be one of the following values

0 (0x0)

No view in viewport.

1 (0x1)

Top view in viewport.

2 (0x2)

Bottom view in viewport.

3 (0x3)

Left view in viewport.

4 (0x4)

Right view in viewport.

5 (0x5)

Front view in viewport.

6 (0x6)

Back view in viewport.

7 (0x7)

User view in viewport.

65535 (0xFFF)

Camera view in viewport.

(float)

Zoom ratio of screen pixels to geometry units. Not used in camera views.

(point)

View center point in geometry units. Not used in camera view.

(float)

Horizontal view angle in degrees in the XZ plane. Used only in user view.

(float)

Vertical view angle in degress in the YZ plane. Used only in user view..

(fixed string)

Camera view camera name. String is a fixed length of 11 characters.

VIEWPORT_DATA_3 0x7012

Viewport definition with a size of 55 (7+unsigned short+3*float+point3ds+10 character fixed string+null+header). Found in files created in Release 3.

(short)

Internally used flags.

(short)

Axis lockout flags.

(short)

Viewport X position.

(short)

Viewport Y position.

(short)

Viewport width.

(short)

Viewport height.

(short)

View type can be one of the following values

0 (0x0)

No view in viewport.

1 (0x1)

Top view in viewport.

2 (0x2)

Bottom view in viewport.

3 (0x3)

Left view in viewport.

4 (0x4)

Right view in viewport.

5 (0x5)

Front view in viewport.

6 (0x6)

Back view in viewport.

7 (0x7)

User view in viewport.

18 (0x12)

Spotlight view in viewport.

65535 (0xFFF)

Camera view in viewport.

(float)

Zoom ratio of screen pixels to geometry units. Not used in camera views.

(point)

View center point in geometry units. Not used in camera view.

(float)

Horizontal view angle in degrees in the XZ plane. Used only in user view.

(float)

Vertical view angle in degress in the YZ plane. Used only in user view..

(fixed string)

Camera view camera name. String is a fixed length of 11 characters.

VIEWPORT_SIZE 0x7020

Overall size of screen with a length of 14 (4*unsigned short+header). Required.

(unsigned short)

X position in screen pixels.

(unsigned short)

Y position in screen pixels.

(unsigned short)

Viewport width in screen pixels.

(unsigned short)

Viewport height in screen pixels.

MDATA Section Chunks

Data Types

The following are data types common to the MDATA section.

(textvert)

A pair of floats that correspond to the UV coordinates used in texture mapping.

(face)

A face definition made of the following:

(unsigned short)

Vertex A, the first vertex index.

(unsignedshort)

Vertex B, the second vertex index.

(unsignedshort)

Vertex C, the third vertex index.

(unsignedshort)

Edge visibility flags where bit 0 (0x1) sets the CA edge visible, bit 1 (0x2) sets the BC edge visible, bit 2 (0x4) sets the AB edge visible, bit 3 (0x8) indicates a U axis texture wrap, and bit 4 (0x10) indicates a V axis texture wrap.

Note: All integers are in Intel or LSB (least-significant byte first) ordering. Floating point values are IEEE standard.

Common Chunks

The following chunks are used many times throughout the MDATA section.

COLOR_F 0x0010

A floating point definition of color with a length of 24 (3*float+header). In many places, Release 3 has replaced this chunk with LIN_COLOR_F. In those places, Release 3 writes a COLOR_F chunk for backwards compatibility with Releases 1 and 2.

(float)

Red color that ranges from 0.0 (no red) to 1.0 (maximum red).

(float)

Green color that ranges from 0.0 (no green) to 1.0 (maximum green).

(float)

Blue color that ranges from 0.0 (no blue) to 1.0 (maximum blue).

COLOR_24 0x0011

An integer definition of color with a length of 9 (3*unsigned byte+header). In many places, Release 3 has replaced this chunk with LIN_COLOR_24. In those places, Release 3 will write a COLOR_24 chunk for backwards compatibility with Releases 1 and 2.

(unsigned byte)

Red color that ranges from 0 (no red) to 255 (maximum red).

(unsigned byte)

Green color that ranges from 0 (no green) to 255 (maximum green).

(unsigned byte)

Blue color that ranges from 0 (no blue) to 255 (maximum blue).

LIN_COLOR_24 0x0012

An integer definition of linear color with a length of 9 (3*unsigned byte+header). In many places, this chunk is used by 3D Studio Release 3 instead of the gamma-corrected Color_24 chunk.

(unsigned byte)

Red color that ranges from 0 (no red) to 255 (maximum red).

(unsigned byte)

Green color that ranges from 0 (no green) to 255 (maximum green).

(unsigned byte)

Blue color that ranges from 0 (no blue) to 255 (maximum blue).

LIN_COLOR_F 0x0013

A floating point definition of linear color with a length of 24 (3*float+header). In many places, this chunk is used by 3D Studio Release 3 instead of the gamma-corrected Color_F chunk.

(float)

Red color that ranges from 0.0 (no red) to 1.0 (maximum red).

(float)

Green color that ranges from 0.0 (no green) to 1.0 (maximum green).

(float)

Blue color that ranges from 0.0 (no blue) to 1.0 (maximum blue).

INT_PERCENTAGE 0x0030

An integer definition of a percentage with a length of 8 (short+header).

(short)

A percentage that ranges from 0 (lowest) to 100 (highest). In some cases, depending on parent chunk, the percentage may be negative.

FLOAT_PERCENTAGE 0x0031

A floating point definition of a percentage with a length of 10 (float+ header).

(float)

A percentage that ranges from 0.00 (lowest) to 1.00 (highest). In some cases, the percentage may be negative.

Section Settings Chunks

These chunks contains information about the various static, non-animating elements of 3D Studio.

MESH_VERSION 0x3D3E

Mesh section version with a length of 10 (long+header). Can appear only once and is required.

(long)

Current revision level of .3ds file format. 3D Studio Release 1 produces files with a version of 0x00000001, Release 2 produces files with a version of 0x00000002 and Release 3 produces files with a version of 0x00000003.

MASTER_SCALE 0x0100

File scale factor with a length of 10 (float+header). Can appear only once and is required.

(float)

A master scale factor for all geometry coordinates. 3D  Studio uses it to give a scaling factor for all incoming values that refer to units in 3D space. For reference, a master scale of 1.0 translates into one unit per inch.

LO_SHADOW_BIAS 0x1400

Global shadow low bias with a length of 10 (float+header). Can appear only once but is not required.

(float)

Global shadow low bias.

HI_SHADOW_BIAS 0x1410

Global shadow high bias with a length of 10 (float+header). Found only in files created in Release 1. Can appear only once but is not required.

(float)

Global shadow high bias.

SHADOW_MAP_SIZE 0x1420

Global shadow map size with a length of 8 (short+header). Can appear only once but is not required.

(short)

Global shadow map size that ranges from 10 to 4096.

SHADOW_SAMPLES 0x1430

Global shadow sample size with a length of 8 (short+header). Found only in files created in Release 1. Can appear only once but is not required.

(short)

Global shadow sample size.

SHADOW_RANGE 0x1440

Global shadow range with a length of 8 (short+header). Found only in files created in Release 1. Can appear only once but is not required.

(short)

Global shadow range.

SHADOW_FILTER 0x1450

Global shadow filter with a length of 10 (float+header). Found in files created in Releases 2 and 3. Can appear only once but is not required.

(float)

Global shadow filter that ranges from 1 (lowest) to 10 (highest).

RAY_BIAS 0x1460

Global ray traced shadow bias with a length of 10 (float+header). Found only in files created in Release 3.

(float)

Global ray traced shadow bias.

O_CONSTS 0x1500

3D Studio construction plane origin with a length of 18 (point+header).Found in files created in Releases 2 and 3. Can appear only once, but is not required.

(point)

Position of construction plane in global coordinates.

AMBIENT_LIGHT 0x2100

Ambient light color with a length of 30 (COLOR_F+ header) or 54 (COLOR_F+LIN_COLOR_F+header). Can appear only once but is not required.

(COLOR_F)

Ambient light color for Releases 1 and 2.

(LIN_COLOR_F)

Ambient light color for Release 3.

Background Settings Chunks

These chunks detail the rendering background settings and are found in the MDATA chunk.

BIT_MAP 0x1100

Bitmapped background with a length of 8 to 19 (1 NULL+1 to12 chars+header). Can appear only once in a file but is not required, and may appear along with SOLID_BGND and V_GRADIENT although only one type of background can be used.

(string)

12 characters plus NULL. Filename should include extension for 3D Studio to identify bitmap format. Bitmap should reside in a map path directory configured in 3ds.set.

SOLID_BGND 0x1200

Solid colored background with a length of 30 (COLOR_F+header) or 54 (COLOR_F+LIN_COLOR_F+header). Can appear only once in a file but is not required. Might appear along with BIT_MAP and V_GRADIENT, but only one type of background can be used.

(COLOR_F)

Background color for Releases 1 and 2.

(LIN_COLOR_F)

Background color for Release 3.

V_GRADIENT 0x1300

Gradient colored background with a length of 82 (float+COLOR_F*3+header) or 106 (float+COLOR_F*3+LIN_COLOR_F*3+header). Can appear only once in a file but is not required. Might appear along with BIT_MAP and SOLID_BGND, but only one type of background can be used.

(float)

Midpoint percentage of gradient (0=top, 1=bottom).

(COLOR_F)

Top color for Releases 1 and 2.

(LIN_COLOR_F)

Top color for Release 3.

(COLOR_F)

Middle color for Releases 1 and 2.

(LIN_COLOR_F)

Middle color for Release 3.

(COLOR_F)

Bottom color for Releases 1 and 2.

(LIN_COLOR_F)

Bottom color for Release 3.

USE_BIT_MAP 0x1101

Use bitmapped background flag with a length of 6 (header only). Can appear only once and cannot be used if USE_SOLID_BGND or USE_V_GRADIENT has already been defined.

USE_SOLID_BGND 0x1201

Use solid colored background flag with a length of 6 (header only). Can appear only once and cannot be used if USE_BIT_MAP or USE_V_GRADIENT have already been defined.

USE_V_GRADIENT 0x1301

Use solid colored background flag with a length of 6 (header only). Can appear only once and cannot be used if USE_BIT_MAP or USE_SOLID_BGND have already been defined.

 

Atmosphere Settings Chunks

These chunks detail active atmospheric effects and are found in the MDATA section chunk.

FOG 0x2200

Atmospheric fogging with a length of 22 (float*4+header) plus 24 (COLOR_F) plus 6 (FOG_BGND) if the FOG_BGND flag is used. Can appear only once but is not required. Might appear along with DISTANCE_CUE or LAYER_FOG but only one kind of atmosphere can be active.

(float)

Near fogging plane distance. In Release 3 this value is only used if the N_CAMERA chunk does not contain ranges.

(float)

Near fogging plane density that ranges from 0.0 (no fogging) to 1.0 (maximum fogging).

(float)

Far fogging plane distance. In Release 3 this value is only used if the N_CAMERA chunk does not contain ranges.

(float)

Far fogging plane density that ranges from 0.0 (no fogging) to 1.0 (maximum fogging).

(COLOR_F)

Fog coloration.

(FOG_BGND)

Fog the background flag when present. Optional.

FOG_BGND 0x2210

Fog-the-background flag with a length of 6 (header only).

LAYER_FOG 0x2302

Layer fog atmospheric with a length of 22 (float*4+header) plus 24 (COLOR_F). Found in files created in Release 3. Can appear only once but is not required. Might appear along with FOG or DISTANCE_CUE but only one kind of atmosphere can be active.

(float)

Lower Z axis boundary of fog effect.

(float)

Upper Z axis boundary of fog effect.

(float)

Fog density that ranges from 0.0 (no fog) to 1.0 (maximum fog).

(unsigned long)

Fog options flag. Bit 20 (0x100000) is set for background fogging, bit 0 (0x1) is set for bottom falloff, and bit 1 (0x2) is set for top falloff.

(COLOR_F)

Fog coloration.

DISTANCE_CUE 0x2300

Distance-cue darkening with a length of 22 (float*4+header) plus 6 (DCUE_BGND) if the DCUR_BGND flag is used. Can appear only once but is not required. MIght appear with FOG, but only one kind of atmosphere can be used.

(float)

Near distance-cue plane distance.

(float)

Near distance-cue dimming factor that ranges from 0.0 (no dimming) to 1.0 (maximum dimming).

(float)

Far distance-cue plane distance.

(float)

Far distance-cue dimming factor that ranges from 0.0 (no dimming) to 1.0 (maximum dimming).

(DCUE_BGND)

Distance-cue the background when present.

DCUE_BGND 0x2310

Distance-cue the background flag with a length of 6 (header only).

USE_FOG 0x2201

Use atmospheric fogging flag with a length of 6 (header only). Can appear only once and cannot be used if USE_LAYER_FOG or USE_DISTANCE_CUE have already been used.

USE_LAYER_FOG 0x2303

Use layer fogging flag with a length of 6 (header only). Can appear only once and cannot be used if USE_FOG or USE_DISTANCE_CUE have already been used.

USE_DISTANCE_CUE 0x2301

Use distance-cue darkening with a length of 6 (header only). Can appear only once and cannot be used if USE_FOG or USE_LAYER_FOG have already been used.

Viewport Chunks

DEFAULT_VIEW 0x3000

Default or command-line rendering view with a length of 6 (header) plus 22 (an orthographic view) if an orthographic view is used, or plus 34 (VIEW_USER) if a user view is used, or plus 7 to 17 (VIEW_CAMERA) if a camera view is used. Can appear only once but is not required. Found in files created in Releases 1 and 2.

(VIEW_TOP)

Default view to be used.

(VIEW_BOTTOM)

Default view to be used.

(VIEW_LEFT)

Default view to be used.

(VIEW_RIGHT)

Default view to be used.

(VIEW_FRONT)

Default view to be used.

(VIEW_BACK)

Default view to be used.

(VIEW_USER)

Default view to be used.

(VIEW_CAMERA)

Default view to be used.

VIEW_TOP 0x3010

Orthographic projection of the Top view with a length of 22 (point+float+header). Can appear only once.

(point)

View target in global coordinates.

(float)

Width of view in global coordinates.

VIEW_BOTTOM 0x3020

Orthographic projection of the Bottom view with a length of 22 (point+float+header). Can appear only once.

(point)

View target in global coordinates.

(float)

Width of view in global coordinates.

VIEW_LEFT 0x3030

Orthographic projection of the Left view with a length of 22 (point+float+header). Can appear only once.

(point)

View target in global coordinates.

(float)

Width of view in global coordinates.

VIEW_RIGHT 0x3040

Orthographic projection of the Right view with a length of 22 (point+float+header). Can appear only once.

(point)

View target in global coordinates.

(float)

Width of view in global coordinates.

VIEW_FRONT 0x3050

Orthographic projection of the Front view with a length of 22 (point+float+header). Can appear only once.

(point)

View target in global coordinates.

(float)

Width of view in global coordinates.

VIEW_BACK 0x3060

Orthographic projection of the Back view with a length of 22 (point+float+header). Can appear only once.

(point)

View target in global coordinates.

(float)

Width of view in global coordinates.

VIEW_USER 0x3070

User-defined view with a length of 34 (point+float*4+header). Can appear only once.

(point)

View target in global coordinates.

(float)

Width of view in global coordinates.

(float)

Horizontal view angle from XY plane.

(float)

Vertical view angle from YZ plane.

(float)

Bank angle of view rotation about the vector described by the horizontal and vertical angle.

VIEW_CAMERA 0x3080

View based on camera object with a length of 17 (1 NULL+10 chars+header). Can appear only once.

(string)

Ten characters plus NULL. Name of the camera object to use as a rendering view.

Materials Chunks

The material chunks are found in two different 3D Studio sections, the MDATA chunk (.3ds and .prj files) and the MLIMAGIC chunk (.mli files).

MAT_ENTRY 0xAFFF

Material definition entry with a length dependent upon the chunks used. Can appear as many times as needed as long as each MAT_NAME remains unique.

Material definitions must appear in the file before the objects that use them.

(MAT_NAME)

Material name.

(MAT_AMBIENT)

Ambient light color.

(MAT_DIFFUSE)

Diffuse light color.

(MAT_SPECULAR)

Specular light color.

(MAT_SHININESS)

Shininess ratio.

(MAT_SHIN2PCT)

Shininess strength. R3.

(MAT_TRANSPARENCY)

Transparency ratio.

(MAT_XPFALL)

Transparency falloff. Optional.

(MAT_REFBLUR)

Reflection blurring. Optional.

(MAT_SELF_ILLUM)

Self-illuminating. Optional. R1 and R2.

(MAT_SHADING)

Shading style.

(MAT_SELF_ILPCT)

Self-illumination percentage. Optional. R3.

(MAT_USE_XPFALL)

Use transparency falloff. Optional.

(MAT_USE_REFBLUR)

Use reflection blurring. Optional.

(MAT_TWO_SIDE)

Two-sided. Optional.

(MAT_ADDITIVE)

Additive transparency. Optional.

(MAT_WIRE)

Render material in wireframe. Optional. R3.

(MAT_FACEMAP)

Face map textures. Optional. R3.

(MAT_PHONGSOFT)

Phong soften material. Optional. R3.

(MAT_WIRESIZE)

Wireframe thickness. Optional. R3.

(MAT_DECAL)

Decal mapping. Optional. R1 and R2.

(MAT_TEXMAP)

First texture map. Optional.

(MAT_SXP_TEXT_DATA)

First texture procedure data. Optional.

(MAT_TEXMASK)

First texture mask. Optional. R3.

(MAT_SXP_TEXT_MASKDATA)

First texture mask procedure data. Optional. R3.

(MAT_TEX2MAP)

Second texture map. Optional. R3.

(MAT_SXP_TEXT2_DATA)

Second texture procedure data. Optional. R3.

(MAT_TEXT2MASK)

Second texture mask. Optional. R3.

(MAT_SXP_TEXT2_MASKDATA)

Second texture mask procedure data. Optional. R3.

(MAT_OPACMAP)

Opacity map. Optional.

(MAT_SXP_OPAC_DATA)

Opacity procedure data. Optional.

(MAT_OPAC_MASK)

Opacity mask. Optional. R3.

(MAT_SXP_OPAC_MASKDATA)

Opacity mask procedure data. Optional. R3.

(MAT_BUMPMAP)

Bump map. Optional.

(MAT_SXP_BUMP_DATA)

Bump procedure data. Optional.

(MAT_BUMPMASK)

Bump mask. Optional. R3.

(MAT_SXP_BUMP_MASKDATA)

Bump mask procedure data. Optional. R3.

(MAT_SPECMAP)

Specular map. Optional. R3.

(MAT_SXP_SPEC_DATA)

Specular procedure data. Optional. R3.

(MAT_SPECMASK)

Specular mask. Optional. R3.

(MAT_SXP_SPEC_MASKDATA)

Specular mask procedure data. Optional. R3.

(MAT_SHINMAP)

Shininess map. Optional. R3.

(MAT_SXP_SHIN_DATA)

Shininess procedure data. Optional. R3.

(MAT_SHINMASK)

Shininess mask. Optional. R3.

(MAT_SXP_SHIN_MASKDATA)

Shininess mask procedure data. Optional. R3.

(MAT_SELFIMAP)

Self illumination map. Optional. R3.

(MAT_SXP_SELFI_DATA)

Self illumination procedure data. Optional. R3.

(MAT_SELFIMASK)

Self illumination mask. Optional. R3.

(MAT_SXP_SELFI_MASKDATA)

Self illumination mask procedure data. Optional. R3.

(MAT_REFLMAP)

Reflection map. Optional.

(MAT_REFLMASK)

Reflection mask. Optional. R3.

(MAT_SXP_REFL_MASKDATA)

Reflection mask procedure data. Optional. R3.

(MAT_ACUBIC)

Automatic reflection mapping. Optional.

MAT_NAME 0xA000

Name of material definition with a length of 8 - 22 (1 NULL+1 to 15 chars+ header). Must appear with MAT_ENTRY and can appear only once per MAT_ENTRY.

(string)

One to sixteen characters plus NULL. Name of the material being defined. Must be unique among material entries.

MAT_AMBIENT 0xA010

Ambient material color with a length of 15 (COLOR_24+header) or 24 (COLOR_24+LIN_COLOR_24+header). Must appear with MAT_ENTRY and can appear only once per MAT_ENTRY.

(COLOR_24)

Color of ambient light. R1 & R2.

(LIN_COLOR_24)

Linear color of ambient light. R3.

MAT_DIFFUSE 0xA020

Diffuse material color with a length of 15 (COLOR_24+header) or 24 (COLOR_24+LIN_COLOR_24+header). Must appear with MAT_ENTRY and can appear only once per MAT_ENTRY.

(COLOR_24)

Color of diffuse light. R1 & R2.

(LIN_COLOR_24)

Linear color of diffuse light. R3.

MAT_SPECULAR 0xA030

Specular material color with a length of 15 (COLOR_24+header) or 24 (COLOR_24+LIN_COLOR_24+header). Must appear with MAT_ENTRY and can appear only once per MAT_ENTRY.

(COLOR_24)

Color of specular light. R1 & R2.

(LIN_COLOR_24)

Linear color of specular light. R3.

MAT_SHININESS 0xA040

Material shininess ratio with a length of 14 (INT_PERCENTAGE+header). Must appear with MAT_ENTRY and can appear only once per MAT_ENTRY.

(INT_PERCENTAGE)

Shininess ratio that ranges from 0 (matte) to 100 (shiny).

MAT_SHIN2PCT 0xA041

Material shininess strength with a length of 14 (INT_PERCENTAGE+header). Must appear with MAT_ENTRY and can appear only once per MAT_ENTRY.

(INT_PERCENTAGE)

Shininess strength that ranges from 0 (matte) to 100 (shiny).

MAT_TRANSPARENCY 0xA050

Material transparency with a length of 14 (INT_PERCENTAGE+header). Must appear with MAT_ENTRY and can appear only once per MAT_ENTRY.

(INT_PERCENTAGE)

Transparency ratio that ranges from 0 (matte) to 100.

MAT_XPFALL 0xA052

Transparency falloff ratio with a length of 14 (INT_PERCENTAGE+header). Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 2 and 3.

(INT_PERCENTAGE)

Transparency object center-to-edge falloff ratio. Ranges from -100 to 100 (INT_PERCENTAGE). The strength of the falloff is controlled by the absolute magnitude of the number, with 0 being the weakest. The sign of the number controls the direction with a negative sign indicating an inside falloff, and an unsigned value indicating an outside falloff.

MAT_USE_XPFALL 0xA240

Use transparency falloff flag with a length of 6 (header only). Can appear only once per MAT_ENTRY but is not required. Do not use if MAT_XPFALL has not been defined. Found in files created in Releases 2 and 3.

MAT_REFBLUR 0xA053

Reflection blurring ratio with a length of 10 (float+header). Can appear only once per MAT_ENTRY but is not required. Found in files created in Releases 2 and 3.

(INT_PERCENTAGE)

Reflection blurring ratio that ranges from 0 (no blurring) to 100.

MAT_SHADING 0xA100

Material shading method with a length of 8 (short+header). Must appear with MAT_ENTRY and can appear only once.

(short)

Shading method should be 0 for wireframe (used only by Releases 1 and 2), 1 for flat, 2 for Gouraud, 3 for Phong, and 4 for Metal.

MAT_USE_REFBLUR 0xA250

Use reflection blurring flag with a length of 6 (header only). Can appear only once per MAT_ENTRY but is not required. Do not use if MAT_REFBLUR has not been defined. Found in files created in Releases 2 and 3.

MAT_SELF_ILLUM 0xA080

Material is self illumination flag with a length of 6 (header only). Can appear only once per MAT_ENTRY but is not required. Found in files created in Releases 1 and 2.

MAT_TWO_SIDE 0xA081

Material is two sided flag with a length of 6 (header only). Can appear only once per MAT_ENTRY but is not required.

MAT_DECAL 0xA082

Material mapping is decaled flag with a length of 6 (header only). Can appear only once per MAT_ENTRY but is not required. Found in files created in Releases 1 and 2.

MAT_ADDITIVE 0xA083

Material has additive transparency flag with a length of 6 (header only).

MAT_WIRE 0xA085

Material wireframe rendered flag with a length of 6 (header only). Found in files created in Release 3.

MAT_FACEMAP 0xA088

Face mapped textures flag with a length of 6 (header only). Found in files created in Release 3.

MAT_PHONGSOFT 0xA08C

Phong soften material flag with a length of 6 (header only). Found in files created in Release 3.

MAT_WIREABS 0xA08E

Wire size in units flag with a length of 6 (header only). Found in files created in Release 3.

MAT_WIRESIZE 0xA087

Rendered wire size with a length of 10(float+header). Found in files created in Release 3.

(float)

Width of wire in rendering. Width is in pixels by default, but becomes units if a MAT_WIREABS chunk is in the same MAT_ENTRY.

MAT_TEXMAP 0xA200

Material texture map definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required.

(INT_PERCENTAGE)

Texture map strength.

(MAT_MAPNAME)

Texture map filename.

(MAT_MAP_TILING)

Texture map options. R3.

(MAT_MAT_TEXBLUR)

Texture blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Texture map U scale. Optional. R3.

(MAT_MAP_VSCALE)

Texture map V scale. Optional. R3

(MAT_MAP_UOFFSET)

Texture map U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Texture map V offset. Optional. R3.

(MAT_MAP_ANG)

Texture map rotation angle. Optional. R3.

(MAT_MAP_COL1)

First tinting color. Optional. R3.

(MAT_MAP_COL2)

Second tinting color. Optional. R3.

(MAT_MAP_RCOL)

Red component color tint. Optional. R3.

(MAT_MAP_GCOL)

Green component color tint. Optional. R3

(MAT_MAP_BCOL)

Blue component color tint. Optional. R3.

MAT_SXP_TEXT_DATA 0xA320

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Releases 2 and 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_TEXMASK 0xA3EH

Material texture mask definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Texture mask strength.

(MAT_MAPNAME)

Texture mask filename.

(MAT_MAP_TILING)

Texture mask options. R3.

(MAT_MAT_TEXBLUR)

Texture blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Texture mask U scale. Optional. R3.

(MAT_MAP_VSCALE)

Texture mask V scale. Optional. R3

(MAT_MAP_UOFFSET)

Texture mask U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Texture mask V offset. Optional. R3.

(MAT_MAP_ANG)

Texture mask rotation angle. Optional. R3.

MAT_SXP_TEXTMASK_DATA 0xA32A

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_TEX2MAP 0xA33A

Second material texture map definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Texture map strength.

(MAT_MAPNAME)

Texture map filename.

(MAT_MAP_TILING)

Texture map options. R3.

(MAT_MAT_TEXBLUR)

Texture blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Texture map U scale. Optional. R3.

(MAT_MAP_VSCALE)

Texture map V scale. Optional. R3

(MAT_MAP_UOFFSET)

Texture map U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Texture map V offset. Optional. R3.

(MAT_MAP_ANG)

Texture map rotation angle. Optional. R3.

(MAT_MAP_COL1)

First tinting color. Optional. R3.

(MAT_MAP_COL2)

Second tinting color. Optional. R3.

(MAT_MAP_RCOL)

Red component color tint. Optional. R3.

(MAT_MAP_GCOL)

Green component color tint. Optional. R3

(MAT_MAP_BCOL)

Blue component color tint. Optional. R3.

MAT_SXP_TEXT2_DATA 0xA321

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_TEX2MASK 0xA340H

Material texture mask definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Texture mask strength.

(MAT_MAPNAME)

Texture mask filename.

(MAT_MAP_TILING)

Texture mask options. R3.

(MAT_MAT_TEXBLUR)

Texture blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Texture mask U scale. Optional. R3.

(MAT_MAP_VSCALE)

Texture mask V scale. Optional. R3

(MAT_MAP_UOFFSET)

Texture mask U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Texture mask V offset. Optional. R3.

(MAT_MAP_ANG)

Texture mask rotation angle. Optional. R3.

MAT_SXP_TEXT2MASK_DATA 0xA32C

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_OPACMAP 0xA210

Material opacity map definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required.

(INT_PERCENTAGE)

Opacity map strength.

(MAT_MAPNAME)

Opacity map filename.

(MAT_MAP_TILING)

Opacity map options. R3.

(MAT_MAT_TEXBLUR)

Opacity blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Opacity map U scale. Optional. R3.

(MAT_MAP_VSCALE)

Opacity map V scale. Optional. R3

(MAT_MAP_UOFFSET)

Opacity map U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Opacity map V offset. Optional. R3.

(MAT_MAP_ANG)

Opacity map rotation angle. Optional. R3.

MAT_SXP_OPAC_DATA 0xA322

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_OPACMASK 0xA342

Material opacity mask definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Opacity mask strength.

(MAT_MAPNAME)

Opacity mask filename.

(MAT_MAP_TILING)

Opacity mask options. R3.

(MAT_MAT_TEXBLUR)

Opacity blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Opacity mask U scale. Optional. R3.

(MAT_MAP_VSCALE)

Opacity mask V scale. Optional. R3

(MAT_MAP_UOFFSET)

Opacity mask U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Opacity mask V offset. Optional. R3.

(MAT_MAP_ANG)

Opacity mask rotation angle. Optional. R3.

MAT_SXP_OPACMASK_DATA 0xA32E

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Releases 2 and 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_BUMPMAP 0xA230

Material bump map definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required.

(INT_PERCENTAGE)

Bump map strength.

(MAT_MAPNAME)

Bump map filename.

(MAT_MAP_TILING)

Bump map options. R3.

(MAT_MAT_TEXBLUR)

Bump blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Bump map U scale. Optional. R3.

(MAT_MAP_VSCALE)

Bump map V scale. Optional. R3

(MAT_MAP_UOFFSET)

Bump map U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Bump map V offset. Optional. R3.

(MAT_MAP_ANG)

Bump map rotation angle. Optional. R3.

MAT_SXP_BUMP_DATA 0xA324

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Releases 2 and 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_BUMPMASK 0xA344

Material bump mask definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Bump mask strength.

(MAT_MAPNAME)

Bump mask filename.

(MAT_MAP_TILING)

Bump mask options. R3.

(MAT_MAT_TEXBLUR)

Bump blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Bump mask U scale. Optional. R3.

(MAT_MAP_VSCALE)

Bump mask V scale. Optional. R3

(MAT_MAP_UOFFSET)

Bump mask U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Bump mask V offset. Optional. R3.

(MAT_MAP_ANG)

Bump mask rotation angle. Optional. R3.

MAT_SXP_BUMPMASK_DATA 0xA330

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_SPECMAP 0xA204

Material specular map definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Specular map strength.

(MAT_MAPNAME)

Specular map filename.

(MAT_MAP_TILING)

Specular map options. R3.

(MAT_MAT_TEXBLUR)

Specular blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Specular map U scale. Optional. R3.

(MAT_MAP_VSCALE)

Specular map V scale. Optional. R3

(MAT_MAP_UOFFSET)

Specular map U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Specular map V offset. Optional. R3.

(MAT_MAP_ANG)

Specular map rotation angle. Optional. R3.

(MAT_MAP_COL1)

First tinting color. Optional. R3.

(MAT_MAP_COL2)

Second tinting color. Optional. R3.

(MAT_MAP_RCOL)

Red component color tint. Optional. R3.

(MAT_MAP_GCOL)

Green component color tint. Optional. R3

(MAT_MAP_BCOL)

Blue component color tint. Optional. R3.

MAT_SXP_SPEC_DATA 0xA325

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_SPECMASK 0xA348

Material specular mask definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Specular mask strength.

(MAT_MAPNAME)

Specular mask filename.

(MAT_MAP_TILING)

Specular mask options. R3.

(MAT_MAT_TEXBLUR)

Specular blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Specular mask U scale. Optional. R3.

(MAT_MAP_VSCALE)

Specular mask V scale. Optional. R3

(MAT_MAP_UOFFSET)

Specular mask U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Specular mask V offset. Optional. R3.

(MAT_MAP_ANG)

Specular mask rotation angle. Optional. R3.

MAT_SXP_SPECMASK_DATA 0xA332

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_SHINMAP 0xA33C

Material shininess map definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Shininess map strength.

(MAT_MAPNAME)

Shininess map filename.

(MAT_MAP_TILING)

Shininess map options. R3.

(MAT_MAT_TEXBLUR)

Shininess blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Shininess map U scale. Optional. R3.

(MAT_MAP_VSCALE)

Shininess map V scale. Optional. R3

(MAT_MAP_UOFFSET)

Shininess map U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Shininess map V offset. Optional. R3.

(MAT_MAP_ANG)

Shininess map rotation angle. Optional. R3.

MAT_SXP_SHIN_DATA 0xA326

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_SHINMASK 0xA346

Material shininess mask definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Shininess mask strength.

(MAT_MAPNAME)

Shininess mask filename.

(MAT_MAP_TILING)

Shininess mask options. R3.

(MAT_MAT_TEXBLUR)

Shininess blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Shininess mask U scale. Optional. R3.

(MAT_MAP_VSCALE)

Shininess mask V scale. Optional. R3

(MAT_MAP_UOFFSET)

Shininess mask U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Shininess mask V offset. Optional. R3.

(MAT_MAP_ANG)

Shininess mask rotation angle. Optional. R3.

MAT_SXP_SHINMASK_DATA 0xA334

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_SELFIMAP 0xA33D

Material self illumination map definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Self Illumination map strength.

(MAT_MAPNAME)

Self Illumination map filename.

(MAT_MAP_TILING)

Self Illumination map options. R3.

(MAT_MAT_TEXBLUR)

Self Illumination blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Self Illumination map U scale. Optional. R3.

(MAT_MAP_VSCALE)

Self Illumination map V scale. Optional. R3

(MAT_MAP_UOFFSET)

Self Illumination map U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Self Illumination map V offset. Optional. R3.

(MAT_MAP_ANG)

Self Illumination map rotation angle. Optional. R3.

MAT_SXP_SELFI_DATA 0xA328

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_SELFIMASK 0xA34A

Material self-illumination mask definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Self Illumination mask strength.

(MAT_MAPNAME)

Self Illumination mask filename.

(MAT_MAP_TILING)

Self Illumination mask options. R3.

(MAT_MAT_TEXBLUR)

Self Illumination blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Self Illumination mask U scale. Optional. R3.

(MAT_MAP_VSCALE)

Self Illumination mask V scale. Optional. R3

(MAT_MAP_UOFFSET)

Self Illumination mask U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Self Illumination mask V offset. Optional. R3.

(MAT_MAP_ANG)

Self Illumination mask rotation angle. Optional. R3.

MAT_SXP_SELFIMASK_DATA 0xA336

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Releases 2 and 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_REFLMAP 0xA220

Material reflection map definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required.

(INT_PERCENTAGE)

Reflection map strength.

(MAT_MAPNAME)

Reflection map filename. An empty string if automatic reflection maps are being used.

MAT_REFLMASK 0xA34C

Material reflection mask definition with a length dependent upon the chunks contained within it. Can appear only once per MAT_ENTRY but is not required. Found in files created in Release 3.

(INT_PERCENTAGE)

Reflection mask strength.

(MAT_MAPNAME)

Reflection mask filename.

(MAT_MAP_TILING)

Reflection mask options. R3.

(MAT_MAT_TEXBLUR)

Reflection blurring effect. Optional. R3.

(MAT_MAP_USCALE)

Reflection mask U scale. Optional. R3.

(MAT_MAP_VSCALE)

Reflection mask V scale. Optional. R3

(MAT_MAP_UOFFSET)

Reflection mask U offset. Optional. R3.

(MAT_MAP_VOFFSET)

Reflection mask V offset. Optional. R3.

(MAT_MAP_ANG)

Reflection mask rotation angle. Optional. R3.

MAT_SXP_REFLMASK_DATA 0xA338

Solid procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when MAT_MAPNAME refers to a solid procedure (.sxp extension). Found in files created in Release 3.

(variable)

Type and content depends on the dialogue structure used by the procedures state structure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

MAT_ACUBIC 0xA310

Automatic reflection/cubic environment map with a length of 18 (byte*2+ short+long*2+header). Appears only when automatic reflection maps are defined. Found in files created in Releases 2 and 3.

(byte)

Shade level. Not used; should be set to 0.

(byte)

Anti-alias level used when rendering the map. Valid values are: 0 for None, 1 for Low, 2 for Medium, and 3 for High. Appropriate values depend on image being created. Only used in Release 2.

(short)

Reflection bit flags where bit 0 (0x1) turns on the acubic, bit 2 (0x4) sets first frame only rendering and bit 3 (0x8) sets flat mirroring. All other bits are left unset.

(long)

Map size, or size of reflection map generated.

(long)

Nth frame, or frame interval for the creation of new reflection maps.

MAT_MAPNAME 0xA300

A string definition of a bitmap filename with a variable length of 19 (1 NULL+12 chars+header). Only one per mapping chunk.

(string)

Twelve characters plus NULL. Filename should include extension for .3ds to identify bitmap format. Bitmap should reside in a map path directory configured in 3ds.set.

MAT_MAP_TILING 0xA351

Map control flags with a size of 8 (unsigned short+header). Used to control various mapping settings. Required with Release 3 and only one per mapping chunk.

(unsigned short)

Control bit flags, where bit 0 (0x1) activates decaling, bit 1 (0x2) activates mirroring, bit 3 (0x8) activates negation, bit 4 (0x10) deactivates tiling, bit 5 (0x20) activates summed area sampling, bit 6 (0x40) activates alpha sourcing, bit 7 (0x80) activates tinting, bit 8 (0x100) ignores alpha, and bit 9 (0x200) activates RGB tinting. Bits 7, 8, and 9 are only used with MAT_TEXMAP, MAT_TEX2MAP, and MAT_SPECMAP chunks. Bit 6, when used with a MAT_TEXMAP, MAT_TEX2MAP, or MAT_SPECMAP chunk must be accompanied with a tinting bit, either 7 or 9. Remaining bits are for internal use only.

MAT_MAT_TEXBLUR 0xA353

Texture blurring factor with a size of 10 (float+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(float)

Blurring factor ranges from 0.0 (no blur) to 1.0 (maximum blurring).

MAT_MAP_USCALE 0xA354

Map U coordinate scaling factor with a size or 10 (float+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(float)

U coordinate scaling value that can be any positive or negative value, but cannot be 0.0.

MAT_MAP_VSCALE 0xA356

Map V coordinate scaling factor with a size or 10 (float+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(float)

V coordinate scaling value that can be any positive or negative value, but cannot be 0.0.

MAT_MAP_UOFFSET 0xA358

Map U coordinate offset value with a size of 10 (float+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(float)

U coordinate offset value.

MAT_MAP_VOFFSET 0xA35A

Map V coordinate offset value with a size of 10 (float+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(float)

V coordinate offset value.

MAT_MAP_ANG 0xA35C

Map rotation angle with a size of 10 (float+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(float)

Rotation angle in degrees that ranges from -360.0 to 360.0.

MAT_MAP_COL1 0xA360

First map tinting color with a length of 9 (3*unsigned byte+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(unsigned byte)

Red color that ranges from 0 (no red) to 255 (maximum red).

(unsigned byte)

Green color that ranges from 0 (no green) to 255 (maximum green).

(unsigned byte)

Blue color that ranges from 0 (no blue) to 255 (maximum blue).

MAT_MAP_COL2 0xA362

Second map tinting color with a length of 9 (3*unsigned byte+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(unsigned byte)

Red color that ranges from 0 (no red) to 255 (maximum red).

(unsigned byte)

Green color that ranges from 0 (no green) to 255 (maximum green).

(unsigned byte)

Blue color that ranges from 0 (no blue) to 255 (maximum blue).

MAT_MAP_RCOL 0xA364

Red component tinting color with a length of 9 (3*unsigned byte+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(unsigned byte)

Red color that ranges from 0 (no red) to 255 (maximum red).

(unsigned byte)

Green color that ranges from 0 (no green) to 255 (maximum green).

(unsigned byte)

Blue color that ranges from 0 (no blue) to 255 (maximum blue).

MAT_MAP_GCOL 0xA366

Green component tinting color with a length of 9 (3*unsigned byte+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(unsigned byte)

Red color that ranges from 0 (no red) to 255 (maximum red).

(unsigned byte)

Green color that ranges from 0 (no green) to 255 (maximum green).

(unsigned byte)

Blue color that ranges from 0 (no blue) to 255 (maximum blue).

MAT_MAP_BCOL 0xA368

Blue component tinting color with a length of 9 (3*unsigned byte+header). Not required and only one per mapping chunk. Found in files created in Release 3.

(unsigned byte)

Red color that ranges from 0 (no red) to 255 (maximum red).

(unsigned byte)

Green color that ranges from 0 (no green) to 255 (maximum green).

(unsigned byte)

Blue color that ranges from 0 (no blue) to 255 (maximum blue).

Object Chunks

These chunks define the various objects in a scene, lights, cameras, and meshes. They are found in the MDATA section.

NAMED_OBJECT 0x4000

Object definition with a length dependent upon the subchunks used. Can appear as many times as needed as long as names remain unique.

(string)

Name of object. 1 to 10 characters plus NULL.

(N_TRI_OBJECT), (N_DIRECT_LIGHT,)or (N_CAMERA)

Object being defined.

(OBJECT_HIDDEN)

Object hidden. Optional.

(OBJ_VIS_LOFTER)

Object visible in 3D Lofter. Optional.

(OBJ_DOESNT_ CAST)

Object doesn't cast shadows. Optional.

(OBJ_MATTE)

Object background matte. Optional.

(OBJ_DONE_RCVSHADOW)

Object doesn't get shadows. Optional. R3.

(OBJ_FAST)

Object fast display. Optional.

(OBJ_PROCEDURAL)

Object procedural. Optional.

(OBJ_FROZEN)

Object frozen. Optional.

N_TRI_OBJECT 0x4100

Mesh object definition with a length dependent upon the subchunks used. Can appear only once per NAMED_OBJECT, and cannot be used if N_DIRECT_LIGHT or N_CAMERA have been defined in NAMED_OBJECT.

(POINT_ARRAY)

Vertex list.

(POINT_FLAG_ARRAY)

Vertex flags. Optional.

(FACE_ARRAY)

Face list.

(MSH_MAT_GROUP)

Materials list.

(TEX_VERTS)

Texture coordinate list. Optional.

(MESH_MATRIX)

Transformation matrix.

(MESH_COLOR)

Mesh editing color. Optional. R3.

(MESH_TEXTURE_INFO)

Texture mapping icon information.

(PROC_NAME)

Procedural name.

(PROC_DATA)

Procedural data.

POINT_ARRAY 0x4110

A list of vertices used to construct the mesh with a length based on 8+9*count (header+unsigned short+point*count). Can appear only once per N_TRI_OBJECT.

(unsigned short)

Number of vertices in the list. Can range from 1 to 65535.

(point list)

A list of points in global coordinates. The number of points in the list must equal the number of vertices specified.

POINT_FLAG_ARRAY 0x4111

A list of point flags with a length based on 8+2*count (header+unsigned short+short*count). Can appear only once per N_TRI_OBJECT but is not required.

(unsigned short)

Number of point flags in the list. Can range from 1 to 65535. The number of flags must be the same as the number of points in POINT_ARRAY.

(short list)

A list of vertex flags with an internal meaning. The number of flags in the list must equal the number of point flags specified.

FACE_ARRAY 0x4120

A list of faces that construct the mesh with a length based on 8+8*count (header+unsigned short+ face*count) plus the lengths of MSH_MAT_GROUP and SMOOTH_GROUP. Can appear only once per N_TRI_OBJECT.

(unsigned short)

The number of faces in the face list. Can range from 1 to 65535.

(face list)

A list of faces that refer to vertices in POINT_ARRAY. No face should refer to a vertex index larger than the number of vertices in POINT_ARRAY.

(MSH_MAT_GROUP)

Materials assigned to faces. May occur more than once. Optional.

(SMOOTH_GROUP)

Smoothing group assigned to faces. Optional.

(MSH_BOXMAP)

Box assigned materials. Optional. R3.

MSH_MAT_GROUP 0x4130

A list of faces that are assigned the material named. It has a length based on 8 (header+unsigned short), plus 2 to 16 (1 NULL+n chars), plus 2*count (unsigned short*count). May appear as many times as there are materials defined in the object but is not required.

(string)

Name of material definition. 1-16 characters plus NULL.

(unsigned short)

Number of faces assigned material. If a box assigned material, then this count should be 0.

(unsigned short list)

A list of face indexes that are assigned the material. No index can exceed the number of faces in FACE_ARRAY. If count is 0, as it is for box assigned materials, then this list will not be present.

SMOOTH_GROUP 0x4150

Smoothing group definitions for all the faces in FACE_ARRAY. Can appear only once per FACE_ARRAY but is not required.

(unsigned long list)

The list should have a long for every face in FACE_ARRAY. The smoothing groups are assigned as bits, with each bit (0-31) representing one smoothing group. A face can only be assigned to one smoothing group at a time.

MSH_BOXMAP 0x4190

A list of materials used for box mapping with a size that depends on the size of the strings in the list. Found in files created in Release 3.

(string)

Front side material. 1 to 16 characters plus NULL.

(string)

Back side material. 1 to 16 characters plus NULL.

(string)

Left side material. 1 to 16 characters plus NULL.

(string)

Right side material. 1 to 16 characters plus NULL.

(string)

Top side material. 1 to 16 characters plus NULL.

(string)

Bottom side material. 1 to 16 characters plus NULL.

TEX_VERTS 0x4140

Texture coordinate values with a length based on the number of vertices in POINT_ARRAY*8 + 8 (count*texvert+header+unsigned short). Can appear only once per N_TRI_OBJECT but is not required.

(unsigned short)

The number of texture coordinates. Must be the number as vertices in POINT_ARRAY.

(texvert list)

A list of UV coordinates for texture mapping.

MESH_MATRIX 0x4160

Transformation matrix for N_TRI_OBJECT with a length of 54 (float*12+header). Can appear only once per N_TRI_OBJECT but is not required.

(float * 12)

3-by-4 matrix describing object orientation. Used by the Keyframer to determine object rotation and center.

MESH_COLOR 0x4165

UI mesh color with a length of 7 (ubyte+header). Determines the color used in drawing the mesh wireframe inside 3D Studio's interface. Found in files created in Release 3.

(ubyte)

Color index that ranges from 0 to 64. Actual color used on screen varies depending on the 3D Studio settings and display card.

MESH_TEXTURE_INFO 0x4170

Mapping icon position information with a length of 90 (float*18+point+header). Records the orientation of the mapping icon when last used to create UV coordinates in 3D Studio. It is not used by the renderer to determine texture placement. Can appear only once per N_TRI_OBJECT but is not required.

(float)

X tiling repeat value.

(float)

Y tiling repeat value.

(point)

Icon position in global coordinates.

(float)

Icon scaling value used to equally scale the size of the planer icon, the radius of the cylindrical icon, and the radius of the spherical icon in global units.

(float*12)

3-by-4 transformation matrix for describing the icon's orientation. Should be set to identity if not used.

(float)

Planar icon width.

(float)

Planar icon height.

(float)

Cylinder icon height.

PROC_NAME 0x4181

Name of animated stand in procedure (.axp extension) with a length of 19 (NULL+12 chars+ header). Can only be used once per N_TRI_OBJECT and only when OBJECT_PROCEDURAL is defined in NAMED_OBJECT. Found in files created in Releases 2 and 3.

(string)

Twelve characters plus NULL. Name of animated stand in procedure.

PROC_DATA 0x4182

Animated procedural data with a length that depends on the data being used by the procedure. Can appear only once and only when PROC_NAME refers to an animated procedure (.axp extension). Found in files created in Releases 2 and 3.

(variable)

Type and content depends on the state structure used by the procedure. Refer to the 3D  Studio Release 3 IPAS Toolkit Reference for more information.

N_DIRECT_LIGHT 0x4600

Lighting object definition with a length based on 42 (point+header+COLOR_F) plus the subchunks used. Can appear only once per NAMED_OBJECT.

(point)

Position of light in global coordinates.

(COLOR_F)

Light color.

(DL_OFF)

Light off switch. Optional.

(DL_OUTER_RANGE)

Attenuation range outside radius. Optional. R3.

(DL_INNER_RANGE)

Attenuation range inside radius. Optional. R3.

(DL_MULTIPLIER)

Intensity multiplier. Optional. R3.

(DL_EXCLUDE)

Illumination exclusion list. Optional. R3.

(DL_SPOTLIGHT)

Additional spotlight definition. Optional.

(DL_ATTENUATE)

Use attenuation flag. Optional. R3.

DL_OFF 0x4620

Light off switch with a length of 6 (header only). Can appear only once per N_DIRECT_LIGHT but is not required.

DL_OUTER_RANGE 0x465A

Light attenuation outer radius with a length of 10 (float+header). Can appear only once per N_DIRECT_LIGHT but is not required. Found in files created in Release 3.

(float)

Radius size that ranges from 0.0 to any positive float value.

DL_INNER_RANGE 0x4659

Light attenuation inner radius with a length of 10 (float+header). Can appear only once per N_DIRECT_LIGHT but is not required. Found in files created in Release 3.

(float)

Radius size that ranges from 0.0 to any positive float value.

DL_MULTIPLIER 0x465B

Light intensity multiplier with a length of 10 (float+header). Can appear only once per N_DIRECT_LIGHT but is not required. Found in files created in Release 3.

(float)

Intensity multiplier that maybe be any positive or negative float value, but cannot be 0.0.

DL_EXCLUDE 0x4654

Illumination exclusion with a length of 7 to 17 (1-10 character string null +header). Chunk may appear for as many times in N_DIRECT_LIGHT as there are objects to exclude. Found in files created in Release 3.

(string)

One or more NULL terminate strings of 1 to 10 characters that refers to an excluded N_TRI_OBJECTS.

DL_ATTENUATE 0x4625

Light attenuation flag with a length of 6 (header only) that indicates the use of attenuation. Can appear only once per N_DIRECT_LIGHT but is not required. Found in files created in Release 3.

DL_SPOTLIGHT 0x4610

Spotlight definition with a length based on 26 (point+float*2+header) plus the subchunks used. Can appear only once per N_DIRECT_LIGHT.

(point)

Position of spotlight target in global coordinates.

(float)

Hotspot cone angle in degrees that range from 1 to 160.

(float)

Falloff cone angle in degrees that range 1 to 160.

(DL_SPOT_ROLL)

Spotlight roll angle. Optional. R3.

(DL_SHADOWED)

Spotlight casts shadows. Optional.

(DL_LOCAL_-SHADOW2)

Local shadow parameters. Optional.

(DL_SEE_CONE)

Spotlight cone visibility flag. Optional.

(DL_SPOT_RECTANGULAR)

Rectangular spotlight cone flag. Optional. R3.

(DL_SPOT_ASPECT)

Spotlight cone aspect ratio. Optional. R3.

(DL_SPOT_PROJECTOR)

Projected bitmap. Optional. R3.

(DL_SPOT_OVERSHOOT)

Spotlight overshoot flag. Optional. R3.

(DL_RAY_BIAS)

Raytraced shadow bias value. Optional. R3.

(DL_RAYSHADE)

Use raytraced shadows flag. Optional.

DL_SPOT_ROLL 0x4656

Spotlight roll angle with a length of 10 (float+header). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Release 3.

(float)

Roll angle in degrees, ranges from -360.0 to 360.

DL_SHADOWED 0x4630

Spotlight shadowed flag with a length of 6 (header only). Can appear only once per DL_SPOTLIGHT but is not required.

DL_LOCAL_SHADOW2 0x4641

Local shadow casting parameters with a length of 16 (float*2+short+header). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Releases 2 and 3.

(float)

Local shadow low bias.

(float)

Local shadow filter that ranges from 1 (lowest) to 10 (highest).

(short)

Local shadow map size that ranges from 10 to 4096.

DL_SEE_CONE 0x4650

Spotlight cone visibility flag with a length of 6 (header only). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Releases 2 and 3.

DL_SPOT_RECTANGULAR 0x4651

Rectangular spotlight cone flag with a length of 6 (header only). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Release 3.

DL_SPOT_ASPECT 0x4657

Spotlight cone aspect ratio of width/height with a length of 10 (float+header). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Release 3.

(float)

Spotlight width/height ratio. Cannot be 0.0.

DL_SPOT_PROJECTOR 0x4653

Bitmap projection spotlight with a length of 7 to 19 (1-12 characters+null+header). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Release 3.

(string)

The name of the projection bitmap. String of 1 to 12 characters with NULL terminator. Note that 3D Studio sometimes pads the string with extra characters.

DL_SPOT_OVERSHOOT 0x4652

Spotlight overshoot flag with a length of 6 (header only). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Release 3.

DL_RAY_BIAS 0x4658

Raytraced shadow bias with a length of 10 (float+header). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Release 3.

(float)

Shadow bias.

DL_RAYSHAD 0x4627

Use raytraced shadows flag with a length of 6 (header only). Can appear only once per DL_SPOTLIGHT but is not required. Found in files created in Release 3.

N_CAMERA 0x4700

Camera object definition with a length of 38 (point*2+float*2+header) plus 6 (CAM_SEE_CONE). Can only be used once per NAMED_OBJECT.

(point)

Camera position in global coordinates.

(point)

Target position in global coordinates.

(float)

Camera bank angle in degrees.

(float)

Camera focal length in millimeters.

(CAM_SEE_CONE)

Camera cone visibility flag. Optional.

(CAM_RANGES)

Atmosphere effect ranges. Optional. R3.

CAM_SEE_CONE 0x4710

Camera cone visibility flag with a length of 6 (header only). Can appear only once per N_CAMERA but is not required. Appears only in files created in Release 2.

CAM_RANGES 0x4720

Atmospheric effect ranges with a length of 14 (2*float+header). Can only appear once per N_CAMERA but is not required. Found in files created in Release 3.

(float)

Near radius of effect. Ranges from 0.0 to any positive float value.

(float)

Far radius of effect. Ranges from 0.0 to any positive float value.

OBJ_HIDDEN 0x4010

Object visibility flag with a length of 6 (header only). Can appear only once per NAMED_OBJECT and only applies to N_TRI_MESH objects.

OBJ_VIS_LOFTER 0x4011

Object visibility in 3D Lofter flag with a length of 6 (header only). Can appear only once per NAMED_OBJECT and only applies to N_TRI_MESH objects.

OBJ_DOESNT_CAST 0x4012

Object does not cast shadows flag with a length of 6 (header only). Can appear only once per NAMED_OBJECT and only applies to N_TRI_MESH objects.

OBJ_DONT_RCVSHADOW 0x4017

Object doesn't receive shadows flag a length of 6 (header only). Can appear only once per NAMED_OBJECT and only applies to N_TRI_MESH objects. Found in files created in Release 3.

OBJ_MATTE 0x4013

Object is a background matte flag with a length of 6 (header only). Can appear only once per NAMED_OBJECT and only applies to N_TRI_MESH objects.

OBJ_FAST 0x4014

Object is a fastdraw object with a length of 6 (header only). Can appear only once per NAMED_OBJECT and only applies to N_TRI_MESH objects. Found in files created in Releases 2 and 3.

OBJ_PROCEDURAL 0x4015

Object is a procedural object with a length of 6 (header only). Can appear only once per NAMED_OBJECT and only applies to N_TRI_MESH objects. Found in files created in Releases 2 and 3.

OBJ_FROZEN 0x4016

Object is a frozen object with a length of 6 (header only). Can appear only once per NAMED_OBJECT. Found in files created in Releases 2 and 3.

KFDATA Section Chunks

Data Types

The following terms describe data in the KFDATA chunk. These terms are in addition to those used earlier:

(trackheader)

A complex structure that leads every key track. It is 14 bytes and comprises the following items:

(unsignedshort)

Track looping flags where bit 0 (0x1) duplicates, or loops keys, and bit 1 (0x2) smooths the last key to the first key. The Key Info dialog options of Single/Loop/Repeat are 0x0/0x3/0x2 respectively.

Axis lock flags where bit 3 (0x8) locks the X axis, bit 4 (0x10) locks the Y axis, and bit 5 (0x20) locks the Z axis.

Track link flags where bit 8 (0x100) unlinks the X axis, bit 9 (0x200) unlinks the Y axis, and bit 10 (0x400) unlinks the Z axis.

All remaining bits are for internal use only.

(unsigned

long)

Not currently used.

(unsigned

long)

Not currently used.

(unsigned

long)

The number of keys in a track.

(keyheader)

A complex structure that is common to every key. It is up to 26 bytes in size and comprises the following items:

(long)

The frame number where the key occurs.

(short)

A set of bits that determine which spline terms are present:

bit 0=Use tension.

bit 1=Use continuity.

bit 2=Use bias.

bit 3=Use ease to.

bit 4=Use ease from.

Note: All other bits should be off.

(float)

Spline tension value ranges from -1.0 to 1.0. Only present if bit 0 set.

(float)

Spline continuity value ranges from -1.0 to 1.0. Only present if bit 1 set.

(float)

Spline bias value ranges from -1.0 to 1.0. Only present if bit 2 set.

(float)

Key ease to value ranges from 0.0 to 1.0. Only present if bit 3 set.

(float)

Key ease from value ranges from 0.0 to 1.0. Only present if bit 4 set.

Note: All integers are in Intel or LSB (least-significant byte first) ordering.

Global Keyframer Settings Chunks

KFHDR 0xB00A

General keyframe definition with a length of 25 (short+NULL+12 chars+header). Can appear only once per KFDATA and is required.

(short)

Current revision level of the keyframe section. 3D Studio Release 1 produces files with a version of 0x0001, 3D Studio Release 2 produces files with a version of 0x0002, and Release 3 produces files with a version of 0x0005.

(string)

Name of the .3ds file. Twelve characters plus NULL. Present due to historical reasons but is not required to contain a valid value.

(long)

Animation length in frames. Valid range is from 1 to 32000.

KFSEG 0xB008

The active segment of frames with a length of 14 (long*2+header). Used to determine range of frames that will be rendered. Can appear only once per KFDATA but is not required.

(long)

First frame of segment.

(long)

Last frame of segment.

KFCURTIME 0xB009

The active or current frame with a length of 10 (long+header). Used to determine which single frame will be rendered or will be active when entering the Keyframer. Can appear only once per KFDATA but is not required.

(long)

Current frame number.

Node Tag Chunks

These chunks encapsulate the animation tracks for 3D Studio objects defined in the MDATA section.

AMBIENT_NODE_TAG 0xB001

Keyframe animation of the ambient light with a length dependent upon the chunks contained with in. Is not required and can only occur once per KFDATA section. Found in files created in Release 3.

(NODE_ID)

Node index control, for the AMBIENT_NODE_TAG it must always be -1.

(NODE_HDR)

Node control information. Name must always be "$AMBIENT$" and parent index must always be -1.

(COL_TRACK_TAG)

Light color track.

OBJECT_NODE_TAG 0xB002

Keyframe animation for mesh objects with a length dependent upon the chunks contained within it. It may appear as many times as needed.

(NODE_ID)

Node index control. Optional. R3.

(NODE_HDR)

Information common to all types of objects.

(PIVOT)

Rotational pivot point and scaling center point.

(INSTANCE_NAME)

Name of object instance.

(BOUNDBOX)

Mesh object bounding box.

(POS_TRACK_TAG)

Mesh position keys.

(ROT_TRACK_TAG)

Mesh rotation keys.

(SCL_TRACK_TAG)

Mesh scaling keys.

(MORPH_TRACK_TAG)

Mesh morph keys. Optional.

(HIDE_TRACK_TAG)

Mesh hide keys. Optional. R3.

(MORPH_SMOOTH)

Morph smoothing angle. Optional.

CAMERA_NODE_TAG 0xB003

Keyframe animation for camera objects with a length dependent upon the chunks contained within it. It may appear as many times as needed.

(NODE_ID)

Node index control. Optional. R3.

(NODE_HDR)

Node control information.

(POS_TRACK_TAG)

Camera position keys.

(FOV_TRACK_TAG)

Camera field of view angle keys.

(ROLL_TRACK_TAG)

Camera roll angle keys.

TARGET_NODE_TAG 0xB004

Keyframe animation for camera targets with a length dependent upon the chunks contained within it. It may appear as many times as needed.

(NODE_ID)

Node index control. Optional. R3.

(NODE_HDR)

Node control information.

(POS_TRACK_TAG)

Camera target position keys.

LIGHT_NODE_TAG 0xB005

Keyframe animation for omni light objects with a length dependent upon the chunks contained within it. It may appear as many times as needed.

(NODE_ID)

Node index control. Optional. R3.

(NODE_HDR)

Node control information.

(POS_TRACK_TAG)

Omni light position keys.

(COL_TRACK_TAG)

Omni light color keys.

SPOTLIGHT_NODE_TAG 0xB007

Keyframe animation for spotlight objects with a length dependent upon the chunks contained within it. It may appear as many times as needed.

(NODE_ID)

Node index control. Optional. R3.

(NODE_HDR)

Node control information.

(POS_TRACK_TAG)

Spotlight position keys.

(COL_TRACK_TAG)

Spotlight color keys.

(HOT_TRACK_TAG)

Hotspot angle keys.

(FALL_TRACK_TAG)

Falloff angle keys.

(ROLL_TRACK_TAG)

Spotlight cone roll keys. Optional. R3.

L_TARGET_NODE_TAG 0xB006

Keyframe animation for spotlight targets with a length dependent upon the chunks contained within it. It may appear as many times as needed.

(NODE_ID)

Node index control. Optional. R3.

(NODE_HDR)

Node control information.

(POS_TRACK_TAG)

Spotlight target position keys.

Common Node Chunks

These chunks are used by node tag chunks.

NODE_ID 0xB030

Node ordering information with a length of 8 (ushort+header). This chunk is used to override the node order that occurs in the KFDATA section. Node order is used to identify the hierarchical parents referred to by the NODE_HDR chunk. Occurs only once per node tag and is optional. Node tags without NODE_ID chunks are considered to have a node id of 65535. Found in files created in Release 3.

(ushort)

Node order ID. Valid range is from 0 to 65535. Node ID's do not need to be sequential or continuous. Identical node ids are sorted in the order they occur in the file. AMBIENT_NODE_TAGs must always have a node ID of 65535.

NODE_HDR 0xB010

General keyframe object information with a length of 16 to 25 (NULL+1-10 chars+unsigned short*2+short).

(string)

Name of the object in the mesh section. String of 1 to 10 characters plus NULL. A name of $$$DUMMY creates a special dummy OBJECT_NODE.

(unsigned short)

Flag 1. Flags have the following meaning:

bit 2 (0x4)

Node render object hide.

bit 3 (0x8)

Light off in keyframer.

bit 11 (0x800)

Hide node in keyframer.

bit 12 (0x1000)

Fast draw node in keyframer.

bit 14 (0x4000)

Node tag is not an instance.

All other bits have internal meaning.

(unsigned short)

Flag 2. Flags have the following meaning:

bit 1 (0x1)

Display path.

bit 2 (0x2)

Object node uses autosmoothing.

bit 3 (0x4)

Object node is frozen.

bit 5(0x10)

Object node uses motion blur.

bit 6 (0x20)

Object node has material morphing.

bit 7 (0x40)

Object node has mesh morphing.

All other bits have internal meanings.

(unsigned short)

Parent index. An index of 65535 indicates no parent. OBJECT_NODE_TAGs can be parents of any other node and CAMERA_NODE_TAGs can be parents of SPOTLIGHT_NODE_TAGs and LIGHT_NODE_TAGs. The index is computed by the order the nodes occur in the KFDATA section. This order, however, can be overridden by the use of NODE_ID tags found in Release 3.

PIVOT 0xB013

Rotational pivoting point and scaling center reference with a length of 18 (point+header). Can appear only once per OBJECT_NODE_TAG and is required.

(point)

Offset from center of BOUNDBOX.

 

INSTANCE_NAME 0xB011

Mesh instance name with a length from 8 to 17 (NULL+1-10 chars+header). Can be used only once per OBJECT_NODE_TAG and is not required.

(string)

Ten characters plus NULL. Instance name of a mesh or dummy object. Can be the same or different from the name listed in NODE_HDR. Instance names must be unique.

MORPH_SMOOTH 0xB015

Smoothing angle for morphing objects with a length of 10 (float+header). Can be used only once per OBJECT_NODE_TAG but is not required.

(float)

Smoothing angle for morph keys. Ranges from 0.0 to 180.0.

BOUNDBOX 0xB014

Mesh object bounding box definition with a length of 30 (point*2+header). Can appear only once per OBJECT_NODE_TAG and is required.

(point)

Minimum bounding point.

(point)

Maximum bounding point.

POS_TRACK_TAG 0xB020

Position keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per node and is required.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(point)

Position in global coordinates.

COL_TRACK_TAG 0xB025

Light color keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per LIGHT_NODE or SPOTLIGHT_NODE and is required.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(float)

Red component ranging from 0.0 to 1.0.

(float)

Green component ranging from 0.0 to 1.0.

(float)

Blue component ranging from 0.0 to 1.0.

ROT_TRACK_TAG 0xB021

Mesh object rotation keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per OBJECT_NODE and is required.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(float)

Rotation angle in degrees.

(float)

X component of rotation axis vector.

(float)

Y component of rotation axis vector.

(float)

Z component of rotation axis vector.

SCL_TRACK_TAG 0xB022

Mesh object scaling keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per OBJECT_NODE and is required.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(float)

X scaling value.

(float)

Y scaling value.

(float)

Z scaling value.

MORPH_TRACK_TAG 0xB026

Morph object keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per OBJECT_NODE but is not required.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(string)

Name of object being morphed to. String of 1 to 10 characters plus NULL. Object must have the same vertex count as this object instance.

FOV_TRACK_TAG 0xB023

Camera field of view keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per CAMERA_NODE and is required.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(float)

Field of view angle in degrees that range from 0.00025 to 160 degrees.

ROLL_TRACK_TAG 0xB024

Camera and spotlight roll angle keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per node tag and is required for cameras.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(float)

Angle of roll in degrees.

HOT_TRACK_TAG 0xB027

Hotspot angle keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per SPOTLIGHT_NODE and is required.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(float)

Angle of hot spot in degrees that range from 1 to 160.

FALL_TRACK_TAG 0xB028

Falloff angle keys with a length that varies depending on the number of keys and the variably sized keyheaders. Can appear only once per SPOTLIGHT_NODE and is required.

(trackheader)

Information common to all key lists.

The following fields are repeated as many times as the keys count that trackheader defines:

(keyheader)

Key spline values.

(float)

Angle of falloff in degrees that range from 1 to 160.

HIDE_TRACK_TAG 0xB029

Object hide toggle with a length that varies depending on the number of keys and the variably sized keyheader. Can appear only once per OBJECT_NODE_TAG but is not required. Found in files created in Release 3.