-
Notifications
You must be signed in to change notification settings - Fork 5
.model
sections/model/ | model_to_gltf.py | obj_writer.py
Stores different model data, such as submeshes, LODs, geometry, skeleton, shapekeys, references to materials, etc.
Asset Browser has a preview, but due to materials it's unlikely to ever be very close to in-game visuals.
Not all of the sections are researched, and some are not researched enough. Because of that, "converters" from usual 3D formats to .model don't actually make a new one from scratch, and instead inject the data into original .model. For simplicity, and to be sure we don't end up with corrupted asset, we don't change the size of original .model's sections (so offsets and numbers of things, like vertexes, stay correct in those sections we don't know how to tweak). This means we can't inject more than existing number of vertexes, indexes, weights, etc.
Data | State |
---|---|
Geometry | Researched good enough. Normals (un)packing used to cause problems. |
Skeleton | Can be exported. Importing is not implemented. |
Weights | Can be exported and injected. >256 bones is not supported. |
Shapekeys | Can be exported, but not always look correct. More research needed. |
Magic | Description |
---|---|
98906B9F |
MSMR |
DB40514C |
MM |
9D2C0FA9 |
RCRA |
CC9DAFF8 |
- |
General
Geometry
Skeleton
Weights
Shapekeys
Misc
◆ Not researched
Contains bunch of general information for the model: offsets, scales, LOD distances, etc. Not researched enough.
Array of materials. 32 bytes per material. Contains 64-bit offsets to names in strings block (material slot name and asset filename), 64-bit asset id, CRC32 of slot name and an unknown 32-bit value.
Array of mesh definition structs. Each is 64 bytes long, and order/size of fields is different between SO and later games.
Contains data such as number of vertexes and indexes for this submesh, index of corresponding material, some flags, "skin batches" number (where vertex weights are stored).
Array of looks. Each look has 8 LODs (4 in case of SO), each LOD is defined by two 16-bit integers: starting submesh and number of submeshes.
In injecting scripts, like gltf_to_model.py, all LODs typically being overwriten to be equal to LOD0.
Not researched enough. Contains array of 80 bytes long entries, describing looks, and some other buffer. Each look has 32-bit offset to its name in strings block, as well as two CRC32 of it, and real number of LODs (out of 8 written in
Indexes buffer. Could be (MSMR/MM) delta-encoded.
Vertexes' XYZ, UV and normals data. Could be (MSMR/MM) in 7 separate buffers, where every value is xored with all previous (allowing continuous spans of 0s to happen, so it compresses better).
Second layer of UVs?
Vertexes' colors. 4 bytes (RGBA?) per vertex.
Map<uint32, uint32>, stored as array of key-value pairs.
Array of joints definitions. Each definition is 16 bytes long.
Arrays of joints transforms. One array contains position, rotation and scale, and another stores 4x4 matrixes — both per joint, in the same order as
Array of structs describing skin batches. Each is 16 bytes long, contains offset for
Vertexes' weights data buffer, which is to be unpacked according to
See get_skin() from 'model_to_gltf.py'.
Array of vertexes' weights. Section first met in RCRA. Stores up to 4 weights per vertex, as 8 bytes: 4 joints indexes, 4 weights.
See get_skin() from 'model_to_gltf.py'.
Format might be different for models with more than 256 bones?
Contains arrays of shapekeys headers. Header is of variable size, determined by number of subsets corresponding to a key. Contains information about key's name, weights packing, offsets, etc.
Shapekeys positions/normals data buffer, which is to be unpacked according to
See add_shapekey() from 'model_to_gltf.py'.
Shapekeys positions/normals indexes buffer, which is to be unpacked according to
See add_shapekey() from 'model_to_gltf.py'.
Map<uint32, uint32>, stored as array of key-value pairs.
Array of locator definitions. Each definition is 64 bytes long. Contains 32-bit hash of name, 32-bit offset to name in strings block, joint index and 3x4 float matrix.
Havok data.
Tag | Code | Name |
---|---|---|
00823787
|
x00823787_Section |
- |
14D8B13C
|
x14D8B13C_Section |
- |
27CA5246
|
x27CA5246_Section |
- |
3C9DABDF
|
ModelSplineSubsetsSection |
Model Spline Subsets |
5A39FAB7
|
x5A39FAB7_Section |
- |
5240C82B
|
x5240C82B_Section |
Model Skin Joint Remap |
BCE86B01
|
xBCE86B01_Section |
- |
5D5CF541
|
x5D5CF541_Section |
- |
855275D7
|
x855275D7_Section |
- |
8A84E4D6
|
x8A84E4D6_Section |
- |
ADD1CBD3
|
xADD1CBD3_Section |
- |
B25B3163
|
xB25B3163_Section |
- |
CD903318
|
xCD903318_Section |
- |
BB7303D5
|
xBB7303D5_Section |
- |
244E5823
|
x244E5823_Section |
- |
42349A17
|
x42349A17_Section |
- |
665DA362
|
x665DA362_Section |
- |
7CA37DA0
|
AmbientShadowPrimsSection |
Ambient Shadow Prims |
0AD3A708
|
x0AD3A708_Section |
- |
707F1B58
|
x707F1B58_Section |
- |
4CCEA4AD
|
x4CCEA4AD_Section |
- |
Joints-related | ||
B7380E8C
|
xB7380E8C_Section |
- |
C5354B60
|
xC5354B60_Section |
Model Mirror Ids |
90CDB60C
|
x90CDB60C_Section |
- |
Locators-related | ||
9A434B29
|
LocatorRelatedSection |
- |
Looks-related | ||
DF9FDF12
|
xDF9FDF12_Section |
- |
Home
Assets Browser
Scripts
Code Insights
Knowledge Base
Glossary
Other Works
Files
toc
dag
Formats
DAT1
DSAR
DDL
Assets
Assets Reports
Types
.actor
.animclip
.animset
.atmosphere
.cinematic2
.conduit
.config
.level
.levellight
.localization
.material
.model
.nodegraph
.soundbank
.texture
.visualeffect
.wwiselookup
.zone
.zonelightbin
Games