Post by kion on Feb 9, 2018 21:20:14 GMT -5
A pet project I've been working on for a little while, and finally managed to get some decent results.
Are some examples of when the exports go right. The main problem I'm facing right now is that i'm trying to emulate the framebuffer by simply trying to match the x and y framebuffer values declared in the TIM files with the page files stored in the model values. And the problem is that I can't find a way to get them to match up all of the time. An example of this is the Drache.
And another issue is that the game has really outlandish x,y,z bone values for faces. So when a bone value is too large, I reset it to zero. Which means faces will be close but not matching all of the time.
So those are the main two issues I'm working on right now, aside from these two issues the meshes themselves seem to be working out really well and this exporter should allow you to at least export meshes in the game and see what's there. And then maybe I can find a way to get some feedback on the textures to improve my linking. Or even potentially brute force the problem by creating tables for which models need to have which textures.
Anyways, if anyone's interested in trying this, it's still in development so the process is kind of hacky. Standard disclaimers apply here, no warrantly, if you mess up your computer it's on you kind of thing.
[1]. Download and install nodejs for your platform. On the installer for windows, it will ask you if you want to add Nodejs to your path. Make sure you click, "yes".
[2]. Create a directory to use for exporting models. Something like "Document/Dash_Exporter"
[3]. Download main.js to your Document/Dash_Exporter directory: raw.githubusercontent.com/kion-dgl/Dash-Model-Viewer/master/tools/07_texture_analysis/main.js
[4]. In your Documents/Dash_Exporter directory, create a folder named "output", the program expects this to be there, exports will fail otherwise.
[5]. Copy a BIN file from the game data to your Documents/Dash_Exporter directory
[6]. Hold shift while left clicking in the Documents/Dash_Exporter directory and select "Open Command Line here" option from the context menu.
[7]. Run the program with "node main.js ST03_00.BIN". Note that the third parameter, ST03_00.BIN can replaced with a different file.
[8]. If everything went okay, you should see the exported gltf files in the output folder. Note that I don't have any unique names for everything, so it will just over-write files in the output folder every time the program is run.
Basically what the program does is it reads the file, loops over it looking for TIM files and stores their locations. Then it goes back and looks a for a .EBD file and converts each model into gltf and exports it. If there are problems with the file there could be infinite loops or out of bounds errors, so again no warranty and all of that stuff. Aside from that definitely looking for feedback on how I can improve the textures. And I'm trying to think of how to make tools to help me track down look for problems. Right now I'm leaning towards a web-based TIM viewer that would display width, height, framebuffer values and names.
And a quick side note for gltf, it's a file format specified by the Collada group. If you need support for plugins, you can look here: github.com/KhronosGroup/glTF
Credit where credit is due, thanks to xdanielx for releasing the DashViewer2 source, it was a massive help for getting started.
Okay, got a stand-alone html texture viewer and exporter working. You can check it out at: gtk.dashgl.com/dir/texture_view/.
Are some examples of when the exports go right. The main problem I'm facing right now is that i'm trying to emulate the framebuffer by simply trying to match the x and y framebuffer values declared in the TIM files with the page files stored in the model values. And the problem is that I can't find a way to get them to match up all of the time. An example of this is the Drache.
And another issue is that the game has really outlandish x,y,z bone values for faces. So when a bone value is too large, I reset it to zero. Which means faces will be close but not matching all of the time.
So those are the main two issues I'm working on right now, aside from these two issues the meshes themselves seem to be working out really well and this exporter should allow you to at least export meshes in the game and see what's there. And then maybe I can find a way to get some feedback on the textures to improve my linking. Or even potentially brute force the problem by creating tables for which models need to have which textures.
Anyways, if anyone's interested in trying this, it's still in development so the process is kind of hacky. Standard disclaimers apply here, no warrantly, if you mess up your computer it's on you kind of thing.
[1]. Download and install nodejs for your platform. On the installer for windows, it will ask you if you want to add Nodejs to your path. Make sure you click, "yes".
[2]. Create a directory to use for exporting models. Something like "Document/Dash_Exporter"
[3]. Download main.js to your Document/Dash_Exporter directory: raw.githubusercontent.com/kion-dgl/Dash-Model-Viewer/master/tools/07_texture_analysis/main.js
[4]. In your Documents/Dash_Exporter directory, create a folder named "output", the program expects this to be there, exports will fail otherwise.
[5]. Copy a BIN file from the game data to your Documents/Dash_Exporter directory
[6]. Hold shift while left clicking in the Documents/Dash_Exporter directory and select "Open Command Line here" option from the context menu.
[7]. Run the program with "node main.js ST03_00.BIN". Note that the third parameter, ST03_00.BIN can replaced with a different file.
[8]. If everything went okay, you should see the exported gltf files in the output folder. Note that I don't have any unique names for everything, so it will just over-write files in the output folder every time the program is run.
Basically what the program does is it reads the file, loops over it looking for TIM files and stores their locations. Then it goes back and looks a for a .EBD file and converts each model into gltf and exports it. If there are problems with the file there could be infinite loops or out of bounds errors, so again no warranty and all of that stuff. Aside from that definitely looking for feedback on how I can improve the textures. And I'm trying to think of how to make tools to help me track down look for problems. Right now I'm leaning towards a web-based TIM viewer that would display width, height, framebuffer values and names.
And a quick side note for gltf, it's a file format specified by the Collada group. If you need support for plugins, you can look here: github.com/KhronosGroup/glTF
Credit where credit is due, thanks to xdanielx for releasing the DashViewer2 source, it was a massive help for getting started.
Okay, got a stand-alone html texture viewer and exporter working. You can check it out at: gtk.dashgl.com/dir/texture_view/.