MDL (GoldSrc): Difference between revisions
Jump to navigation
Jump to search

Important:Older versions of StudioMDL, including the version found in the
Half-Life SDK on Steam, do not support tiling UVs, clamping them to the edge of the texture. This is not a limitation of the HLMDL file format; the Sven Co-Op StudioMDL can create MDLs compatible with vanilla
GoldSrc which have tiled UVs.
Tip:To create a model or submodel with more than 4080 tris, split the model into multiple SMD meshes, with a separate $body or $bodygroup entry for each mesh in the QC file.
Template:ModernWarning
Confirm:Max textures, and max skins?
SirYodaJedi (talk | contribs) mNo edit summary |
SirYodaJedi (talk | contribs) m (Add ref for max sane triangles) |
||
Line 26: | Line 26: | ||
{{modernImportant|Older versions of [[StudioMDL]], including the version found in the {{hlsdk|4.1}} on Steam, do not support tiling UVs, clamping them to the edge of the texture. ''This is not a limitation of the HLMDL file format''; the [https://www.the303.org/tutorials/gold_qc.htm#AS Sven Co-Op StudioMDL] can create MDLs compatible with vanilla {{Goldsrc|4.1}} which have tiled UVs. }} | {{modernImportant|Older versions of [[StudioMDL]], including the version found in the {{hlsdk|4.1}} on Steam, do not support tiling UVs, clamping them to the edge of the texture. ''This is not a limitation of the HLMDL file format''; the [https://www.the303.org/tutorials/gold_qc.htm#AS Sven Co-Op StudioMDL] can create MDLs compatible with vanilla {{Goldsrc|4.1}} which have tiled UVs. }} | ||
{{tip|To create a model or submodel with more than 4080 tris, split the model into multiple SMD meshes, with a separate {{cmd|$body}} or {{cmd|$bodygroup}} entry for each mesh in the [[QC]] file. | {{tip|To create a model or submodel with more than 4080 tris, split the model into multiple SMD meshes, with a separate {{cmd|$body}} or {{cmd|$bodygroup}} entry for each mesh in the [[QC]] file. | ||
{{modernWarning|'''''<big>Avoid going over 9000 tris!</big>'''''<br>While the HLMDL format can handle over 100K tris, the old OpenGL renderer struggles with such "high-poly" models, even on high-end GPUs. | {{modernWarning|'''''<big>Avoid going over 9000 tris!</big>'''''<br>While the HLMDL format can handle over 100K tris, the old OpenGL renderer struggles with such "high-poly" models, even on high-end GPUs.{{ref|1}} | ||
{{note|Third party games that upgrade the renderer (ex: {{cof}} or {{csnz}}) can handle higher polygon MDLs better. This does '''''not''''' include {{sven|4.1}}, which uses a mostly vanilla renderer.<br>This is obviously not a problem for games on engines newer than GoldSrc that use the HLMDL format, such as {{cloop|4.1}} ({{Unity}}) or {{freecs|4.1}} ({{fte}}). }} | {{note|Third party games that upgrade the renderer (ex: {{cof}} or {{csnz}}) can handle higher polygon MDLs better. This does '''''not''''' include {{sven|4.1}}, which uses a mostly vanilla renderer.<br>This is obviously not a problem for games on engines newer than GoldSrc that use the HLMDL format, such as {{cloop|4.1}} ({{Unity}}) or {{freecs|4.1}} ({{fte}}). }} | ||
{{modernConfirm|Is this soft limit 9000 total, or 9000 being displayed simultaneously?}} | {{modernConfirm|Is this soft limit 9000 total, or 9000 being displayed simultaneously?}} | ||
Line 41: | Line 41: | ||
== External links == | == External links == | ||
* [https://www.the303.org/tutorials/ The303's GoldSrc model tutorials and documentation] | * [https://www.the303.org/tutorials/ The303's GoldSrc model tutorials and documentation] | ||
== References == | |||
<ol> | |||
<li> From the [https://www.the303.org/tutorials/gold_mdl.htm GoldSrc Model Export Tutorial by The303]: | |||
{{quote | |||
| 1 = In order to compile models with more than 4080 triangles, you must break up your SMD's into parts and give them their own $body lines for compiling. '''Also, FOR THE LOVE OF ALL THAT IS HOLY PLEASE DO NOT GO CRAZY ON YOUR TRIANGLE COUNT; remember this is goldsrc, not source engine.''' Going any higher than 9000 tris is excessive and direct ports from source/other games are inefficent, wasteful, and cause performance issues for the old renderer. | |||
| 2 = The303 | |||
}} |
Revision as of 16:58, 24 August 2023


MDL (sometimes referred to as Half-Life MDL or HLMDL) is a model format used by GoldSrc to store dynamically lit models which can be animated using skeletal animation, along with their associated textures. It is a heavily modified version of the Quake MDL format.
Technical
Limits
HLMDL has the following limits per input SMD:
- 1 mesh
- 2048 vertices and vertex normals per mesh
- 4080 triangles per mesh
- 1 animation sequence
- 512 keyframes per sequence
- 128 bones
Additionally, the following limits apply to the whole MDL:
- 4 bone attachments
- 8 bone controllers
- 32 meshes across all submodels
- 256 animation sequences.
Textures must:
- Be 8-bit uncompressed BMP files.
- Have a resolution which is a multiple of 8 (multiples of 16 are preferred).
- Have a resolution which does not exceed 512x512 (soft limit; raised to 1024x1024 in
Sven Co-op and other engines like
FTE).
- Have a file name which is not longer than 64 characters (including the .bmp extension).





Structs
In other engines
Half-Life MDLs are supported by FTE and the
Unity game
Codename: Loop.
External links
References
- From the GoldSrc Model Export Tutorial by The303:
In order to compile models with more than 4080 triangles, you must break up your SMD's into parts and give them their own $body lines for compiling. Also, FOR THE LOVE OF ALL THAT IS HOLY PLEASE DO NOT GO CRAZY ON YOUR TRIANGLE COUNT; remember this is goldsrc, not source engine. Going any higher than 9000 tris is excessive and direct ports from source/other games are inefficent, wasteful, and cause performance issues for the old renderer.— The303