Dash.js Viewer Feb 27, 2019 14:13:49 GMT -5
Post by kion on Feb 27, 2019 14:13:49 GMT -5
To make things easier to manage, I might as well put this in its own thread, I made a new tool for Megaman Legends 1 that includes some bug fixes and new features.
Instructions: Click on the "Open Files" icon on the header. Navigate to the CDDATA/DAT directory on the Megaman Legends 1 game disk, select all of the files and click "open".
- Textures are not combined into a single texture, instead giving each pallet/image combination its own texture
- Textures are now all fixed at 256x256 pixels in size
- Significant improvements to the way bones are parsed and implemented
- Added a settings menu, the download format (.glb, or .gltf) can be selected from the menu
- Added a level of detail selection from the Settings menu
- Added the option to view non-character models from the menu
- Added the option to control animations with play, pause, stop, and playback speed can be adjusted
- The way the game uses textures is when the game loads in a texture it has an image position in the framebuffer where the image is stored in GPU memory. When the model draws a polygon, it will define a page index, which is a 256x256 area inside the GPU. When i made my previous tools, I didn't know how to match models to their textures, so I ended up creating a lookup table where I linked a lot of the images manually. Now I have a slightly better idea of how these work, but there are still a few issues. Mostly with Data the Monkey, as he's the weirdest. His image and pallet are in completely different files, but aside from that the files that the game loads in for each stage should be pretty set. For any given stage you should have the TIM files from the loaded scenario file, the stage file, and a few standard files the game always has loaded. That being said texture matching on the pSX is still pretty ugly, but a "best attempt" to locate textures for models that don't have their textures manually linked in funcationality that could be beneficial.
- Textures are flipped in the horizontally. Since I'm not combining textures, I could try to figure out if there is a fix for this.
- Reported by Xinus: Some of the animations are missing frames. This has to do with the way the game stores animations. There are animation keyframes, and then there are animation tracks which define which keyframe to use at one time. Since the tracks in Megaman Legends 1 are mostly in order I tried to be lazy and simply read the key frames in order. This generally seems to work, but it could be better, so I'll try and see what aspects of my mml2 code can be ported over (for laziness).
- Hidden items. I managed to fix the way bones and polygons are implemented and parsed, which is something I should make a short video about, because it's pretty weird. The funny thing is that there are actually more models, such as Items the characters are holding stored inside the model. Right now the parsing of these is skipped completely. Parsing these is easy enough, the hard part is figuring out how to display them in a manner than doesn't look horrible, and figure out which mesh it is that needs to be exported.
- Collada .dae format has been dropped. Threejs has changed the way they store models (from geometry to buffer geometry), and I was using geometry previously in the .dae export and the collada format is too convoluted to try to continue to maintain. You can convert to other file format types by hopping around. Noesis supports .gltf import as of version 4.39, and I managed to import into blender using this plugin.