Jump to content

The Nightmare Before Christmas: Oogie's Revenge XBOX


Recommended Posts

Posted (edited)

Hi guys, I was curious about the models from this game so I analyzed some files. As we know, a lot of PS2 models don't have faces data so I decided to analyze Xbox models but for my surprise, the format is almost the same! so no faces data 😞 I don't remember an xbox model with no faces data but anyway.. This is my research:

Meshes are something like this:
Mesh group header
unknow data
Vertices count
Vertices buffer
Unknow buffer1
Unknow buffer2
Normals buffer
UVs buffer

Next Mesh gorup
..

I don't know about those unknow buffers, maybe are for bone weights. Here are some pictures:

 

chzer_main header.PNG

chzer_mesh header.PNG

Oh I forgot the sample, this is Zero(the dog), Textures are .pig but are actually .dds just change file type.

Zero.rar

Edited by roocker666
  • Like 1
Link to comment
Share on other sites

Posted (edited)

@roocker666: so you mean to collect/create all the submeshes automatically by a script?

It would be helpful, imho, to refer to one sub meshes' data at least when presenting your structures.

2nd picture refers to your 2nd one.

chzer-bmd.png

chzer-bmd_.png

edit: @itrabwho: interesting thought. So the 0x800000 flag to start a new strips sequence?

 

 

Edited by shak-otay
Link to comment
Share on other sites

1 hour ago, itrabwho said:

It could be a list of triangle strips stored in immediate mode, XYZ coordinates followed by continue/interrupt flag (0x00800000 or just 0)

 

Yeah, PS2 models use that "Flag" to create triangles, sometimes the model is perfect but not always, you can get extra triangles in some meshes(like in my Mortal Kombat Shaolin monks post)

Link to comment
Share on other sites

Posted (edited)
1 hour ago, shak-otay said:

@roocker666: so you mean to collect/create all the submeshes automatically by a script?

It would be helpful, imho, to refer to one sub meshes' data at least when presenting your structures.

2nd picture refers to your 2nd one.

Yeah, collect all meshes with a script. Meshes have the same format just there is a group header, in this case the model has 2 meshes groups.(at 0xFD0 and 0x39CD0). Mesh format is easy to understand, each mesh has 5 blocks or buffers, 1st is vertices, 2nd and 3rd unknow, 4th Normals and 5th Uvs. There is no data between blocks/buffers so one below the other. To separate meshes vertices count line is the key. So for 1st group and 1st mesh:

0xFD0: 4 bytes submesh count, 12 bytes unknow(This is mesh group1 header)
0xFE0: 80 bytes unknow data(I don't now what this is..)
0x1030: 4 bytes vert count, 12 bytes unknow(1st mesh starts here)
0x1040 vertices buffer(Float, padding 4)
0x2100 unknow buffer1
0x31c0 unknow buffer2
0x4280 Normals buffer(Float, padding 4)
0x5340 UVs buffer(Float, padding 8) --1st mesh ends at the end of UVs buffer/block

Then 2nd mesh, same format(starting with vert count line)
3rd mesh(starting with vert count line)
4th mesh(starting with vert count line)
etc..

It seems like all 5 blocks/buffer(in a mesh) have the same size.

Probably this is more clear now, lol

 

Edited by roocker666
  • Like 1
Link to comment
Share on other sites

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...