Qhimm.com Forums

Final Fantasy 9 => FF9 Tools => Topic started by: tasior2 on 2015-02-20 10:39:55

Title: [PSX] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: tasior2 on 2015-02-20 10:39:55
Hi all,

I finally got some time to create a FF9 online viewer. It's beta version so don't worry about bugs or if your browser will hang:)
It works in browsers that supports WebGL (Tested in: FireFox 27.0.1, Chrome 40.0.2214.111 m).

Features (so far):
* Currently only files in directories can be saved. Just double click on file.
** World map not supported yet

To do:

Viewer URL:

http://beta-reverseff9.rhcloud.com/ (http://beta-reverseff9.rhcloud.com/)

Offline version:
http://beta-reverseff9.rhcloud.com/reverse_ff9_offline.zip

Changelog:
Code: [Select]
beta 0.0.5.1:
 - added textures to spells models
beta 0.0.5:
 - added directory 13 to file browser
 - added spells models viewer
beta 0.0.4:
 - added exporter - collada (DAE) w/ animation
 - fixed render options state after model change

beta 0.0.3:
 - added switch to reverse textures for monster models
 - added world map viewer w/o textures

beta 0.0.2:
 - fixed texture mapping problem on map models

beta 0.0.1:
  - added possibility to view file structure
  - added possibility to view 3D models w/ animations ( weapons/playable characters/monsters/field models/map models )

Screenshots:

File browser:
(http://beta-reverseff9.rhcloud.com/screenshots/files.png) (http://beta-reverseff9.rhcloud.com/screenshots/files.png)
Weapons:
(http://beta-reverseff9.rhcloud.com/screenshots/weapons.png) (http://beta-reverseff9.rhcloud.com/screenshots/weapons.png)
Playable characters:
(http://beta-reverseff9.rhcloud.com/screenshots/pc.png) (http://beta-reverseff9.rhcloud.com/screenshots/pc.png)
Map models:
(http://beta-reverseff9.rhcloud.com/screenshots/blender.png) (http://beta-reverseff9.rhcloud.com/screenshots/blender.png)

Enjoy!

Let me know what you think about it and if you spot any bugs please report:)
Title: Re: [FF9] Online viewer
Post by: paul on 2015-02-20 11:19:32
I don't have FF9.IMG to test :(

Isn't this more of a tool than reversing related? Or is it tool to do online collaboration of FF9 reversing? Btw where did you get all file formats information? There don't seem to be too much on the wiki.
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-02-20 11:44:05
Yes it's a tool but since there is message to 'NOT create new threads here.' in Tool forum I posted here:)

Most data is on wiki (mesh / animations / 0xdb cluster / file structure). Rest is my own investigation:)

For textures I emulated psx vram. Materials are stored in 0x12 files like wiki said but I needed to dig into Psy-Q SDK to figure out how to read tpage and clut data. I also had some difficulties with animation and monsters (data is in two separated directories).
I can post information how to read this file (probably in separate thread(s)).

Title: Re: [FF9] Online viewer
Post by: Kaldarasha on 2015-02-20 11:49:06
Yes it's a tool but since there is message to 'NOT create new threads here.' in Tool forum I posted here:)

What belongs in Tools?
Please only create a new thread in this section if you have a tool ready to release. If you're still doing research into formats or something similar, consider posting in Scripting and Reverse Engineering (http://forums.qhimm.com/index.php?board=4.0) instead. If you have a question or request, post it in General Discussion (http://forums.qhimm.com/index.php?board=1.0).

For me it looks like a tool release.  ;)
Title: Re: [FF9] Online viewer
Post by: paul on 2015-02-20 12:08:35
Yes it's a tool but since there is message to 'NOT create new threads here.' in Tool forum I posted here:)

Most data is on wiki (mesh / animations / 0xdb cluster / file structure). Rest is my own investigation:)

For textures I emulated psx vram. Materials are stored in 0x12 files like wiki said but I needed to dig into Psy-Q SDK to figure out how to read tpage and clut data. I also had some difficulties with animation and monsters (data is in two separated directories).
I can post information how to read this file (probably in separate thread(s)).



That information would be really really useful. I assume this it working correctly with all models/animations?
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-02-20 13:17:59
@paul

Animation - same for all models
Materials - some special cases: weapons always use same tpage, monsters - didn't figured out yet (materials are swapped sometimes)

@Kaldarasha

