-
Notifications
You must be signed in to change notification settings - Fork 0
/
MDL.html
152 lines (128 loc) · 6.72 KB
/
MDL.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Cache-Control" content="no-store" />
<link rel="stylesheet" href="./styles/styles.css">
<link rel="icon" type="image/x-icon" href="./img/QC.ico">
<script src="./scripts/script.js" defer></script>
<script src="./scripts/collapse.js" defer></script>
<title>QC Editing</title>
</head>
<body>
<header>
<div class="links">
<a href="index.html" class="links">home</a>
<a href="VDF.html" class="links, VDF_NAV">VDF</a>
</div>
<h1 class="menu">What is the MDL format?</h1>
<!--╠══════════════ DIDN'T FREAKING WORK!!═══════════════════════╣
<button type="button" class="collapsible">
<p class="links">VDF</p>
</button>
<div class="content">
<a href="VDF.html" class="links">VDF Language</a>
</div>
-->
</header>
<main>
<pre class="par">
While an MDL file may have been used by MANY programs from the 90's and early 2000's, The focus here is Valve's MDL format for Gold-source. An MDL file Consists of 3 files:
</pre>
<ul>
<li>".QC" (<b>Q</b>.uake <b>C</b>) A script file that compiles SMD files, assigns animation SMD's and locates textures. </li>
<p class="desc">static (non-animated) QC template</p>
<pre class="smple">
$modelname Cube.mdl
$cd "./"
$scale 1
$cliptotextures
// reference mesh
$body studio cube
// Animation
$sequence "static" "cube"
</pre>
<a href="./MDL/QC.html" class="info">more on QC scripting</a>
<li>".SMD" (<b>S</b>.tudio <b>M</b>.DL <b>D</b>.ata) A three dimensional model file used by the Source and Gold-source engine, it is stored in an ASCII text format, However it should be noted that technically there are <b>2</b> SMD types: Model data and animation data</li>
<p class="desc">Example SMD (src file name: <a href="assets/cube.smd" target="_blank">Cube.smd</a>*)</p>
<pre class="smple">
version 1
nodes
0 "root" -1
end
skeleton
time 0
0 0 0 0 0 0 0
end
triangles
mat.bmp
0 1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 0.000000 1.000000
0 1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000 0.000000 0.666667
0 -1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000 0.333333 0.666667
mat.bmp
0 1.000000 0.999999 1.000000 0.000000 0.000000 1.000000 1.000000 0.333333
0 -1.000000 1.000000 1.000000 0.000000 0.000000 1.000000 1.000000 0.666667
0 -1.000000 -1.000000 1.000000 0.000000 0.000000 1.000000 0.666667 0.666667
mat.bmp
0 1.000000 1.000000 -1.000000 1.000000 -0.000001 -0.000000 1.000000 0.333333
0 1.000000 0.999999 1.000000 1.000000 -0.000001 -0.000000 0.666667 0.333333
0 0.999999 -1.000001 1.000000 1.000000 -0.000001 -0.000000 0.666667 0.000000
mat.bmp
0 1.000000 -1.000000 -1.000000 -0.000000 -1.000000 -0.000000 0.333333 0.333333
0 0.999999 -1.000001 1.000000 -0.000000 -1.000000 -0.000000 0.333333 0.000000
0 -1.000000 -1.000000 1.000000 -0.000000 -1.000000 -0.000000 0.666667 0.000000
mat.bmp
0 -1.000000 -1.000000 -1.000000 -1.000000 0.000000 -0.000000 0.333333 0.666667
0 -1.000000 -1.000000 1.000000 -1.000000 0.000000 -0.000000 0.000000 0.666667
0 -1.000000 1.000000 1.000000 -1.000000 0.000000 -0.000000 0.000000 0.333333
mat.bmp
0 1.000000 0.999999 1.000000 0.000000 1.000000 0.000000 0.000000 0.000000
0 1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000 0.333333 0.000000
0 -1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000 0.333333 0.333333
mat.bmp
0 -1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 0.333333 1.000000
0 1.000000 1.000000 -1.000000 0.000000 0.000000 -1.000000 0.000000 1.000000
0 -1.000000 -1.000000 -1.000000 0.000000 0.000000 -1.000000 0.333333 0.666667
mat.bmp
0 0.999999 -1.000001 1.000000 0.000000 0.000000 1.000000 0.666667 0.333333
0 1.000000 0.999999 1.000000 0.000000 0.000000 1.000000 1.000000 0.333333
0 -1.000000 -1.000000 1.000000 0.000000 0.000000 1.000000 0.666667 0.666667
mat.bmp
0 1.000000 -1.000000 -1.000000 1.000000 -0.000000 0.000000 1.000000 0.000000
0 1.000000 1.000000 -1.000000 1.000000 -0.000000 0.000000 1.000000 0.333333
0 0.999999 -1.000001 1.000000 1.000000 -0.000000 0.000000 0.666667 0.000000
mat.bmp
0 -1.000000 -1.000000 -1.000000 -0.000000 -1.000000 0.000000 0.666667 0.333333
0 1.000000 -1.000000 -1.000000 -0.000000 -1.000000 0.000000 0.333333 0.333333
0 -1.000000 -1.000000 1.000000 -0.000000 -1.000000 0.000000 0.666667 0.000000
mat.bmp
0 -1.000000 1.000000 -1.000000 -1.000000 0.000000 -0.000000 0.333333 0.333333
0 -1.000000 -1.000000 -1.000000 -1.000000 0.000000 -0.000000 0.333333 0.666667
0 -1.000000 1.000000 1.000000 -1.000000 0.000000 -0.000000 0.000000 0.333333
mat.bmp
0 -1.000000 1.000000 1.000000 0.000000 1.000000 0.000000 0.000000 0.333333
0 1.000000 0.999999 1.000000 0.000000 1.000000 0.000000 0.000000 0.000000
0 -1.000000 1.000000 -1.000000 0.000000 1.000000 0.000000 0.333333 0.333333
end
</pre>
<a href="./MDL/SMD.html" class="info">more on the SMD file Structure</a>
<li>".BMP" (<b>B</b>it<b>m</b>a<b>p</b>), a fairly common image format but with <i>very</i> specific properties; an 8-bit indexed color format, meaning the Color pallete/range is embedded within the image instead of the OS providing the colors; and a maximum size of 512×512</li>
<img src="./img/Mat.bmp">
<p>An Image texture with the proper specifications <i>and</i> name that correlates with the SMD example above</p>
</ul>
<p>When these assets are compiled the end result is shown below:</p>
<img src="./img/cube.png">
<!--
".VMT" (<b>V</b>.alve <b>M</b>.aterial <b>T</b>.ype), and ".VTF" (<b>V</b>.alve <b>T</b>.exture <b>F</b>.ile).
-->
</main>
<br>
<br>
<footer>
<p>* Sourced from Blender's default Cube Exported as a Gold-source SMD**</p>
<p>** You can get the most recent version of the Blender Source tools <a href="http://steamreview.org/BlenderSourceTools/" target="_blank">Here</a></p>
</footer>
</body>
</html>