DKC:TF > Model File (CMDL/SMDL/WMDL)

Meta data: NModelFormat::SMetaData

TypeDescription
CFormDescriptorForm descriptor (CMDL/SMDL/WMDL)

CMDL Form

TypeDescription
Model ChunksModel data

SMDL Form

TypeDescription
CChunkDescriptorSKHD chunk (NModelFormat::SSkinnedModelHeader)
Model ChunksModel data

NModelFormat::SSkinnedModelHeader

TypeDescription
Uint32Unknown

WMDL Form

TypeDescription
CChunkDescriptorWDHD chunk (NModelFormat::SWorldModelHeader)
Model ChunksModel data

NModelFormat::SWorldModelHeader

TypeDescription
Uint8Unknown
CRenderOctreeRender octree
List<CAABox>AA box list
List<Float>Unknown

CRenderOctree

TypeDescription
CFourCCType
Uint32Unknown
Uint32field_0
Uint32field_4
Uint32field_8
CAABoxfield_C
List<Uint32>field_28
List<Uint32>field_34
List<Uint8>field_40
List<CAABox>field_4C

Model Chunks

TypeDescription
CChunkDescriptorHEAD chunk (NModelFormat::SModelHeader)
CChunkDescriptorMTRL chunk (List<CMaterialCache::SData)
CChunkDescriptorMESH chunk (List<CRenderMesh>)
CChunkDescriptorVBUF chunk (List<CGraphicsVertexBufferToken>)
CChunkDescriptorIBUF chunk (List<CGraphicsIndexBufferToken>)
CChunkDescriptorGPU chunk. This chunk contains the actual vertex and index buffers.

NModelFormat::SModelHeader

TypeDescription
Uint32Number of opaque meshes
Uint32Number of 1-pass trans meshes
Uint32Number of 2-pass trans meshes
Uint32Number of 1-bit meshes
Uint32Number of additive meshes
CAABoxAA box
List<CModelDataSource>Data sources

CModelDataSource

TypeDescription
Uint32Type
Object
IDType
0CModelAnimUvDataSource
1CWindModelDataSource
2CCausticModelDataSource
3CFurModelDataSource

CModelAnimUvDataSource

TypeDescription
CEvalSystemEval system
List<CEvalId>Eval ids
List<CVector4i>field_1C
List<Uint8>field_28

CEvalSystem

TypeDescription
CEvalDataContextEval data context
Uint32Update function
Uint32SetTime function
Uint32SetPhase function

CEvalDataContext

TypeDescription
Uint32Number of input values
Uint32Number of data handles
Uint32[]Input values
CEvalDataHandle[]Data handles

CEvalDataHandle

TypeDescription
List<Uint8>Data

CEvalId

TypeDescription
Uint32Id

CMaterialCache::SData

TypeDescription
CStringName
CObjectIdMaterial file id
CFourCCMaterial type
Uint32Material flags
List<CMaterialData>Data list

CMaterialData

TypeDescription
CFourCCData id
Uint32Type
Data

EMaterialDataId

FourCCIDTypeUniform name
GBUF0Texture
DIFT1Textureuc_diffuseMap
uc_diffuseMapTexCoordIndex
ICAN2Textureuc_incanMap
uc_incanMapTexCoordIndex
NMAP3Textureuc_normalMap
uc_normalMapTexCoordIndex
REFL4Textureuc_reflectionCubeMap
REFS5Textureuc_reflectionSphereMap
REFV6Textureuc_reflectivityMap
uc_reflectivityMapTexCoordIndex
SHRT7Texture
SPCT8Textureuc_specularMap
uc_specularMapTexCoordIndex
LIBD9Textureuc_lightBufferDiffuse
LIBS10Textureuc_lightBufferSpecular
BLND11Textureuc_vertexBlenderMask
uc_vertexBlenderMaskTexCoordIndex
FOGR12Textureuc_fogDepthDensityRamp
INDI13Textureuc_diffuseIndirectionMap
uc_diffuseIndirectionMapTexCoordIndex
SPCF14Textureuc_specularFalloffMap
FURT15Textureuc_furMap
FURL16Textureuc_furLengthMap
FURF17Textureuc_furFlowMap
ALPH18Coloruc_alphaTestParams
DIFC19Coloruc_diffuseColor
SHRC20Coloruc_directionalIrradianceMapAmbientColor
SPCC21Coloruc_specularColor
ANFP22Color
ICNC23Coloruc_incanColor
ICMC24Coloruc_incanUnmaskedColor
CHC025Int
CHC126Int
CHC227Int
AUVI28Int4uc_animatedUVIndices
ALPH29Scalaruc_fogInvRange
SPCP30Scalaruc_specularPower
INDS31Scalaruc_diffuseIndirectionScale
LCNT32Scalar
RFMN33Scalaruc_rimFresnelMin
RFMX34Scalaruc_rimFresnelMax
RBRT35Scalar
NMHT36Scalar
FRDN37Scalaruc_furDensity
FRTH38Scalar
FROC39Scalar
FROS40Scalaruc_furOcclusionStartLength
FRFS41Scalaruc_furFlowStrength
DRAG42Scalaruc_drag
SCOF43Scalaruc_stiffnessCoefficient
CONH44Scalaruc_constraintHeight
CONE45Scalaruc_constraintEllipseRatioSqr
FRBP46Scalaruc_furBendPower
SHDD47CSimpleShadowMaterialData
CProjectedSimpleShaderMaterialData
SKIN48CSkinningMaterialData
DIMD49NBakedLighting::CDIMMaterialData
PDTA50CParticleMaterialData
LIT 51CLightMaterialData
AUXF52CAnimatedUVMaterialData
WIND53CWindAnimMaterialData
WATR54CWaterMaterialData
DFXS55CDepthFxSceneMaterialData
DFXN56CDepthFXNodeMaterialData
CAUS57CCausticMaterialData
FURC58CFurMaterialData
INST59CInstanceMaterialData
DIFL60CLayeredTextureDatauc_diffuseMap
SPCL61CLayeredTextureDatauc_specularMap
ICNL62CLayeredTextureData
NRML63CLayeredTextureDatauc_normalMap

