KidWizardOfTheWeb / OllieKingRETools

Tools for extraction of models, textures, animations, and more from Ollie King.
3 stars 0 forks source link

Stage extraction script issues and to-do list #2

Open KidWizardOfTheWeb opened 2 years ago

KidWizardOfTheWeb commented 2 years ago

https://github.com/KidWizardOfTheWeb/OllieKingRETools/blob/2cfba07e88c0765cf8a717b7670cd7c6292004f3/OKNoesisScripts/Experimental/Ollie%20King%20Stages.py#L51-L63

The loop is not entered due to entries not finding the correct model data to start at. Find the right starting point in order to proceed with the parsing loop.

KidWizardOfTheWeb commented 2 years ago

Reason found as to what's missing in order to get output. Player models had a specific point (0x8) in the header that detailed the value for table2, which is used to later locate the mesh starting point. Then there are a set amount of entries at 0x14 to control how many times the loop runs based on the model header. Since this script was based on the player script, the files are technically different in the composition by a small amount, and I overlooked the header until now, where the stage models do NOT have these in the header. Or at least, not in the same place. Note the differences, where the top image is the player model header (grinner.mdb) and the bottom image is a stage model header (s0_area01.mdb) unknown image

The next step is to locate where we can find this information. The header values in most stages are rather small and might require different math to get to the start of the mesh consistently. More research will be done soon.

KidWizardOfTheWeb commented 1 year ago

Need to adjust coordinates to XZY and then rotate the stage properly. Will implement in the future. We can also possibly mesh group start with 1000 0000 0000 0000. Now that I have GPA tools, it's significantly easier to read stage data since it exposes all of the submeshes and even textures loaded in emulator. I'll come back and update ASAP when I find a consistent pattern for it. Hopefully I might soon, my sights are on the emulation side of things at the time of this writing.

KidWizardOfTheWeb commented 1 year ago

Years later... As recent as commit c26b44d06dad0aea715b417a16b68e5ef6fafe63, automation of stage extraction is real.

To do at this point (ordered easiest to hardest, descending):

It's within my reach now. It's just gonna take some work. Hopefully by this midsummer.