Skip to content
View in the app

A better way to browse. Learn more.

ResHax

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.
Help us keep the site running.

[PS2] Tenchu: Fatal Shadows 3D Models

Featured Replies

  • Localization

I'd like to be able to modify the 3D models in this game, but to do that I need to be able to extract and import them.

So far, what I've noticed is that their header is always (54 67 4D 44) [TgMD],

the animations always seem to have the header (4B 4D 44 73 71) [KMDsq],

while the textures are basically TM2 with the header (4B 32 54 78 80 00 00 00 80 00 01 00 80) [K2Tx€] located at the end of the model.

It seems quite simple and organized, but so far no program I've tested has even been able to read it.

What I also know about the game is that the models were made in Softimage, and the engine seems to be a custom Renderware engine; I imagine the model is designed to take advantage of the PS2's fast memory. I don't know if there's an easy way to edit them in Blender or another program, but if anyone can help in any way they can, I would appreciate it.

 

Here is one model of the game.

Tenchu PS2.zip

  • 2 weeks later...
  • Author
  • Localization

There's a PSP game in the same series that uses a similar 3D model format, but it's simpler, so it might be easier to visualize things in them.

Tenchu PSP.zip

I couldn't find the UVs.

Tenchu PSP.png

  • Supporter

Same here with the uvs. Will try again tomorrow. Good night, Reh!

