Jump to content

[PS2] Ichigeki Sacchuu HoiHoi-San model ripping: using triangle strips to generate model faces works! (kind of)


Recommended Posts

Posted

So, I have been trying to make a script to generate .Obj files automatically from the game's psp files. To explain all the details:

A .psp contains the meshes, animations and textures of a single 3D object. And they look something like this:20250525_18h34m13s_grim.thumb.png.89554461202f4195da509a47d284ed71.png

The meshes are stored in .PSO files, while the animations are in .PSA, and the textures in .PSI (don't care about those two yet).

Since there can be multiple meshes, textures, and animations in a single file, information like what texture corresponds to what mesh and such is stored in a .PSM file:psmFileInfo.thumb.png.dd767a51fda81eab9b3f1b7784661ed3.png

I haven't really tried to check what the list of floats could possibly mean for the meshes so far. I have no idea.

Alright, and here is what the PSO files look like, finally:psoFileInfo.thumb.png.afcea4690ba067d0e867a4c96a57ed4e.png

Using the triangle strip algorithm from @Sparagas 's triangle generator in my script, I have managed to somewhat successfully re-construct the individual meshes from the .pso files:

20250525_22h16m17s_grim.thumb.png.38aa607824ac2c9a08e71b1cadce78c7.png

20250525_22h25m41s_grim.png.9591e7df7c33f65f4b7b3f6515d51e10.png

If you look closely, though, you can see there are these ugly triangle spikes coming out of the model. But if you look even closer, you can see the mesh is actually full of them:

20250525_22h35m06s_grim.png.7ec0690f2691c6ff1430df254cfbf2cd.png

(There are also a lot of overlapping faces but that's another thing)

From my understanding of tri-strips, this is probably intended? The result is good enough that my guess is the developers used a sub-optimal tri-strip conversion algorithm, and all these spikes aren't actually meant to be displayed, which is why most of them are inside the mesh and not outside. This doesn't explain what's up with the ones outside though.

And, another problem: some of the models are missing a few faces! You can see on the top picture that the gun and the parallelogram-thingy have holes on their surfaces. But HoiHoi-san's head doesn't seem to have any. Weird!

So, all that's left is figuring out:

  1. If there is a way to make all the visible spikes go away
  2. Why the missing faces
  3. If there is a way to fix the overlapping faces

And all of this should be able to be done by a script, of course.

I'll leave the raw .psp, .pso, and .obj files if anybody wants to take a look. And also my python script (it requires Open3D, which was a pain to install and is pretty resource heavy, if you can adapt it to something else I highly recommend you do that instead LOL). I'll also leave the textures here if anyone wants to figure that out.

amg_n.png

h01_head.png

lamp.png

pointVisualizer.py HoiHoiFiles.7z

  • Like 3
  • Engineers
Posted (edited)
3 hours ago, HoiHoiDeluxe said:

From my understanding of tri-strips, this is probably intended? The result is good enough that my guess is the developers used a sub-optimal tri-strip conversion algorithm, and all these spikes aren't actually meant to be displayed, which is why most of them are inside the mesh and not outside.

Hello, the problem has been widely discussed in this forum without a final result, afaik.

It depends on the triangle strips algo used and/or stop markers (if any) for face building. edit: no markers found

(There's a similar problem with "skipfaces", see posts from roocker666 but I think it's not related here.)

 

edit: those bytes at vertex start +12 seem to be uvs, as you've assumed, so 12 bit tx, 12 bit tv? A little bit uncommon.

20 pso uvs.png

Edited by shak-otay
correction, uvs
  • Like 2
  • Engineers
Posted

Yeah, these models are a pain in the ass, lol. Sometimes after vertices is a kind of Flag but not in this case. And there is other problem.. I tried to read all meshes but all appear in the center, that is not good(image1), I exported like that and moved the meshes(image2) using Blender. Maybe you need the skeleton(?) I also read Uvs but I need to scale Y axis and rotate, weird..  So yes, buffer size is 16 bytes: 12 bytes(3 Floats) for vertices and 4 bytes(2 shorts) for Uvs. I can't do more, this is a mess..

h01.PNG

h01_2.PNG

  • Like 1
  • Thanks 1
  • Engineers
Posted

@roocker666: yeah, a skeleton file might help, if any.

An idea to exclude weird faces is to calculate their 3 angles (maybe using a threshold of 10 degrees for a test?)

And checking face normals could help to exclude faces which tilt inwards of the head.

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...