You're probably right:) But since is beta and I will change domain I didn't want to post this in tools. I will as soon I release first non beta version.
Title: Re: [FF9] Online viewer
Post by: Tirlititi on 2015-02-20 13:36:59
That is pure awesomeness !
(http://i0.kym-cdn.com/photos/images/newsfeed/000/085/444/1282786204310.jpg)

It's working so well and so smoothly. Congrats !

Some field models are strangely animated (a Steiner model : 658 in field 312 for instance). I think the animation for these are a bit more tricky but it might also be dummied animations (I always so other animations that are working well on those bugged models).

Other than that, there's a typo: in fields and map models, the fields and maps are called "Monster XXX" instead of "Field XXX" or "World Map XXX".

It's funny to see that some animations are never used in-game. Cactuars have a 1000 needles animation for when they are over the ground, for instance.

Anyway, this is great. It'll help me like hell to register model names and stuff. I'm looking forward how you read all those datas :D

EDIT : I just figured out it was not your tool that was wrongly displaying the animations : it's just that there are all the animations for all the models of the field so that's just that the model and the animations are disconnected.
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-02-20 14:16:27
Thanks Tirlititi, I'm glad to hear that:)

You're right in fields there is no information which animations are for which model, only default animation can be obtain from 0x12 file. But some times like in this case there is no default animation so you need to find animation manually:)

I corrected typos:) Later I will create a thread about how I read 0x12 file and some other stuff.
Title: Re: [FF9] Online viewer
Post by: Maki on 2015-02-20 14:36:37
Tasior2, this looks amazing, really. :)
How do you read and calculate UV coords for field models with quads?
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-02-20 15:07:25
@MaKiPL

I split quads into two triangles in following way:

Code: [Select]
i0-i3 - indexes from vertices array
uv0-uv3 - indexes from UV table

Quad Type-A:
{
  indices: [i0, i1, i2, i3],
  uvs: [uv0, uv1, uv2, uv3]
}

Triangle 1:
{
  indices: [i0, i1, i2],
  uvs: [uv0, uv1, uv2]
}


Triangle 2:
{
  indices: [i1, i2, i3],
  uvs: [uv1, uv2, uv3]
}

It work fine for all meshes that use Quad Type-A (didn't find other types yet).

In WebGL (OpenGL ES) you need to have UVs in range [0,1] so after that I needed to divide UVs by texture width/height:

Code: [Select]
4bit - texture size = 64x64
8bit - texture size = 128x128
16/24bit - texture size = 256x256 (there are no textures in this mode in FF9)

You can get texture mode from tpage value from 0x12 file (I will post this later in separate thread - how to read 0x12 file).

EDIT:
P.S. Nice to see some one from Poland on this forum:)
Title: Re: [FF9] Online viewer
Post by: Covarr on 2015-02-20 16:35:38
Yes it's a tool but since there is message to 'NOT create new threads here.' in Tool forum I posted here:)
That's an old remnant from a time when people kept creating troubleshooting threads, idea threads, and threads without releases in the tools. I'll reword it a little clearer, but this is exactly the type of thread we do like in tools :D

Anyway, this looks pretty cool. I like that it's browser-based, so users will not need to redownload anything if you update it. UI looks nice and clean, all around this seems like a nice tool.
Title: Re: [FF9] Online viewer
Post by: JBedford128 on 2015-02-20 18:28:09
This is great. Before I individually manually found the model and default animation pair and extracted from Noesis, but field model textures aren't stored readily readable and you need the texture file and the palette to reconstruct it. Although I didn't have a tool to reconstruct the texture from these two files, but I had a tool that read the PS1 VRAM and could reconstruct it only that way. So I had to go into every field and make a save state. And then my model viewer upscaled the texture which is unlike the PS1/FFIX where it's all squarey.

One suggestion I would make is to be able to select an individual keyframe of the animation. A slider would work.
Title: Re: [FF9] Online viewer
Post by: Mirrorman95 on 2015-02-21 08:26:30
Where can you download this viewer? Is it only available online, and not accessible by those without an internet connection?
Title: Re: [FF9] Online viewer
Post by: Vgr on 2015-02-21 15:28:10
You should probably host the code on GitHub or similar; it even offers a way to have a website directly from the code in one of the repositories! You don't need to do that though, but having the code open-source sure would be nice.
Title: Re: [FF9] Online viewer
Post by: DanTsukasa on 2015-02-22 13:39:18
Oh man, this is super cool, also rather nice having it in a web browser.

A few models here and there have the wrong rotation or part of their body is block colour instead of a texture, but still, its looking awesome.

