Author Topic: [PSX] Online viewer / exporter - Rɘverse FF9 (0.0.4b)  (Read 56340 times)

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
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):
  • View/export* files
  • Export 3D models to Collada format(DAE)**
  • View weapons
  • View playable characters w/ animations
  • View fields models w/ animations
  • View monsters w/ animations (bug with textures)
  • View map models w/ animations
  • View world map w/o textures
  • View spell models
* Currently only files in directories can be saved. Just double click on file.
** World map not supported yet

To do:
  • Fix texture bug on monsters
  • Add possibility to export files from cluster (0xDB)
  • Add dialog viewer
  • Add battle fields viewer
  • Add map viewer
  • Add fields backgrounds viewer
  • Add animation controls
  • Add sprite viewer
  • Add textures to world map

Viewer URL:

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:

Weapons:

Playable characters:

Map models:


Enjoy!

Let me know what you think about it and if you spot any bugs please report:)
« Last Edit: 2018-04-24 17:13:09 by Covarr »

paul

  • *
  • Posts: 179
    • View Profile
Re: [FF9] Online viewer
« Reply #1 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.

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #2 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)).


Kaldarasha

  • *
  • Posts: 2449
  • Prince of Model Editing
    • View Profile
Re: [FF9] Online viewer
« Reply #3 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 instead. If you have a question or request, post it in General Discussion.

For me it looks like a tool release.  ;)

paul

  • *
  • Posts: 179
    • View Profile
Re: [FF9] Online viewer
« Reply #4 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?

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #5 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.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] Online viewer
« Reply #6 on: 2015-02-20 13:36:59 »
That is pure awesomeness !


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.
« Last Edit: 2015-02-20 13:40:24 by Tirlititi »

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #7 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.

Maki

  • 0xBAADF00D
  • *
  • Posts: 624
  • 0xCCCCCCCC
    • View Profile
Re: [FF9] Online viewer
« Reply #8 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?

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #9 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:)
« Last Edit: 2015-02-20 15:09:35 by tasior2 »

Covarr

  • Covarr-Let
  • Administrator
  • *
  • Posts: 3940
  • Just Covarr. No "n".
    • View Profile
Re: [FF9] Online viewer
« Reply #10 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.

JBedford128

  • *
  • Posts: 113
    • View Profile
Re: [FF9] Online viewer
« Reply #11 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.
« Last Edit: 2015-02-20 18:37:54 by JBedford128 »

Mirrorman95

  • *
  • Posts: 144
    • View Profile
    • Mirrorman95 - YouTube Channel
Re: [FF9] Online viewer
« Reply #12 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?

Vgr

  • Global moderator
  • *
  • Posts: 2163
  • If it quacks like a duck, it must be a duck
    • View Profile
Re: [FF9] Online viewer
« Reply #13 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.

DanTsukasa

  • *
  • Posts: 68
    • View Profile
Re: [FF9] Online viewer
« Reply #14 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.

Tirlititi

  • *
  • Posts: 886
    • View Profile
Re: [FF9] Online viewer
« Reply #15 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

DanTsukasa

  • *
  • Posts: 68
    • View Profile
Re: [FF9] Online viewer
« Reply #16 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.
« Last Edit: 2015-02-22 20:41:08 by DanTsukasa »

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #17 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

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:)

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #18 on: 2015-02-25 17:36:54 »
Hi guys, I fixed texture mapping on map models:)



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):


paul

  • *
  • Posts: 179
    • View Profile
Re: [FF9] Online viewer
« Reply #19 on: 2015-02-25 22:03:57 »
So what was  the issue with model textures?

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #20 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

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #21 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.



Anyone knows what does it mean?

tasior2

  • *
  • Posts: 21
    • View Profile
    • Reverse FF9
Re: [FF9] Online viewer
« Reply #22 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.
« Last Edit: 2015-03-09 14:37:03 by tasior2 »

Kefka

  • *
  • Posts: 202
    • View Profile
Re: [FF9] Online viewer
« Reply #23 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!

DanTsukasa

  • *
  • Posts: 68
    • View Profile
Re: [FF9] Online viewer
« Reply #24 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).