xdanieldzd / Scarlet

Game data conversion/export/import helper libraries - UNMAINTAINED
Other
97 stars 22 forks source link

Export GBIX to PNG #10

Open barquetin16 opened 6 years ago

barquetin16 commented 6 years ago

Hi can you please explain me the correct way to convert a .gbix(uvr) to png from the game K-on Houkago Live, An if just in case you know how convert the .uno files from the game to any readable 3d format.

lfdaryl commented 6 years ago

the vertex position and uv (in .uno) can be gained form hex editor in float mode, but all Sega pvr tools found in network didn't work correctly when I tried to open uvr files. The data formats of textures are 0xa8 or 0x88,different from normal gbix(pvr), while those tools only read 0x00-0x12 formats. https://github.com/nickworonekin/puyotools/wiki/PVR-Texture

barquetin16 commented 6 years ago

Thanks for the information, so there is no way that Scarlet convert the .uvr gbix file like it says on the readme, because it says K-on as example.

xdanieldzd commented 6 years ago

Scarlet can convert GBIX format images (*.uvr) to PNG:

temp682

It cannot convert PNGs back into GBIX, it might not work with every GBIX file - you can see some garbled results in the screenshot, which may or may not have been fixed since these were converted (screenshot shows old testing files, I'll need to re-check if they all convert properly) - but it should work just fine for many of them.

(Also, sorry for the late reply, real life things getting in the way here and there.)

Edit: yes, the garbled output from the screenshot above has been fixed since these PNGs were dumped:

temp683

barquetin16 commented 6 years ago

Hi thanks for your response can you tell me what the code line will be to convert .uvr to .png, i cant get it working.

xdanieldzd commented 6 years ago

It should work fine if you just drag and drop your .uvr files (or FMDX .bin archives, containing .uvr files among others) onto ScarletTestApp.exe. To be sure, I just downloaded the most recent release, v1.1.4, and tried it with a .uvr file:

temp684

You should see something along those lines as well. If not and you're not getting any PNGs, please post a screenshot of the converter's output.

barquetin16 commented 6 years ago

Here is a screenshot from the converter scarlet

xdanieldzd commented 6 years ago

Ahh, I think I know what's wrong, that file (and probably any others you've tried that give the same error) aren't supported yet. More specifically, their image formats haven't been verified and added to Scarlet's GBIX handler yet, in which case it throws the exception you're seeing.

I'll see what I can do over the next couple of days or so, time permitting. Should hopefully not be too hard to fix these issues, will just have to find the ISO again or, worst case, dump my copy of the game again.

lfdaryl commented 6 years ago

I could found coordinates of vertices in .uno and export them (just used Excel hhhh), but no hint of the face. It looks a bit hard to fix the model because of my poor skill of coding and modeling. Here's a screenshot of Hirasawa Yui image I found some blocked structures in .uno (usually the size is 28 bytes, sometimes 24 bytes or 20 bytes)
image Obviously the last three numbers are vertex coordinates, the third and the forth are probably UV coordinates, but I don't know the true meaning of the first two. YUI_Body.txt (a sample of the model) I'd like to ask if anyone can get the information of faces.

xdanieldzd commented 6 years ago

GBIX support has been improved quite a bit with commit 600ab4c, most files should convert properly now. There's still a few issues I'd like to try and figure out before posting a new release build, tho.

As for .uno models, I might take a look at them as well, but I won't promise anything. I might figure out enough of them to code a viewer or dumper, but I might also not be able to do much of anything with them, we'll see.

barquetin16 commented 6 years ago

Thanks, This guy just release a script for noesis i am testing it out. https://haruhi-chan4ever.deviantart.com/art/K-On-Houkago-Live-Noesis-Script-Download-719731521

lfdaryl commented 6 years ago

Thanks a lot, for I want to get them for years.

barquetin16 commented 6 years ago

Yes me too, the script is working very well, i am testing the ps3 version and some of them actually work. Thank the creator of the script.