READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

PSX Silent Hill Model Format Help

Post questions about game models here, or help out others!
ReeceMix
advanced
Posts: 64
Joined: Sat Nov 10, 2007 3:01 pm
Has thanked: 6 times
Been thanked: 14 times

PSX Silent Hill Model Format Help

Post by ReeceMix » Fri Sep 27, 2013 12:33 pm

Using the fairly recent Silent Hills Tools pack blog/?cat=471 the archive .HILL file can be extracted into its directorys and base files. Im genuinely trying to learn about 3d model formats but if anyone would like to take a look it would be a big help. (Looking at the models in wireframe mode with epsxe i can tell that the map models are based on 8x8 square blocks)

A few Items are TMD that are openable with milkshape, Ive included them in the zip attached as a reference incase the other model formats are loosly based on TMD. Ive included two of each file IPD (map model) ILM (Char model) & PLM (Enemy Model)

Rename the SH Model formats.7z to SH Model formats.zip
You do not have the required permissions to view the files attached to this post.

Triangle90
ultra-n00b
Posts: 7
Joined: Tue Oct 29, 2013 9:32 am
Has thanked: 1 time
Been thanked: 5 times

Re: PSX Silent Hill Model Format Help

Post by Triangle90 » Wed Oct 30, 2013 5:03 am

Hello, This is my first post here.

I am also interested in getting these models into a readable format. Modding for Silent Hill 1 is pretty limited at the moment, mainly due to
a lack of documentation for the formats and tools that can actually edit the files.

The tools that were released are great, but it would be nice if we were able to view the models/maps of the game somehow.

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

Re: PSX Silent Hill Model Format Help

Post by shakotay2 » Wed Oct 30, 2013 9:57 am

IPD: strange format. Don't have a clue on the vertices.

When you start reading 378 face indices from 0x943 as big endian DWORDs (the first two bytes ignored)
in APU00FE.IPD there's a max index of 256.
But there are too many faces containing only even or only odd indices.
So they are very unlikely to be faces.

f 1 2 4
f 6 8 10
f 12 14 16
f 18 20 22
f 24 26 28
f 30 32 34
f 36 38 38
f 39 41 43
f 45 47 49
f 51 53 55
f 57 59 61
f 63 65 67
f 69 71 73
f 75 75 76
f 78 80 82
f 84 86 88
f 90 92 94
f 96 98 100
f 102 104 106
f 108 110 112
f 112 113 115
f 117 119 121
f 123 125 127
f 129 131 133
f 135 137 139
f 141 143 145
f 147 149 149
f 150 152 154
f 156 158 160
f 162 164 166
f 168 170 172
f 174 176 178
f 180 182 184
f 186 186 187
f 189 191 193
f 195 197 199
f 201 203 205
f 207 209 211
f 213 215 217
f 219 221 223
f 223 224 226
f 228 230 232
f 234 236 238
f 240 242 244
f 246 248 250
f 252 254 256
f 2 4 4
f 5 7 9
f 11 13 15
f 17 19 21
f 23 25 27
f 29 31 33
...

(If you read them as WORDs garbage seems to be generated:)
f 44 1 45
f 2 45 4
f 45 6 45
f 8 45 10
f 45 12 45
f 14 45 16
f 45 18 45
...
f 51 108 51
f 110 51 112
f 53 112 54
f 113 54 115
f 54 117 54
f 119 54 121
f 54 123 54
f 125 54 127
f 54 129 54
...

If someone could convert FOOK.TMD and UNQ60.TMD to obj using milkshape if possible
and upload them this might be helpful.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Triangle90
ultra-n00b
Posts: 7
Joined: Tue Oct 29, 2013 9:32 am
Has thanked: 1 time
Been thanked: 5 times

Re: PSX Silent Hill Model Format Help

Post by Triangle90 » Wed Oct 30, 2013 11:09 am

Wish I had a better grasp of this stuff, I'm still reading the DGTEFF. [roll]

Here are the converted .TMD files:

http://www.mediafire.com/?d389twlll1oge44

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

Re: PSX Silent Hill Model Format Help

Post by shakotay2 » Wed Oct 30, 2013 2:50 pm

Thx! :)

Well, now let's have a look at UNQ60.TMD, which appears to be a bottle from what is in the obj.

At 0x14c0 we find some regular patterns:

