Qhimm.com Forums

Final Fantasy 8 => Graphics => WIP => Topic started by: Aavock on 2018-09-26 00:06:43

Title: [FF8-PC] Blue artifact on spells dirty fix
Post by: Aavock on 2018-09-26 00:06:43
Hello FF lovers,

A few years ago, while playing Final Fantasy VIII on PC, I've noticed some weird blue artifacts on most of the spells (fire effect are more noticeable and looks terrible) and after some research here's a method on how to fix them:

This is the current look casting the bio spell (spell and scene were not the best option for this example, sorry):

(https://i.imgur.com/fS7saqw.png)


Now, let's find this bio texture in the magic.fs file using Deling (http://forums.qhimm.com/index.php?topic=13050.0):

(https://i.imgur.com/Usrsyda.png)


Let's extract this mag021.tim file and open it with TimViewer:

(https://i.imgur.com/mJGg2S8.png)


As you can see the lowest color value can't reach 0,0,0 (7,7,14 wich explains the blue effect) so let's pick the darkest color and tick the "invisible" box:

(https://i.imgur.com/7VmdKfD.png)


Nice, the "not so black" background is now gone:

(https://i.imgur.com/gUa3cxJ.png)


Save your file and let's re-import it to the magic.fs file with Deling:

(https://i.imgur.com/8hmQSO6.png)


...And let's try it in-game:

(https://i.imgur.com/o8Ccatj.png)


Hurray! :mrgreen:

Now, this is just a proof of concept; the problem is that there's at least 100 textures that needs that operation and they're located in several files (even in the main *.exe file) not to mention the different languages and palettes. So, before I start, is there an easier way or maybe some code to make the game reads the lowest color value invisible?

I can share both *.tim files if someone's interested.
Title: Re: [FF8-PC] Blue artifact on spells dirty fix
Post by: Mcindus on 2018-09-27 01:52:45
OMG YES!!!!

I've been trying to do this for quite some time now... and i've been successful with Tonberry, which has a similar effect to this... I wonder... if you were to modify these tex files, would Tonberry then populate different hash codes? and if so, would these work better than the existing ones for my current magic mod? (hashcode collision issue like the blinking eyes)

I wish there was a way to tell the game that when it gets a textures with a color of 0,0,8 in the background, that it needs to convert that last 8 to alpha OR just to "0" black.  this is how the psx version works... so in theory, you could use cheatengine to look at what happens when a spell is cast on PSX vs. when it's cast on PC and see if you can find the RGB information in the HEX -- then we could use hexedit to make the proper modifications.
Title: Re: [FF8-PC] Blue artifact on spells dirty fix
Post by: Aavock on 2018-09-27 04:09:03
I wonder... if you were to modify these tex files, would Tonberry then populate different hash codes?
Haven't tried it yet but it may work. There's ton of files that needs to be fixed though, curiously enough, some magic textures are ok and do have alpha.

I wish there was a way to tell the game that when it gets a textures with a color of 0,0,8 in the background, that it needs to convert that last 8 to alpha OR just to "0" black.
That would be the best option giving the fact that those textures are located in multiple files and palettes, it's a complete mess. Unfortunately I have no knowledge on hex editing. :oops:
Title: Re: [FF8-PC] Blue artifact on spells dirty fix
Post by: Yagami Light on 2018-09-27 08:36:13
Have you tried extracting the ps1 textures and seeing if they have the same values, if they do its a programming/engine issue, if they don't its a texture issue. The blue thing happens during gf/character animations as well. The fix itself is simple just finding all the files is the long part.