Right now I'm able to export the .db files, but will it eventually be possible to export the models and textures as obj or FBX (to retain animations).

I got really excited with 'world map models' thinking it was going to be the world map itself, are there any plans to implement that at some point, or field environments (surprisingly there doesn't appear to be any tools for viewing FF9's field backgrounds).

First a first release this is a pretty feature-filled tool so far, really impressive.
Title: Re: [FF9] Online viewer
Post by: Tirlititi on 2015-02-22 13:59:18
surprisingly there doesn't appear to be any tools for viewing FF9's field backgrounds.
There is one : http://forums.qhimm.com/index.php?topic=7996.0
My program will display/export fields' background in its next release as well.

For World Maps, Zidane_2 also made a tool somewhere here : http://forums.qhimm.com/index.php?topic=6968.0
Title: Re: [FF9] Online viewer
Post by: DanTsukasa on 2015-02-22 14:22:50
There is one : http://forums.qhimm.com/index.php?topic=7996.0
My program will display/export fields' background in its next release as well.

For World Maps, Zidane_2 also made a tool somewhere here : http://forums.qhimm.com/index.php?topic=6968.0

I should have clarified I meant exporters, my appologies. I've an older (beta) version of his tool that didn't work, will try out the new one then.

Zidanes tools are all great, just a tad 'fiddly' for lack of a better term.

His world map viewer is great, theres no export option though unfortunately, and its written in Blitz Basic, which is super old and abandonware now, quietly been hoping someone might make a newer version with an export function (or one that runs in DX9 with a larger draw distance, then with no export function I could rip the model with a ripper instead.

Thats for the reply, I'll checkout the tool by Zidane_2, along with looking forward to your new tools release.

EDIT: Zidanes field viewer works well, but the export function is only a snapshot from the viewer itself, which results in issues when a number of the images are larger than the viewport window, and so they get cut off in export, theres no way to enlarge the window.

Some way to import/export them in bulk as stills would be good, especially at their original sizes.
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-02-23 11:10:04
Where can you download this viewer? Is it only available online, and not accessible by those without an internet connection?

Hmm since everything is on client side (in browser) I don't see why not make offline version. Just unzip archive and open reverse_ff9.html in your browser.
Offline version:
http://beta-reverseff9.rhcloud.com/reverse_ff9_offline.zip (http://beta-reverseff9.rhcloud.com/reverse_ff9_offline.zip)

One suggestion I would make is to be able to select an individual keyframe of the animation. A slider would work.

Added to my TODO list:)

Right now I'm able to export the .db files, but will it eventually be possible to export the models and textures as obj or FBX (to retain animations).

At some point I have a plan to do that but right now I'm more focused on viewing stuff. There will be no problem with exporting textures (maybe I will add that in next release) but model w/ animation will require to write FBX/Collada exporter and that will be time consuming.

I got really excited with 'world map models' thinking it was going to be the world map itself, are there any plans to implement that at some point, or field environments (surprisingly there doesn't appear to be any tools for viewing FF9's field backgrounds).

Yes, map and fields backgrounds are on TODO list.


I'm trying to fix texture issues (monsters / world map models) but I'm distracted by Directory 13:) There's a lot of sprites there (that I can't read right now) but I really want to find summons:) So forgive me if I will not release anything in this week:)
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-02-25 17:36:54
Hi guys, I fixed texture mapping on map models:)

(http://beta-reverseff9.rhcloud.com/screenshots/map_correct.png)

I'm still struggling with monsters... and trying to figure out directory 13.

I also figured out how to read sprites (image only) I'll try to add this feature on next release. Here is some work in progress screenshot (fire sprite from first scene in game):

(http://beta-reverseff9.rhcloud.com/screenshots/sprite.png)
Title: Re: [FF9] Online viewer
Post by: paul on 2015-02-25 22:03:57
So what was  the issue with model textures?
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-02-26 09:02:53
I was using absolute value for texture window x/y coordinates. It appears that this negative values are correct:) More info about 0x12 file can be found here:

http://forums.qhimm.com/index.php?topic=15962.0
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-02-26 23:26:29
Hi guys, I was playing with directory 13 today and I found some strange texture:) Probably never used in game.

(http://beta-reverseff9.rhcloud.com/screenshots/bonus.png)

Anyone knows what does it mean?
Title: Re: [FF9] Online viewer
Post by: tasior2 on 2015-03-09 14:34:39
Small update:
 - added world map viewer, without textures (I will add texture mapping in next release)
 - added reverse material checkbox on monster viewer.

I could be wrong but it seems that sometimes the textures are loaded in the reverse order. I will try to find out if it's true. For workaround with checkbox works fine:)

World map loading is very slow so you need to be patient;)