8E 00 12 01 00 00 00 00
64 00 12 01 64 00 00 00
64 00 1F 00 64 00 00 00
8E 00 1F 00 00 00 00 00
8E 00 C4 FF 00 00 00 00
26 00 3F FF 26 00 00 00
35 00 3F FF 00 00 00 00
4B 00 2A FF 00 00 00 00
4B 00 0C FF 00 00 00 00
35 00 0C FF 35 00 00 00
56 00 2B 01 56 00 00 00
00 00 12 01 8E 00 00 00
00 00 1F 00 8E 00 00 00
64 00 C4 FF 64 00 00 00
00 00 3F FF 35 00 00 00
35 00 2A FF 35 00 00 00
00 00 0C FF 4B 00 00 00
00 00 2B 01 7A 00 00 00
9C FF 12 01 64 00 00 00
9C FF 1F 00 64 00 00 00
00 00 C4 FF 8E 00 00 00
DA FF 3F FF 26 00 00 00
00 00 2A FF 4B 00 00 00
CB FF 0C FF 35 00 00 00
AA FF 2B 01 56 00 00 00
72 FF 12 01 00 00 00 00
72 FF 1F 00 00 00 00 00

Assuming this to be a vertices list as half floats (3x2= 6 bytes, so with an assumed VBSize of 8 we skip the 00 00 at lines' end) you'll get this:
# 0x14c0: verts= 135
v -0.000366 0.000733 0.000031
v 1024.000000 0.000733 1024.000000
v 1024.000000 0.006836 1024.000000
v -0.000366 0.006836 0.000031
v -0.000366 -4.996094 0.000031
v 0.023438 1.999023 0.023438
v 0.312500 1.999023 0.000031
v 14.000000 0.054657 0.000031
v 14.000000 0.000305 0.000031
v 0.312500 0.000305 0.312500
v 96.000000 0.054718 96.000000
v 0.000031 0.000733 -0.000366
v 0.000031 0.006836 -0.000366
v 1024.000000 -4.996094 1024.000000
v 0.000031 1.999023 0.312500
v 0.312500 0.054657 0.312500
v 0.000031 0.000305 14.000000
v 0.000031 0.054718 49152.000000
v -0.004879 0.000733 1024.000000
v -0.004879 0.006836 1024.000000
v 0.000031 -4.996094 -0.000366

As easily can be seen: this is not a bottle. :D

The sequential version looking better but still: no bottle.
# 0x14c0: verts= 135
v -0.000366 0.000733 0.000031
v 0.000031 1024.000000 0.000733
v 1024.000000 0.000031 1024.000000
v 0.006836 1024.000000 0.000031
v -0.000366 0.006836 0.000031
v 0.000031 -0.000366 -4.996094
v 0.000031 0.000031 0.023438
v 1.999023 0.023438 0.000031
v 0.312500 1.999023 0.000031
v 0.000031 14.000000 0.054657
v 0.000031 0.000031 14.000000
v 0.000305 0.000031 0.000031
v 0.312500 0.000305 0.312500
v 0.000031 96.000000 0.054718
v 96.000000 0.000031 0.000031
v 0.000733 -0.000366 0.000031
v 0.000031 0.006836 -0.000366
v 0.000031 1024.000000 -4.996094
v 1024.000000 0.000031 0.000031
v 1.999023 0.312500 0.000031
v 0.312500 0.054657 0.312500
v 0.000031 0.000031 0.000305
v 14.000000 0.000031 0.000031
v 0.054718 49152.000000 0.000031

(I would like to share a H2O file for hex2obj.exe but I had to some manual corrections.
That's the problem with some "crude" formats.)
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Triangle90
ultra-n00b
Posts: 7
Joined: Tue Oct 29, 2013 9:32 am
Has thanked: 1 time
Been thanked: 5 times

Re: PSX Silent Hill Model Format Help

Post by Triangle90 » Thu Jan 23, 2014 9:30 am

Bump! Has anyone had any luck with solving this?

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

Re: PSX Silent Hill Model Format Help

Post by shakotay2 » Thu Jan 23, 2014 12:40 pm

guess, you're on your own now.

For TMD you have an obj from Milkshape. So compare UNQ60.TMD
to the bottle UNQ60.obj (135 verts, 131 tex coords, 188 tris).

concerning the face indices it's just another "great" puzzle. :D

The vertices are fxxxing weird, too. For example interpreting them as words
(big endian) from 0x14C0 (with each 4th word 0000 skipped) this point cloud appears:
unq60_14C0_point_cloud.JPG
so not worth to mention (remember: it should look like a bottle!)

anyway - good luck...
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Triangle90
ultra-n00b
Posts: 7
Joined: Tue Oct 29, 2013 9:32 am
Has thanked: 1 time
Been thanked: 5 times

Re: PSX Silent Hill Model Format Help

Post by Triangle90 » Sun Jan 26, 2014 4:10 am

That's okay, I will probably need to learn more about 3d models anyway. Thank-you for your assistance. :)

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

Re: PSX Silent Hill Model Format Help

Post by shakotay2 » Tue Nov 11, 2014 6:08 pm

I had a last glimpse at TMD format when I realized that
there is a format description on Xentax (probably since ages).
But noone of this splendid forum gave a hint. Have to think about that.

Would have spared me tons of lifetime since the face indices simply to be read from the primitives.
Finally:
bottle_yeah.jpg
You do not have the required permissions to view the files attached to this post.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

ReeceMix
advanced
Posts: 64
Joined: Sat Nov 10, 2007 3:01 pm
Has thanked: 6 times
Been thanked: 14 times

Re: PSX Silent Hill Model Format Help

Post by ReeceMix » Sat Nov 15, 2014 12:22 pm

awesome stuff shakotay2,
Since my original post I started to remake the Ps1 silent hill city ..manually
Do you think it would be possible to whip up a QuickBMS script (or something) to make the TMDs compatible with milkshape?

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

Re: PSX Silent Hill Model Format Help

Post by shakotay2 » Sat Nov 15, 2014 4:32 pm

ReeceMix wrote:awesome stuff shakotay2,
well, I just used the format description from here:
http://wiki.xentax.com/index.php/Playstation_TMD
Since my original post I started to remake the Ps1 silent hill city ..manually
what does that mean exactly? Did you use existing 3D models?
Or did you build each model from scratch? (No, you didn't - did you? :D )
Do you think it would be possible to whip up a QuickBMS script (or something) to make the TMDs compatible with milkshape?
afaik can milkshape import TMDs.
There are about 10 types of possible primitives in TMDs.
So guess some are not handled by milkshape?

If you told me which TMDs can't be imported by milkshape I could have a look at.

In the TMDs search for 04030020 (olen = 0x04; ilen =0x03; flag =0x00; mode =0x20;)

or any other of the 9 patterns (06040030,... ,09080135) to know which type of primitives is contained in a TMD
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

AndrewSFX
ultra-n00b
Posts: 3
Joined: Thu Nov 27, 2014 3:26 pm
Has thanked: 1 time

Re: PSX Silent Hill Model Format Help

Post by AndrewSFX » Thu Nov 27, 2014 5:15 pm

Hi.
Perhaps it makes sense

to try getting 3d with a program like 3D-Ripper-DX
(or similar for GL) with emulator?

Maybe it's more easy way ?

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

Re: PSX Silent Hill Model Format Help

Post by shakotay2 » Thu Nov 27, 2014 7:35 pm

AndrewSFX wrote:Maybe it's more easy way ?
Maybe.

But with the format known it makes more sense to write some import code.
Without my question answered I won't give it a try:
If you told me which TMDs can't be imported by milkshape I could have a look at.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

ReeceMix
advanced
Posts: 64
Joined: Sat Nov 10, 2007 3:01 pm
Has thanked: 6 times
Been thanked: 14 times

Re: PSX Silent Hill Model Format Help

Post by ReeceMix » Thu Dec 04, 2014 7:53 pm

shakotay2 wrote:
ReeceMix wrote:awesome stuff shakotay2,
well, I just used the format description from here:
http://wiki.xentax.com/index.php/Playstation_TMD
Since my original post I started to remake the Ps1 silent hill city ..manually
shakotay2 wrote:what does that mean exactly? Did you use existing 3D models?
Or did you build each model from scratch? (No, you didn't - did you? :D )
I've started to build from scratch, when viewing Silent Hill in WireFrame mode it shows that the entire town is built on square grids , its pretty simple to just copy the original pattern, it also shows that each model is loaded on an 8x8 square grid (you can see where wireframe lines overlap every 8 squares
Image
I also created Xploder codes for epsxe to remove the fog and camera to get a better view of the models ingame

What I meant with the Quick BMS comment was really , can you make a TMD extractor? The TMDs that arnt stored in the 'silent' or 'hill' files (i forget which) are the ingame Items


As far as I know Epsxe doesnt work with 3D rippers because (like the original release of NullDC) it doesnt have a 'stereoscopic' plugin. Which means it cant grab 'depth' it just creates a flat 2D sheet of polygons (However this was about 5 years ago, things may have changed), It always seems best to follow the 'extraction' route

User avatar
shakotay2
MEGAVETERAN
MEGAVETERAN
Posts: 2666
Joined: Fri Apr 20, 2012 9:24 am
Location: Nexus, searching for Jim Kirk
Has thanked: 662 times
Been thanked: 1366 times

Re: PSX Silent Hill Model Format Help

Post by shakotay2 » Thu Dec 04, 2014 8:30 pm

ReeceMix wrote:What I meant with the Quick BMS comment was really , can you make a TMD extractor?
yep, but it would take me too much time to handle all ten different model types.
If you uploaded a model sample I could have a look at.
Bigchillghost, Reverse Engineering a Game Model: viewtopic.php?f=29&t=17889
extracting simple models: viewtopic.php?f=29&t=10894
Make_H2O-ForzaHor3-jm9.zip
"You quoted the whole thing, what a mess."

Post Reply