VMDL: Difference between revisions
Jump to navigation
Jump to search
m (THE OWL moved page Dota 2 Workshop Tools/VMDL to Valve Model) |
No edit summary |
||
(11 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{LanguageBar}} | ||
{{ | {{Source 2 topicon}} | ||
{{TabsBar|main=MDL}} | |||
A file with the ''VMDL'' extension is a content-side text file that the tools can compile to make a game-side binary file (''VMDL_C''). | A file with the ''VMDL'' extension is a content-side text file that the tools can compile to make a game-side binary file (''VMDL_C''). | ||
When a model is saved in | When a model is saved in {{mdledit|4}}, it writes out the VMDL file with the new changes, and the tools notice the change and then compiles the model. | ||
== Element reference == | == Element reference == | ||
* [[/Animation|Animation]] | |||
* [[ | * [[/Attachments|Attachments]] | ||
* [[ | * [[/Hitboxes|Hitboxes]] | ||
* [[ | * [[/Internal External References|Internal External References]] | ||
* [[ | * [[/LodGroup|LodGroup]] | ||
* [[ | * [[/MaterialGroups|MaterialGroups]] | ||
* [[ | * [[/MaterialRemap|MaterialRemap]] | ||
* [[ | * [[/Mesh|Mesh]] | ||
* [[ | * [[/MeshGroup|MeshGroup]] | ||
* [[ | * [[/PhysicsMesh|PhysicsMesh]] | ||
* [[ | |||
== Notes == | == Notes == | ||
Line 43: | Line 42: | ||
== Larger example == | == Larger example == | ||
An empty VMDL file looked like this: | An empty VMDL file looked like this: | ||
Line 116: | Line 114: | ||
}</source> | }</source> | ||
[[Category:Source 2|V]] | |||
[[Category:File formats|V]] | |||
[[Category:Files|V]] | |||
[[Category:VMDL|V]] | |||
[[Category: | |||
[[Category: |
Latest revision as of 01:27, 3 October 2024
A file with the VMDL extension is a content-side text file that the tools can compile to make a game-side binary file (VMDL_C).
When a model is saved in Model Editor, it writes out the VMDL file with the new changes, and the tools notice the change and then compiles the model.
Element reference
- Animation
- Attachments
- Hitboxes
- Internal External References
- LodGroup
- MaterialGroups
- MaterialRemap
- Mesh
- MeshGroup
- PhysicsMesh
Notes
- The first line that defines the schema text is the same in every VMDL, it is not a unique ID for the file or anything of that nature.
- Filepaths in the VMDL are always relative to the content directory of the current game.
- Elements with
Reference
in their name can either be internal, or have a reference to an external file path. - A VMDL can be compiled without all the fields being present. This example will compile as a simple static prop:
<!-- schema text {7e125a45-3d83-4043-b292-9e24f8ef27b4} generic {198980d8-3a93-4919-b4c6-dd1fb07a3a4b} -->
CVModel CVModel_0
{
CVmeshList m_meshList = CVmeshList
{
CVmesh[] m_meshList =
[
CVmesh
{
string m_meshName = "test"
string m_meshFile = "models/test/dmx/mesh/test.dmx"
}
]
}
}
Larger example
An empty VMDL file looked like this:
<!-- schema text {7e125a45-3d83-4043-b292-9e24f8ef27b4} generic {198980d8-3a93-4919-b4c6-dd1fb07a3a4b} -->
CVModel CVModel_0
{
CVmeshList m_meshList = CVmeshList
{
CVmesh[] m_meshList =
[
]
}
CVphysicsMeshList m_physicsMeshList = CVphysicsMeshList
{
CVphysicsMesh[] m_meshList =
[
]
}
CVmodelInfo* m_pModelInfo = NULL
CVhitBoxSetListReference[] m_pHitBoxSetLists =
[
]
CVattachmentListReference[] m_pAttachmentLists =
[
]
CVanimGroupReference[] m_pAnimGroups =
[
]
CVNodeMaterialGroupListReference m_pMaterialGroupList = CVNodeMaterialGroupListReference
{
NodeMaterialGroupList_t* m_pObject = NULL
string m_sFileName = ""
}
CVMeshGroupListReference m_pMeshGroupList = CVMeshGroupListReference
{
MeshGroupList_t* m_pObject = NULL
string m_sFileName = ""
}
CVLODGroupListReference m_pLodGroupList = CVLODGroupListReference
{
LODGroupList_t* m_pObject = NULL
string m_sFileName = ""
}
CVpropBreakableListReference m_pPropBreakableList = CVpropBreakableListReference
{
CVpropBreakableList* m_pObject = NULL
string m_sFileName = ""
}
CVpropDataListReference m_pPropDataList = CVpropDataListReference
{
CVpropDataList* m_pObject = NULL
string m_sFileName = ""
}
CVConstraintListReference[] m_pConstraintLists =
[
]
string m_collision = ""
string m_sMDLFilename = ""
string[] m_scriptFiles =
[
]
CVMaterialRemapList* m_pMaterialRemapList = NULL
float m_flFbxScale = 1.000000
}