EDIT:

I will now focus on summons so probably for couple weeks there will be no new releases.
Title: Re: [FF9] Online viewer
Post by: Kefka on 2015-03-09 14:44:15
Wow, that's cool, you can even look at all the weapons! Thanks a lot for this, man!
Title: Re: [FF9] Online viewer
Post by: DanTsukasa on 2015-03-17 17:33:42
Thats a nice update, nice work.

I wish you would add a model exporter for exporting objs beforehand but I'm comfortable waiting until you finish with the summons.

Interestingly, I did have a look at actually ripping the model straight from the browser viewport itself, but it seems that theres no tools to do this when the model file isn't temporarily saved in any particular location (which is how many of the 3d portfolio sites do it).
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: tasior2 on 2015-03-25 02:20:45
Sweet update:)

I had to take a break from summons and I decided to create exporter:) Lucky winner from 3d formats is Collada (simplest), it support skeleton and animation and multiple texture. So here it is ... Eiko model in blender:

(http://beta-reverseff9.rhcloud.com/screenshots/blender.png) (http://beta-reverseff9.rhcloud.com/screenshots/blender.png)

Export button is at top of options at right side menu. After click it will produce zip containing model(s) and textures. If your browser hang just wait:)

World map can't be exported at this point.

Enjoy:)
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: DanTsukasa on 2015-03-31 13:27:06
This is a great update man, great work yet again.

Ah no world map export yet, too bad.

I'm surprised just how much content you've added honestly, even the initial Alpha had tons of working content without any real issues at all.

I'm looking forward to the summons, along with seeing what else you decide to tackle.
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: LeonhartGR on 2015-04-01 12:41:03
Well done! I'm living for the day we will receive an HD mod for FFIX! I need to play this part of the series so badly!
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: tasior2 on 2015-04-10 11:11:44
Thanks guys,

small update, it's work in progress but I would like to share it with you. As you know I'm looking for summon models so I'm digging in directory 13 and I was able to locate 3d meshes there, lots of spells have them (e.g. Death, Frog drop, Shiva). So I added spell model viewer:) It's just mesh without animation and textures. I don't know where are animation yet but I know where and how to load textures just need to find how to match them to mesh.

Unfortunately I didn't find summon models.

A lot of these models use Type-B and Type-C polygons/triangles. I didn't have time to work on Type-C but here is what I got about Type-B:

Quad Type-B:
Code: [Select]
struct {
  short vertex_index1;
  short vertex_index2;
  short vertex_index3;
  short vertex_index4;
  short uv_index1;
  short uv_index2;
  short uv_index3;
  short uv_index4;
  byte color[3]; // 24 bit color value, not sure about that
  byte texture; // not sure about that
  int unknown[3]; //don't know yet what are these values
} QUAD_B;
Triangle Type-B:
Code: [Select]
struct {
  short vertex_index1;
  short vertex_index2;
  short vertex_index3;
  short uv_index1;
  short uv_index2;
  short uv_index3;
  byte color[3];  // 24 bit color value, not sure about that
  byte unknown; //probably padding
  short unknown2[3]; //don't know yet what are these values
  short texture; //not sure about that
} TRI_B;

I also added directory 13 to file browser.