edit: I see you got a proper fake mesh using a reduced set of vertices (upps, it's PSP)

edit2: uvs are not obvious; checked for HF or wordUV at pos (FVFsize-8) for example at no avail

 

Tenchu PSP head.png

pants.png

Edited by shak-otay

  • Author
  • Localization
17 hours ago, shak-otay said:

Same here with the uvs. Will try again tomorrow. Good night, Reh!

edit: I see you got a proper fake mesh using a reduced set of vertices (upps, it's PSP)

edit2: uvs are not obvious; checked for HF or wordUV at pos (FVFsize-8) for example at no avail

 

Tenchu PSP head.png

pants.png

I tried ripping the model using Ninja Ripper, but it didn't come out in T-pose and there's no way to insert it back. However, using Noesis, specifically the Data Viewer, some model data appears, perhaps that will help. I also have the PS2 model ripped aswell.

noesis.PNG

RIKIMARU.fbm.zip ps2.zip

  • Supporter

I was analyzing PS2 file, There are a lot of kmd blocks, it seems like those are the meshes(with submeshes) but with 2 different formats. Some use shorts(kmds) and other use floats(kmdp), I cut all kmdp blocks and used MR, those are part of the face and the hands. The first part of the file is like a table with pointers to meshes and textures:
 

54 67 4D 44 90 01 00 00 FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF 80 DA 01 00 
FF FF FF FF FF FF FF FF F0 E3 01 00 10 24 02 00 
30 64 02 00 50 A4 02 00 70 E4 02 00 90 24 03 00 
B0 64 03 00 D0 A4 03 00 FF FF FF FF F0 E4 03 00 
A0 34 04 00 50 84 04 00 00 D4 04 00 B0 23 05 00 
60 73 05 00 FF FF FF FF FF FF FF FF FF FF FF FF 
10 C3 05 00 50 32 06 00 90 A1 06 00 D0 10 07 00 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF 10 80 07 00 C0 EA 07 00 70 55 08 00 
20 C0 08 00 FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF 20 F1 09 00 70 03 0E 00 
D0 2A 09 00 C0 4B 09 00 D0 69 09 00 FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF A0 7F 09 00 
0B 00 00 00 C0 9B 09 00 FF FF FF FF FF FF FF FF 
FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

Groups of pointers separated by FF FF FF.... bytes. First 4 bytes magic 54 67 4D 44(TgMD), then the first mesh at 0x190, then FF FF FF FF... more pointers, FF FF FF FF... more pointers, etc. But there is something weird with those kmds meshes, they have more UVs than vertices, I don't know why... This is my research so far, I hope it helps.

Tenchu_ps2_kmdp.PNG

Edited by roocker666

  • Supporter
3 hours ago, roocker666 said:

 But there is something weird with those kmds meshes, they have more UVs than vertices, I don't know why...

Sometimes there's a 2nd uv channel. Do you mean that?

(In another case one could also double special vertices to get the same amount like uvs but I forgot how to do that... iterate through faces, somehow.

edit: found it, answer from Daniol Dan, ""thus each vertex has its own single UV coord""

Not sure whether this will apply to your problem, though.

Edited by shak-otay

  • Supporter
9 hours ago, shak-otay said:

Sometimes there's a 2nd uv channel. Do you mean that?

Wait, I think I did something wrong, lol. I can see other unknow block or buffer before UVs. I thought that was the start of UVs but no! So Uvs have the same count as verts after all. The format is:
verts/normals buffer: 3 shorts verts, 1 short flag, 3 shorts normals, 1 short flag.
unk buffer: ??
UVs buffer: 2 shorts UVs, 4 bytes unk(maybe vertex colors?)


Well, it looks like that but I am not sure. About the meshes with floats is:
verts/normals buffer: 3 floats verts, 1 short flag, 1 short pad, 3 floats normals, 1 short flag, 1 short pad
UVs buffer: 2 shorts UVs, 4 bytes unk(maybe vertex colors?)
So meshes with floats don't have that unk buffer.

And like always, each buffer has a 4 bytes tag, Here is the last part of the 1st submesh, you cn see that unk buffer before UVs:
 

Tenchu_ps2-mesh1_sunmesh1.png

  • Author
  • Localization
10 hours ago, shak-otay said:

Sometimes there's a 2nd uv channel. Do you mean that?

(In another case one could also double special vertices to get the same amount like uvs but I forgot how to do that... iterate through faces, somehow.

edit: found it, answer from Daniol Dan, ""thus each vertex has its own single UV coord""

Not sure whether this will apply to your problem, though.

I wanted some way to modify it, but it's okay if there isn't an easy way to do it

 

4 minutes ago, roocker666 said:

Wait, I think I did something wrong, lol. I can see other unknow block or buffer before UVs. I thought that was the start of UVs but no! So Uvs have the same count as verts after all. The format is:
verts/normals buffer: 3 shorts verts, 1 short flag, 3 shorts normals, 1 short flag.
unk buffer: ??
UVs buffer: 2 shorts UVs, 4 bytes unk(maybe vertex colors?)


Well, it looks like that but I am not sure. About the meshes with floats is:
verts/normals buffer: 3 floats verts, 1 short flag, 1 short pad, 3 floats normals, 1 short flag, 1 short pad
UVs buffer: 2 shorts UVs, 4 bytes unk(maybe vertex colors?)
So meshes with floats don't have that unk buffer.

And like always, each buffer has a 4 bytes tag, Here is the last part of the 1st submesh, you cn see that unk buffer before UVs:
 

Tenchu_ps2-mesh1_sunmesh1.png

From what I see in the PS2 model, it's separated into parts, and when ripped directly from the game using Ninja Ripper, it's possible to erase some details, revealing, for example, the arms (covered by a type of armor) and the neck by removing the scarf. If its too complicated to edit the model or do anything, that's fine, im hoping to at least have a better way to extract them without using Ninja Ripper. It still would help alot.

  • Author
  • Localization
41 minutes ago, roocker666 said:

Wait, I think I did something wrong, lol. I can see other unknow block or buffer before UVs. I thought that was the start of UVs but no! So Uvs have the same count as verts after all. The format is:
verts/normals buffer: 3 shorts verts, 1 short flag, 3 shorts normals, 1 short flag.
unk buffer: ??
UVs buffer: 2 shorts UVs, 4 bytes unk(maybe vertex colors?)


Well, it looks like that but I am not sure. About the meshes with floats is:
verts/normals buffer: 3 floats verts, 1 short flag, 1 short pad, 3 floats normals, 1 short flag, 1 short pad
UVs buffer: 2 shorts UVs, 4 bytes unk(maybe vertex colors?)
So meshes with floats don't have that unk buffer.

And like always, each buffer has a 4 bytes tag, Here is the last part of the 1st submesh, you cn see that unk buffer before UVs:
 

Tenchu_ps2-mesh1_sunmesh1.png

The game has a debug mode, maybe this will help in some way.

Tenchu_Fatal_Shadows_-_Debugdisplay.png

Tenchu_Fatal_Shadows_-_Debugmenu2.png

Edited by hohenheim

  • Supporter
10 minutes ago, hohenheim said:

I wanted some way to modify it, but it's okay if there isn't an easy way to do it

 

From what I see in the PS2 model, it's separated into parts, and when ripped directly from the game using Ninja Ripper, it's possible to erase some details, revealing, for example, the arms (covered by a type of armor) and the neck by removing the scarf. If its too complicated to edit the model or do anything, that's fine, im hoping to at least have a better way to extract them without using Ninja Ripper. It still would help alot.

Ninja ripper works but not always, the best way is to extract models from game files. Now, each of those KMDs blocks have a skeleton(I don't know why you need so many, that is weird), I cut the first KMDs at 0x190 and this is part of the header(see image below). Now we need to analyze mesh headers of KMDs and KMDp. It seems like KMDp header is more easy to undersntand. I will try to analize both later.

KMDs header.png

  • 4 months later...
  • Author
  • Localization
On 12/19/2025 at 5:13 PM, roocker666 said:

Ninja ripper works but not always, the best way is to extract models from game files. Now, each of those KMDs blocks have a skeleton(I don't know why you need so many, that is weird), I cut the first KMDs at 0x190 and this is part of the header(see image below). Now we need to analyze mesh headers of KMDs and KMDp. It seems like KMDp header is more easy to undersntand. I will try to analize both later.

KMDs header.png

Hey, it's been a while, were you able to figure out how to read the model?

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.