Version 1.8 Released!
Fixed the item viewer error for FFXIV 3.5. Have fun!
Surprise! Version 1.7 Released!
So, I hadn't touched FFXIV Explorer since Auguest 9th according to my git commits... mostly due to a mix of loss of motivation and an uninterest in FFXIV ARR (3.0-3.1 hit me hard). I have also been very busy with my other project, the FFXIV 1.0 Server (link here), which pulls me away from other things. Anyway due to another friend's FFXIV related project, I decided to take a look at the code again and implement some key features, as well as address a backlog of bugs that people were reporting (mainly the music swapper). So, I present version 1.7!
The first big thing is FFXIV's "parts" system has been implemented. You may have noticed when looking at a "Pince-Nez" or certain monsters that they looked wrong. This was because my application wasn't "hiding" the various "parts" of the model. SE uses this system so they can make one mesh, and then turn off/on parts to create multiple monsters and items (they also used this in 1.0 for "breaking" parts). A good example is the "__ No Mask" for the last Heavensturn. Each item looks different (hands on different spots) but in my viewer it showed ALL the hands.
I have also fixed bugs in the model viewer UI (mainly searching and not being able to select things), and of course the music swapper. I only found a single bug with DAT generation (music injection) so if you find one with normal swapping, email me.
Finally I added three hash finders to the tools menu. Using reference files in the game, I've made a EXH, Music, and Maps hash finder that will let you get the filenames right on patch day. Note: the EXH finder only finds EXH files. To find the EXD, you will have to scroll through each exh and then behind the scenes the exds get added. This is because I can't know what pages/languages the exd file may have until the EXH is read. Remember to reopen the archive after.
PS: I've stopped packaging the 32bit version. Too much a hastle, and 99% of people have 64bit computers. If you can't open the application, download the latest 64bit Java JRE, as you may have only the 32bit version installed.
Character Viewer AKA Outfitter
One of the big features people have been begging me to create was a character builder or an outfitter. Over time I slowly implemented the things needed to create one. Well after seeing a Reddit post from /u/deadlyabyss17, who created an awesome photoshop job combining all the models for the different Alex/Esoterics sets... I decided to get cracking.
Here is a preview of the character viewer so far. You can modify the hair, highlight, and eye color of the character. Race, hair, face, and equipment options are changeable. This is an earlier screenshot (no equipment), but it gives an idea what you can do.
You can also change the equipment on the model, which will default to smallclothes if unset. I'm still figuring out an issue with Miqo'te, Au Ra, and other models. These races use upscaled/downscale versions of Hyur models frequently, which causes weird issues. Anyway, here are some fully armoured characters to give an idea:
Playing with Glow Shaders
For the next version of FFXIV Explorer, I've been tackling something I wanted to finish for a while now: glow textures. As you may or may not know, one of the key parts to rendering game models is a 4x16 color table that lets the game's renderer mix in new colors, as well as perform various effects.
The Y axis of the table is accessed using the alpha value of the normal map, allowing artists to set any part of the skin various colors in different spots. The X axis is defined as: Color, Specular, Glow, and the final one is unknown, but my suspicion is it's a bit field (using RGB as 0.0 and 1.0), to turn on shader effects.
I use the first two columns to mix in the proper colors of the model (as close as I can guess the formula), but I never took on the third column. This section is used to create the appearance of light that appears to glow from within the model. Things like the embers on Ifrit, the lines on ADS, and more commonly; all the glowing disco-tech the Allagan architects are fond of.
While I am not 100% sure what technique SE uses, this is how I approximated the effect. Using our friend ADS-chan, here are some fancy screenshots!
First, I render the model normally, filling in the glow areas as well. This render is then stored in a texture.
Next, I only render the pixels that will glow, also storing it in a texture..
The glow texture is than blurred using a Gaussian Blur shader, giving a fade effect. Because this creates pixels in areas where the glow may be blocked, the glow will bleed into obstructing objects... this also happens in the game! This gives the hint that they are doing something similar.
Finally both the normal render and the blurred render are combined into a single image using a blend function in another shader.
I'm still tweaking and experimenting to get the right image, but this brings objects a bit more closer to how they appear in-game.
Version 1.5 Release!
Just in time for Heavensward, version 1.5 has been released! With this version, one of the first data viewers have been added. You no longer have to search for the model folders or wait till I update the hashdb to see new models! You have to set the FFXIV path under settings before you can use it. Currently Items, Monsters, and Furniture are displayed. It even works for Heavensward!
Another new feature is the Ogg2Scd converter. You can convert OGG files into SCDs, then import and swap them in your game! You can find the feature under the Music Swapper. Please note that due to a new archive in Heavensward for music, you can't currently swap this archive. I will find a solution, but for now you can export the scd and reimport it into 0c0000 for swapping.
Please note that due to the way color tables work has been changed after the HS patch dropped... materials may not load or model skins won't appear 100% correctly.
Version 1.4 Released
I've spent the last couple of months figuring out the Havok engine and getting the models to animate in FFXIV Explorer's model viewer. Over that time various features were completed and bugs fixed, so I decided to release all of those updates before I begin building the animation viewer code. Enjoy!
Finishing off leftover utilities
So you may have noticed under the tools folder a Macro Editor and a Log Viewer that was forever disabled and labeled as NOT DONE. Those two projects were one of the first tools I began working on (besides the explorer) but due to other more interesting projects, I never got a chance to finish them. Well I sat my butt down and went over both tools to finish where I left off. Next version will have both the macro editor and log viewer enabled and working.
Version 1.3 Released
This is a quick update to FFXIV Explorer that should improve the QoL of using the application. As most of you know, load times were abysmal, with the model archive taking at least 4-5 minutes. Well that is no more and I've repeatedly clocked the new load time at 45s, with other archives opening in under 5-10s. The main issue was the way the files/folders were being read from the database. Every time a file or folder was read in, the program would connect to the db, ask for the data, then close the connection. Multiply that by the 5000+ files and you can see how slow it can get. Now I keep a connection open for the duration of the load, and then close it after loading is complete.
Another fix was models not loading from archives 01000 and 02000 which house enviroment/building data. This was due to the dumb way I was reading in the model data. In 3D Programming, your vertices, normals, tex coords, etc are stored in buffers (array of bytes). Now I made the assumption that everything was the same and just blindly loaded it in as so, but in fact equipment/monsters have more data than enviroment data. This would cause FFXIV Explorer to read in too much data, reading over the end of the buffer, causing an error or worse... not error and then OpenGL would read in too much data and segfault (crash catastophically). Luckily the model format actually tells you the offsets, datatypes, and usages for the data, and now I just load the full buffer, and using the info given, point to where the data actually is. This works 100% (and should be faster now), the only issue is I can't figure out two datatypes, so a lot of enviromental models will have messed textures. Something to work on in the future.
Anyway, hope you enjoy the newest version.
Version 1.2 Released
The much anticipated version of FFXIV Explorer has been released, as well as an updated hashlist db.
Make sure you download the correct copy for your JVM version. Most likely it will be the 64bit version, but you can check using the java -version command in cmd.
Also a note: Because I left the specular shader code as is, some monsters may have a blue or green tint. This was the last thing I was working on, but because of the delay in any updates, I chose to leave it as is and release. The reason I didn't remove it is because some models use the specular map to color the model, like the Paladin AF armour. Shouldn't be a problem on most models except for some monsters like Ifrit or the Gobbue.
Also a note on exporting. The program will export all models, but textures may not appear correctly due to the way FFXIV blends textures on the shader. With models with a diffuse map (ending with _d) it shouldn't be a problem, but things like Carbuncle would be which uses a mask texture (ending with _m).
Hope you enjoy the new feature and have fun with it!
Playing With Models Part 2
So a lot has happened since my last update. I've decoded probably 90% of the model format, getting all "chara" models to load. I haven't tackled the other 10% which seems to deal with enviroment information, which is seen in models used to build the world. Regardless, even after the model format was mostly figured out, I had to work with the material files as well as build custom shaders to render the models correctly. This is actually where most of my time has been taken up with.
FFXIV uses a few shaders to render your character:
- A character shader for equipment, accessories, and monsters.
- A hair shader for hair.
- A skin shader for skin.
- A iris shader for eyes.
Each access different textures and operate in different ways. The most difficult shader was the character shader due to the amount of different ways textures are applied to the model. A diffuse texture can be applied for general skinning. A mask texture could be applied instead which is like a "sketch" and colors from a table are applied. Even the specular map seems to have different modes that can be turned on/off. Each channel of every texture had to be tested and experimented with to figure out what they did (using the benchmark and a texture changer by Liinko, special thanks to him).
So at this point where is the program? Well equipment, weapons, monsters, and body stuff is rendering out and blending correctly for the most part! There are still missing parts I have to figure out: The specular maps, the extra data in the material file, and various post processing effects such as the "glow" that appears on some models like the ADS ball, Allagan equipment or Ifrit's horns. However since so many people are begging for the model viewer to be released, I'll worry about that for another version.
Next update will include the model viewer, a obj export feature for it (geo data only), and by request; the EXH string are now parsed and injected scripts are displayed. For example, there may be a if statement selecting a word based on sex (him/her, man/woman) or putting your name in the string (forename/surname).
Here are some pictures of the models:
Playing With Models Part 1
Over the last month I was busy figuring out the last content type that is saved within the FFXIV dats... type 3. These are designated to models. A few weeks ago, I figured most of it out and began mapping out the FFXIV model format. Well, after a week of staring at a hex editor, doing comparisons to XIVModels (thanks for the help Vekien), and writing OpenGL code... I present you Ifrit:
New Update - Custom SCDs for Swapper and Fixes
A new update to the FFXIV Explorer has been pushed out. I have been busy in my IRL job and have had little time to sit down and finish off the things I wanted for version 1.1. Anyway, here is what's new:
The music swapper now allows for custom SCD files. Here is what the new options look like.
The steps to add custom SCDs are simple. First, click "Add" and select the songs you'd like to swap in with. Then, click "Generate Dat". This will create a new custom dat with all your songs, linking the modded index file with this. Finally, the new songs will appear in the "Set" list, which you can swap in as normal. You can get the FFXIV 1.0 songs from an old installation... they are under the folder "SquareEnix/FINAL FANTASY XIV/data/07/FE/0/". Rename the various files to .scd and they will swap in. This post had the names of some songs: http://www.bluegartr.com/threads/99318-Replacing-Ingame-Music-Anyone-found-a-way?p=4173737&viewfull=1#post4173737. One note, if you delete the original files and try to regen the custom dat... it may cause weird issues. It's best to either keep the scd files where they are, or start over and just restore.
In addition you may notice the lists are now alphabetically sorted, as requested by some users.
The following fixes have also been done:
- Texture type was fixed, I was reading the type value wrong (was 2 bytes long not 1 byte). Some textures will appear correctly now that weren't before.
- I show the texture type name rather than the numerical value (so DX1, DX3, RGBA, etc).
- Certain EXD files were being incorrectly read due to inconsistent "num entry" values.
- My DB check update function didn't actually.... work. In fact, if you do not update FFXIV Explorer to 1.1, and have "Check for Updates" enabled and update the hashtable instead... it will never stop pestering you! This is fixed.
- Other minor fixes and changes.
Hope you enjoy it!
On Music and Utilities
With the launch of FFXIV Explorer, I had included a music swapper utility, however it confines you to what is currently in the game's files. From the research I had done and experimentations I actually have a dat builder within the explorer which isn't used right now. As an experiment I installed the old 1.0 FFXIV, pulled out the SCD files and ran it through the dat builder. With the new dat, I reset the Benchmark's (I use this as a test bed) indexes to point to the new music. Launched the program and was rewarded with Ul'dah 1.0's music.
I'm still figuring out the UI to facilitate this feature, but will add it in the future. A note though, as of now only SCD files can be added. I am still figuring out how to make custom SCD files. This means only FFXIV 1.0, FFXIII, and other games that used SCD would be possible to add.
As well you may have seen the unused utilities "Log Viewer" and "Macro Editor". These were proof of concepts I built to make sure my readers were working correctly and aren't 100% done or ready. They too will come soon.
FFXIV Explorer Released!
The first version of FFXIV Explorer has been released. Visit the Downloads page to download a copy. To see what the program can do, visit the About for a summery. Hope everyone likes it!
The FFXIV Explorer site is now up! Not much else too say.