Some screenshots of spell models:
(http://beta-reverseff9.rhcloud.com/screenshots/spells/death_mesh.png)
(http://beta-reverseff9.rhcloud.com/screenshots/spells/frog_drop.png)
(http://beta-reverseff9.rhcloud.com/screenshots/spells/death_texture.png)

Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: tasior2 on 2015-04-10 17:07:25
Just a quick one. I added textures to spells models:)

Enjoy!
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: EditorMaster on 2015-05-20 19:52:49
Good job man, keep up
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Lubdar on 2015-06-12 03:51:07
WHoa!!! this is awesome just what I've been looking for!! Thank you so much for all the work thus far!
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: R51 on 2015-06-23 17:31:43
Small update:
 - added world map viewer, without textures (I will add texture mapping in next release)

I would absolutely love to see this with texture mapping. Is that new release still coming?

This is a fantastic tool so far, well done!
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: tasior2 on 2015-06-23 17:43:57
Hi guys, thanks for good words! Yes, new release is in progress:) Lately I didn't have much time to work on this viewer and I needed to take a brake from FF9;)
In the meantime I started working on Chrono Cross. I have totally beta version of battlefields viewer here: http://cc-tasior.c9.io/view.html if somebody is interested.

Any way this viewer is still in progress and  I will add more functionalities.
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: DanTsukasa on 2015-06-23 19:09:00
That Chrono stuff is really nice!

Are there any plans to add an exporter for the world map, exporting to OBJ or FBX, I'm not too fussed if it has textures or not though, if they do, great, if not, it'll come in later updates of this awesome program.
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Lubdar on 2015-06-24 04:31:45
That's great to hear that progress is being made.  I can't wait for anything relating to the summons!!!

Awesome news regarding the chrono cross models.  At some point in time I had acquired a bunch of the models, but it was only accessible through running a blender script and i believe spit out a bunch of obj files of each frame of an animation without texture mapping.
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Lubdar on 2015-06-24 04:35:26
WHOAH THAT CHRONO CROSS MODEL VIEWER IS AWESOME!!!!
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: sannoki on 2015-07-11 17:34:52
Hi guys, thanks for good words! Yes, new release is in progress:) Lately I didn't have much time to work on this viewer and I needed to take a brake from FF9;)
In the meantime I started working on Chrono Cross. I have totally beta version of battlefields viewer here: http://cc-tasior.c9.io/view.html if somebody is interested.

Any way this viewer is still in progress and  I will add more functionalities.
Hi! what's new???
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: R51 on 2015-08-21 17:04:50
I would absolutely love to see this with texture mapping. Is that new release still coming?

This is a fantastic tool so far, well done!
Any chance of an update on this tool? Excited to mess with that world map!
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: sannoki on 2015-08-30 05:48:14
I hope that tasior will be back...
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Albeoris on 2015-09-26 19:42:22
Hi!It looks great!
Do you plan to make an open source project?
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: FFfanForever on 2015-12-12 02:35:43
Hi, I am new to this forum so don't hate me if I have made a mistake lol, Ive tried a few different IMG files but I can't get this tool to open any, it just says "invalid file". Anyone know what I'm doing wrong?
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Tirlititi on 2015-12-12 08:48:38
You probably use the plain disc ISO file. You have to extract the IMG file from it first to make it work.
There are several generic tools for extracting files from an ISO. I use CDmage and it works fine.
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Lein on 2016-04-02 17:57:14
This looks like a really nice program, I can't seem to open the bin file though. Daemon tools won't mount it so I wouldn't know how to "extract" the IMG file either. How do you get to the img file?

EDIT: Just download CDmage, then select the cue and after that the iso file. Right click the IMG file and extract it.
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Kaldarasha on 2016-04-15 06:56:01
Is it possible to add support for the new PC port? I would like it if I could upscale all models.
Title: Re: [FF9] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Tom on 2016-08-06 15:06:58
This is so cool, I wish this would work for ff7!  Great job!
Title: Re: [PSX] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: hgdagon on 2018-06-19 12:16:58
It's been years, but, can I request a reupload of the offline version?
Title: Re: [PSX] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: CrazynNova on 2018-07-03 05:56:45
The links are dead. This is the same problem with Zidane_2's tool. I hate to complain but seeing great tools being unable to be used is a great shame
Title: Re: [PSX] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Tirlititi on 2018-07-04 08:18:10
That's really a shame :/
I used the online version a lot and never bothered to download the offline version... I hope that tasior2 will see this eventually.

I have (most of) the tools from Zidane_2 though. I'll upload them in their topics.
Title: Re: [PSX] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Chev on 2018-07-13 10:44:50
Given my past interest in FF9 models I do happen to have a copy of the offline version:
https://mega.nz/#!fXhVlKKB!WAUGdXvrdwG3K9igmvA3OEFk5UDKqjbiyQ41QAN1YYw

Make sure to make and upload some copies of your own so it may never again be lost.  ;)
Title: Re: [PSX] Online viewer / exporter - Rɘverse FF9 (0.0.4b)
Post by: Atrelyu on 2018-08-08 07:13:10
The link for that offline version works wonderful, however I can't seem to be able to export any weapon models at all, is there any workaround/alternative for this? I'm trying to use the Hades Workshop with the PSX discs but can't see any option related to export psx weapon models.

Regarding to the Reverse ff9 website, for an online version you can use the WayBack machine and choose a time where it worked, here's a link:
https://web.archive.org/web/20170424070232/http://beta-reverseff9.rhcloud.com/