joshbarrass / hptools

Tools for the Harry Potter games on the PS1
MIT License
6 stars 0 forks source link

Looking for help decoding .WAD files #4

Open joshbarrass opened 4 years ago

joshbarrass commented 4 years ago

The .WAD files contain all the assets for a level. This should be all the resources like textures and models (if they can be extracted, modified and reinserted this would be brilliant), sounds (can be detected with various PS1 audio tools, can be extracted and replaced this way but it's a bit of a painful process to do either), and game code (not sure how easily this could be modified but if it can be the possibilities are nearly endless!).

My understanding of these files is very limited, and unlike the IMG files and the DAT/DIR files I don't know where to begin with these. The beginning of these files seems to be a header of sorts, but I'm not sure what useful information it actually contains.

I've tried doing some debugging with a PS1 emulator, but that isn't really my forte and it didn't reveal anything useful.

If anyone knows how these files are structured I'd appreciate the info; anything helps. If anyone knows how to find out how these files work, if they can show me or at least share their findings, that would be awesome.

joshbarrass commented 4 years ago

If you wish to submit source code for this I would prefer Python or BMS, but I'll accept anything really that would be able to process these, and I'll probably just port them across to aid my own understanding.

OverSurge commented 4 years ago

Hi, I started reversing the WADs two months ago. I now have learned a lot of things on them : I can extract BGM, sound effects, untextured 3D models and animations atm (images and text were already done, so no need to mention them). I'm gonna open a repo within the end of April listing all the info I have.

joshbarrass commented 4 years ago

@OverSurge that's awesome, exactly what I'm looking for. Can't wait to see what you found out!

OverSurge commented 4 years ago

I will be late. I wanted to finish the texture reversing before writing all the documentation, it is going well but it delayed the documentation release. I post my progression on the PSXDEV Network Discord server, you can come there if you want to have more frequent updates ^^

Here are one 3D model and one texture file (3D model texturing and complete texture reverse are on the way) :

Harry

T1L1M009 clean

joshbarrass commented 4 years ago

No worries. I've just had a look in the Discord, your progress with this format is incredible to say it's all trial and error. I look forward to seeing your documentation of the format.

OverSurge commented 4 years ago

Hi, I just opened the repo at https://github.com/OverSurge/PS1-BRender-Reverse

joshbarrass commented 4 years ago

Amazing! I'll have a look through it and see what I can do with it.

OverSurge commented 4 years ago

I can show you a (nearly ^^) complete formats walkthrough if you want (via Discord screenshare and voice call for example). I think it could buy you some time.

joshbarrass commented 4 years ago

I'm not sure I'll need it actually, your documentation is very clear. I'm in the midst of coding model extraction (which seems to have some weirdness in it -- for some reason I need to invert the normals to make everything show up properly in Blender), but I'll hit you up on Discord if I'm struggling to make sense of something :)

OverSurge commented 4 years ago

Ok, nice :) Just to be sure you've got the info: I've already coded model extraction (in Python ofc), and a COLLADA exporter function, but if the model is animatable, you need to apply it an animation frame. Some weeks ago, I also coded a very hacky Blender "exporter", in fact it outputs Python lists that I copy into Blender, where a script transforms them into Blender objects (With the vertex groups declared as Blender's VertexGroups).