CMaterialTextureTokenData

TypeDescription
CObjectIdFile id
STextureUsageInfoUsage info

CLayeredTextureData

TypeDescription
Uint32field_C
CColor4ffield_10
CColor4ffield_20
CColor4ffield_30
Uint8Flags
CObjectIdTexture 1
STextureUsageInfoUsage info 1. Only present if the CObjectId of this texture is nonzero.
CObjectIdTexture 2
STextureUsageInfoUsage info 2. Only present if the CObjectId of this texture is nonzero.
CObjectIdTexture 3
STextureUsageInfoUsage info 3. Only present if the CObjectId of this texture is nonzero.

STextureUsageInfo

TypeDescription
Uint32Flags
Uint32Texture filter
Uint32Texture wrap (x)
Uint32Texture wrap (y)
Uint32Texture wrap (z)

CMaterialColorData

TypeDescription
CColor4fValue

CMaterialScalarData

TypeDescription
FloatValue

CMaterialInt4Data

TypeDescription
CVector4iValue

CRenderMesh

TypeDescription
Uint32Primitive mode
Uint16Material cache index
Uint8Vertex buffer index
Uint8Index buffer index
Uint32Index buffer offset
Uint32Count
Uint16field_10
Uint8field_12
Uint8field_13
Uint8Flags

Primitive Mode

EPrimitiveGX2PrimitiveMode
0GX2_PRIMITIVE_MODE_POINTS
1GX2_PRIMITIVE_MODE_LINES
2GX2_PRIMITIVE_MODE_LINE_STRIP
3GX2_PRIMITIVE_MODE_TRIANGLES
4GX2_PRIMITIVE_MODE_TRIANGLE_STRIP
510
611
712
813

CGraphicsVertexBufferToken

TypeDescription
Uint32Unknown
List<SVertexDataComponent>Components

SVertexDataComponent

TypeDescription
Uint32field_0
Uint32Offset
Uint32Stride
Uint32Format
Uint32Type

Attribute Format

ValueGX2AttribFormat
0GX2_ATTRIB_FORMAT_UNORM_8
1GX2_ATTRIB_FORMAT_UINT_8
2GX2_ATTRIB_FORMAT_SNORM_8
3GX2_ATTRIB_FORMAT_SINT_8
40x2
50x102
60x202
70x302
80x803
9GX2_ATTRIB_FORMAT_UNORM_8_8
10GX2_ATTRIB_FORMAT_UINT_8_8
11GX2_ATTRIB_FORMAT_SNORM_8_8
12GX2_ATTRIB_FORMAT_SINT_8_8
130x105
140x305
15GX2_ATTRIB_FORMAT_FLOAT_32
160x7
170x107
180x207
190x307
200x808
21GX2_ATTRIB_FORMAT_UNORM_8_8_8_8
22GX2_ATTRIB_FORMAT_UINT_8_8_8_8
23GX2_ATTRIB_FORMAT_SNORM_8_8_8_8
24GX2_ATTRIB_FORMAT_SINT_8_8_8_8
250xB
260x10B
270x10C
280x30C
29GX2_ATTRIB_FORMAT_FLOAT_32_32
300xE
310x10E
320x20E
330x30E
340x80F
350x110
360x310
37GX2_ATTRIB_FORMAT_FLOAT_32_32_32
380x112
390x312
40GX2_ATTRIB_FORMAT_FLOAT_32_32_32_32

CGraphicsIndexBufferToken

TypeDescription
Uint32Index type
ValueGX2IndexType
0GX2_INDEX_TYPE_U16
1GX2_INDEX_TYPE_U16
2GX2_INDEX_TYPE_U32

NModelFormat::SMetaData

TypeDescription
Uint32Unknown (always 4)
Uint32Offset to GPU chunk in model file
List<NModelFormat::SReadBufferInfo>Buffer info
List<NModelFormat::SBufferInfo>Vertex buffers
List<NModelFormat::SBufferInfo>Index buffers

NModelFormat::SReadBufferInfo

TypeDescription
Uint32Size
Uint32Offset

NModelFormat::SBufferInfo

TypeDescription
Uint32Read buffer index
Uint32Offset
Uint32Compressed size
Uint32Decompressed size