but you didn't ever do - did you?Bogus wrote:this format is difficult but I'll try to write an importer
The Forum is up for sale: XeNTaX Forum looking for new owner
Pure demo .model files
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Pure demo .model files
Here I am again - the rider of dead horses. I really don't know why I didn't use half floats that time, as suggested by finale00.
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Pure demo .model files
I am trying to read this file too, so far I did a parser based on the information in your screenshot. But I cant figure out the pattern in them. Did you get the model by trial and error? The only thing I notice is that the file has an 8 bytes header with the first 4 bytes always set to 05,00,00,00 in every .model file of the game, but cant figure out what the next 4 bytes are since they all change.
Re: Pure demo .model files
Do you have the source for it? Or any .model documentation? I need to implement it inside my own ModelViewer that uses my own engine. I am trying to get into this reverse engineering field and I am having troubles as beginner
Re: Pure demo .model files
I realized that the indices always tell the first face as the bytes 0000,0001,0002 so I look up for the first appearance of magic number
And I can get the starting address of the indices.
But I cant tell if the amount of vertices and indices is given by a sentinel value or a particular offset from the weird header values. So far I couldnt find any value of the vertices count or indices count I have
Code: Select all
uint64_t 0x1000200010000
But I cant tell if the amount of vertices and indices is given by a sentinel value or a particular offset from the weird header values. So far I couldnt find any value of the vertices count or indices count I have
Re: Pure demo .model files
Doing the same process as above I could find that there are two times this happens in a LOD1 file but this does not ocurre in a LOD3 file so this is a hack but I can use the second magic number address that happens after the indices address and substract the last one from the new address and divide that by 2 (the uint16 size) and get the amount of indices to read
Re: Pure demo .model files
Nevermind, the process above breaks with a lot of other models so it wont work. I'll try to come up with another idea
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Pure demo .model files
This is what I used for the Swingarm_01_LOD1 (strangely it's different from the model in my post as of Dec 07, 2015 3:50 pm,
maybe because it's an axle):
. (Couldn't find the FI count of mesh 1 (1062 dec.) in the data.)
btw: please, don't create a post for every sentence. You can edit your posts...
edit: I assume CommonInventory.bin contains the parts that are common for all vehicles:
Code: Select all
0 VER 1
1 48
2 FRAME
3 1
4 FRAME_LOD
5 ..L.
6 FGUARD
7 1
8 FRAMEGUARD_LOD
9 .M..
10 SKIDPLATE
11 0
12 BUMPER
13 0
14 BOOST_BOTTLE
15 0
16 ENGINE
17 1
18 ENGINE_LOD
19 ..L.
20 EXHAUST
21 0
22 FARING_BODY
23 0
24 FARING_MUDGUARD_FRONT_LEFT
25 0
26 FARING_MUDGUARD_FRONT_RIGHT
27 0
28 FARING_MUDGUARD_REAR
29 0
30 FARING_NOSECONE
31 0
32 FARING_RADIATORGUARD
33 0
34 SEAT
35 0
36 HANDLEBARS
37 1
38 HANDLEBARS_LOD
39 ..L.
40 GRIPS
41 0
42 HANDGUARDS
43 0
44 NERFBAR
45 0
46 LEFT_A_UARM
47 0
48 LEFT_A_LARM
49 1
50 A_ARM_LOD
51 .ML.
52 LEFT_A_SARM
53 0
54 LEFT_A_HUB
55 0
56 LEFT_A_BRAKE
57 0
58 LEFT_A_SPRING
59 0
60 LEFT_A_DAMPER
61 0
62 FRONT_LEFT_WHEEL_RIM
63 0
64 FRONT_LEFT_WHEEL_TIRE
65 1
66 WHEELS_LOD
67 ..L.
68 RIGHT_A_UARM
69 0
70 RIGHT_A_LARM
71 1
72 A_ARM_LOD
73 .ML.
74 RIGHT_A_SARM
75 0
76 RIGHT_A_HUB
77 0
78 RIGHT_A_BRAKE
79 0
80 RIGHT_A_SPRING
81 0
82 RIGHT_A_DAMPER
83 0
84 FRONT_RIGHT_WHEEL_RIM
85 0
86 FRONT_RIGHT_WHEEL_TIRE
87 1
88 WHEELS_LOD
89 ..L.
90 SWINGARM
91 0
92 SPROCKET
93 0
94 CHAIN
95 0
96 REAR_AXLE
97 0
98 REAR_BRAKE_DISC
99 0
100 REAR_BRAKE_CALIPER
101 0
102 REAR_SPRING
103 0
104 REAR_DAMPER
105 0
106 REAR_LEFT_WHEEL_RIM
107 0
108 REAR_LEFT_WHEEL_TIRE
109 1
110 WHEELS_LOD
111 ..L.
112 REAR_RIGHT_WHEEL_RIM
113 0
114 REAR_RIGHT_WHEEL_TIRE
115 1
116 WHEELS_LOD
117 ..L.Code: Select all
0 VER 1
1 48
2 FRAME
3 5
4 FRAME_01
5 HM..
6 FRAME_02
7 HM..
8 FRAME_03
9 HM..
10 FRAME_04
11 HM..
12 FRAME_99
13 HML.
14 FGUARD
15 7
16 FRAMEGUARD_01
17 H...
18 FRAMEGUARD_02
19 H...
20 FRAMEGUARD_03
21 H...
22 FRAMEGUARD_04
23 H...
24 FRAMEGUARD_05
25 H...
26 FRAMEGUARD_98
27 HML.
28 FRAMEGUARD_99
29 HML.
30 SKIDPLATE
31 0
32 BUMPER
33 11
34 BUMPER_01
35 HMLP
36 BUMPER_02
37 HMLP
38 BUMPER_03
39 HMLP
40 BUMPER_04
41 HMLP
42 BUMPER_05
43 HMLP
44 BUMPER_06
45 HMLP
46 BUMPER_07
47 HMLP
48 BUMPER_08
49 HMLP
50 BUMPER_09
51 HMLP
52 BUMPER_10
53 HMLP
54 BUMPER_99
55 HML.
56 BOOST_BOTTLE
57 2
58 BOOST_BOTTLE_01
59 HM..
60 BOOST_BOTTLE_02
61 HM..
62 ENGINE
63 5
64 ENGINE_01
65 HM.P
66 ENGINE_02
67 HM.P
68 ENGINE_03
69 HM.P
70 ENGINE_04
71 HM.P
72 ENGINE_05
73 HM.P
74 EXHAUST
75 0
76 FARING_BODY
77 11
78 FARING_01_PARTS_01
79 HML.
80 FARING_02_PARTS_01
81 HML.
82 FARING_03_PARTS_01
83 HML.
84 FARING_04_PARTS_01
85 HML.
86 FARING_05_PARTS_01
87 HML.
88 FARING_06_PARTS_01
89 HML.
90 FARING_07_PARTS_01
91 HML.
92 FARING_08_PARTS_01
93 HML.
94 FARING_09_PARTS_01
95 HML.
96 FARING_10_PARTS_01
97 HML.
98 FARING_99_PARTS_01
99 HML.
100 FARING_MUDGUARD_FRONT_LEFT
101 55
102 FARING_01_PARTS_01
103 HML.
104 FARING_01_PARTS_02
105 HML.
106 FARING_01_PARTS_03
107 HML.
108 FARING_01_PARTS_04
109 HML.
110 FARING_01_PARTS_05
111 HML.
112 FARING_02_PARTS_01
113 HML.
114 FARING_02_PARTS_02
115 HML.
116 FARING_02_PARTS_03
117 HML.
118 FARING_02_PARTS_04
119 HML.
120 FARING_02_PARTS_05
121 HML.
122 FARING_03_PARTS_01
123 HML.
124 FARING_03_PARTS_02
125 HML.
126 FARING_03_PARTS_03
127 HMLP
128 FARING_03_PARTS_04
129 HML.
130 FARING_03_PARTS_05
131 HM..
132 FARING_04_PARTS_01
133 HML.
134 FARING_04_PARTS_02
135 HML.
136 FARING_04_PARTS_03
137 HML.
138 FARING_04_PARTS_04
139 HML.
140 FARING_04_PARTS_05
141 HML.
142 FARING_05_PARTS_01
143 HML.
144 FARING_05_PARTS_02
145 HML.
146 FARING_05_PARTS_03
147 HML.
148 FARING_05_PARTS_04
149 HML.
150 FARING_05_PARTS_05
151 HML.
152 FARING_06_PARTS_01
153 HML.
154 FARING_06_PARTS_02
155 HML.
156 FARING_06_PARTS_03
157 HMLP
158 FARING_06_PARTS_04
159 HML.
160 FARING_06_PARTS_05
161 HML.
162 FARING_07_PARTS_01
163 HML.
164 FARING_07_PARTS_02
165 HML.
166 FARING_07_PARTS_03
167 HML.
168 FARING_07_PARTS_04
169 HML.
170 FARING_07_PARTS_05
171 HML.
172 FARING_08_PARTS_01
173 HML.
174 FARING_08_PARTS_02
175 HML.
176 FARING_08_PARTS_03
177 HML.
178 FARING_08_PARTS_04
179 HML.
180 FARING_08_PARTS_05
181 HML.
182 FARING_09_PARTS_01
183 HML.
184 FARING_09_PARTS_02
185 HML.
186 FARING_09_PARTS_03
187 HML.
188 FARING_09_PARTS_04
189 HML.
190 FARING_09_PARTS_05
191 HML.
192 FARING_10_PARTS_01
193 HML.
194 FARING_10_PARTS_02
195 HML.
196 FARING_10_PARTS_03
197 HML.
198 FARING_10_PARTS_04
199 HML.
200 FARING_10_PARTS_05
201 HML.
202 FARING_99_PARTS_01
203 HML.
204 FARING_99_PARTS_02
205 HML.
206 FARING_99_PARTS_03
207 HML.
208 FARING_99_PARTS_04
209 HML.
210 FARING_99_PARTS_05
211 HML.
212 FARING_MUDGUARD_FRONT_RIGHT
213 55
214 FARING_01_PARTS_01
215 HML.
216 FARING_01_PARTS_02
217 HML.
218 FARING_01_PARTS_03
219 HML.
220 FARING_01_PARTS_04
221 HML.
222 FARING_01_PARTS_05
223 HML.
224 FARING_02_PARTS_01
225 HML.
226 FARING_02_PARTS_02
227 HML.
228 FARING_02_PARTS_03
229 HML.
230 FARING_02_PARTS_04
231 HML.
232 FARING_02_PARTS_05
233 HML.
234 FARING_03_PARTS_01
235 HML.
236 FARING_03_PARTS_02
237 HML.
238 FARING_03_PARTS_03
239 HMLP
240 FARING_03_PARTS_04
241 HML.
242 FARING_03_PARTS_05
243 HM..
244 FARING_04_PARTS_01
245 HML.
246 FARING_04_PARTS_02
247 HML.
248 FARING_04_PARTS_03
249 HML.
250 FARING_04_PARTS_04
251 HML.
252 FARING_04_PARTS_05
253 HML.
254 FARING_05_PARTS_01
255 HML.
256 FARING_05_PARTS_02
257 HML.
258 FARING_05_PARTS_03
259 HML.
260 FARING_05_PARTS_04
261 HML.
262 FARING_05_PARTS_05
263 HML.
264 FARING_06_PARTS_01
265 HML.
266 FARING_06_PARTS_02
267 HML.
268 FARING_06_PARTS_03
269 HMLP
270 FARING_06_PARTS_04
271 HML.
272 FARING_06_PARTS_05
273 HML.
274 FARING_07_PARTS_01
275 HML.
276 FARING_07_PARTS_02
277 HML.
278 FARING_07_PARTS_03
279 HML.
280 FARING_07_PARTS_04
281 HML.
282 FARING_07_PARTS_05
283 HML.
284 FARING_08_PARTS_01
285 HML.
286 FARING_08_PARTS_02
287 HML.
288 FARING_08_PARTS_03
289 HML.
290 FARING_08_PARTS_04
291 HML.
292 FARING_08_PARTS_05
293 HML.
294 FARING_09_PARTS_01
295 HML.
296 FARING_09_PARTS_02
297 HML.
298 FARING_09_PARTS_03
299 HML.
300 FARING_09_PARTS_04
301 HML.
302 FARING_09_PARTS_05
303 HML.
304 FARING_10_PARTS_01
305 HML.
306 FARING_10_PARTS_02
307 HML.
308 FARING_10_PARTS_03
309 HML.
310 FARING_10_PARTS_04
311 HML.
312 FARING_10_PARTS_05
313 HML.
314 FARING_99_PARTS_01
315 HML.
316 FARING_99_PARTS_02
317 HML.
318 FARING_99_PARTS_03
319 HML.
320 FARING_99_PARTS_04
321 HML.
322 FARING_99_PARTS_05
323 HML.
324 FARING_MUDGUARD_REAR
325 55
326 FARING_01_PARTS_01
327 HML.
328 FARING_01_PARTS_02
329 HML.
330 FARING_01_PARTS_03
331 HML.
332 FARING_01_PARTS_04
333 HML.
334 FARING_01_PARTS_05
335 HML.
336 FARING_02_PARTS_01
337 HML.
338 FARING_02_PARTS_02
339 HML.
340 FARING_02_PARTS_03
341 HML.
342 FARING_02_PARTS_04
343 HML.
344 FARING_02_PARTS_05
345 HML.
346 FARING_03_PARTS_01
347 HML.
348 FARING_03_PARTS_02
349 HML.
350 FARING_03_PARTS_03
351 HMLP
352 FARING_03_PARTS_04
353 HML.
354 FARING_03_PARTS_05
355 HML.
356 FARING_04_PARTS_01
357 HML.
358 FARING_04_PARTS_02
359 HML.
360 FARING_04_PARTS_03
361 HML.
362 FARING_04_PARTS_04
363 HML.
364 FARING_04_PARTS_05
365 HML.
366 FARING_05_PARTS_01
367 HML.
368 FARING_05_PARTS_02
369 HML.
370 FARING_05_PARTS_03
371 HML.
372 FARING_05_PARTS_04
373 HML.
374 FARING_05_PARTS_05
375 HML.
376 FARING_06_PARTS_01
...[Code]You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Pure demo .model files
A little bit tedious to collect all parts of a model (stopped it after 11, wheel and rim count as 2):
.
.
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Pure demo .model files
Oh my bad I'll have it in mind next time. Thank you for the advice. I am new to the forums.
Hmm it didn't occurred to me look in other files for the info. Last night I tried to find some info in the executable, but I could not debug it since it crashed IDA.
Wow! You got pretty far. I am trying to create a parser that parse all of them so I don't have to figure it out for every part but is becoming difficult.
If you dont mind me asking, how do you make hex2obj show you the model as you do in your screenshots?
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Pure demo .model files
Cool.
Do it step by step. Feel free to ask - sometimes I can help...but is becoming difficult.
It's a modified source of Szymon Rusinkiewicz's mesh_viewer. Afaics it's part of Trimesh2 now:if you dont mind me asking, how do you make hex2obj show you the model as you do in your screenshots?
https://github.com/jrock08/Trimesh2
btw: these are the "common parts"; as you can see, axles are missing (and more):
.
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
Re: Pure demo .model files
I have been reading the disassembly and found the model loading bit. The downside is that most of it looks like calling functions dynamically as it every part of the model need a specific function or maybe the disassembler did something wrong. I am not an expert so I will have to come up with a pretty rough solution.
Yes, there are some parts that are common, mostly LODs for the far view like the LOD3 of the engine and handlebars.
The interesting parts are in the "Parts" folder.
It seems like the .model have material information, maybe also the textures itself(Edit: textures are more likely in the Vehicles.textures file) given that the correctly parsed files left a lot of bytes uncovered.
I'll keep updating my results
Yes, there are some parts that are common, mostly LODs for the far view like the LOD3 of the engine and handlebars.
The interesting parts are in the "Parts" folder.
It seems like the .model have material information, maybe also the textures itself(Edit: textures are more likely in the Vehicles.textures file) given that the correctly parsed files left a lot of bytes uncovered.
I'll keep updating my results
- shakotay2
- MEGAVETERAN

- Posts: 4231
- Joined: Fri Apr 20, 2012 9:24 am
- Location: Nexus, searching for Jim Kirk
- Has thanked: 1139 times
- Been thanked: 2222 times
Re: Pure demo .model files
Yes, from a quick glance there's 227 dds files contained:
Code: Select all
0 TUBE_CHROME_SPEC [77d55485]
1 PEGS_GENERIC [df2e3896]
2 PEGS_GENERIC_SPEC [1d30781]
...
224 N_Grip_04_YELLOW [dbcc829f]
225 N_Grip_04_ORANGE [fab9cd0f]
226 N_Grip_04_GREEN [0]First texture:
.
You do not have the required permissions to view the files attached to this post.
Tuts: a) Bigchillghost, viewtopic.php?f=29&t=17889
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
b) Extracting simple models: http://forum.xentax.com/viewtopic.php?f=29&t=10894
"Quoting the whole thing. Would u ever stop this nonsense?"
- Durik256
- ultra-veteran

- Posts: 425
- Joined: Wed Nov 21, 2018 7:26 pm
- Has thanked: 45 times
- Been thanked: 411 times
Re: Pure demo .model files
Pure model viewer

(open or drag&drop *.model/ *.obj)

(open or drag&drop *.model/ *.obj)
You do not have the required permissions to view the files attached to this post.
Re: Pure demo .model files
The pureviewer has a timeout on a license for an obfuscator which make it impossible to execute the viewer.
