Custom graphics driver for FF7/FF8 [v.1-.7.6]

  • Thread starter Thread starter halkun
  • Start date Start date
Status
Not open for further replies.
If you modify the backgrounds, you have to do it properly (improve the picture as a whole, then re-cut it)

Otherwise you'll get all sorts of artifacts as the different layers bleed over into each other

Even linear filtering for textures (standard feature in opengl) has to be disabled for field to look good
It's the way Square constructed the scenes.  Basically they have some sort of software Z buffering technique and assign each layer a depth. This determines the ordering of what is drawn, 3d objects inclusive. The 2d objects are not drawn in 3d but 2d but are depth sorted as stated.  So things go something like "background" which I suppose has infinite depth in this case. Then sorted 3d objects (character people etc) with sprite objects and lastly foreground objects (IE infinitely close to the camera). 

Transparent objects (alpha blend objects) also exist but they are done in the foreground depth (overlaying things). You see this in area's like the wall market.
That being said, if you want hirez tile sets they must be an integer multiple of the original tileset just like the screen needs to be as well.
I'm not sure if it's possible to use 3d objects strected and depths to give perfect alignment at various resolutions.
(render the background to a texture and paste the texture on a surface which would have the effect of something akin to wolfienstien).

The only way to make improved backgrounds is as said before they must be cut from the same template coordinates, or integer multiple, as used before.


Cyb
 
ff7%202009-04-01%2015-58-27-31.png


Did I just get field models working? Well no, not really, that image was generated using a hardcoded matrix, positions are all wrong anywhere else :-P

But I have the rendering down, the savepoint rotates, the power soul shimmers etc :-)
 
Last edited:
Got some VERY nice new screenshots :-)

This is actually a debug shader I use to determine z coordinates, but it makes for a cool effect; here odin going up against a dragon :-)
ff7%202009-04-02%2001-21-05-59.png


Normal battle, with menus hidden for extra impressive screenshots :-D
ff7%202009-04-02%2001-23-56-54.png

ff7%202009-04-02%2001-24-01-62.png

ff7%202009-04-02%2001-24-09-87.png

ff7%202009-04-02%2001-24-56-03.png


Now the bad news, sorting out z-coordinates (pun unintended) turned out to be really tricky, these new battle and field models are inconsistent with both the world map and field tiles, making it fit perfectly everywhere is going to be a b*tch.
 
Last edited:
i wonder where could frame animation interpolation be done. is it a resposibility of the graphics driver, or is it in the game exe, in case of ff7?
 
Indeed, the animation is already done before it hits the graphics driver, I get a bunch of .p groups and a set of matrices to transform them with, thats all.
 
This would be a truly amazing addition to all the mods here... it opens up so many new possibilities!

Seriously... amazing progress. If this is released it'll be amazing!
 
ok, I have to ask,  how does your debug shader help determine Z-coordinates? the deeper the shade of red, the smaller the coordinate (or larger, whichever one means closer)
 
red = closer to the screen
yellow = further from the screen
black = Up against the screen
 
I recently discovered that FF7 has support for custom graphics drivers, with the right config it will load a dll and use that instead of its internal drivers (I also found the OpenGL driver, which works surprisingly well although its not really playable due to massive glitches)

So, my question is this, has anyone ever tried implementing a new graphics driver for FF7? I don't care if it worked or even displayed anything, any info you could provide would be great

I'm going to play around with it for a while, I have already mapped out parts of the direct3d driver and many of the internal structures in FF7 (including .tex, .tim and .p formats if anyone wants some info on that) but if we got some talented people together we could probably make a reasonably good OpenGL driver and never have to worry about poor DX5 compatibility again :-)

:EDIT:

Link to latest release: https://www.ff7catalog.com/posts/78053/
 
Last edited:
Thanks for this Aali.

I realise your installation instructions are perhaps the simplest of every thing, but I clicked the .reg to change the registry and was told that the registry has been changed. Upon running my game I notice no difference whatsoever. I tried a good few different scenarios such as cosmo canyon, mt corel on world map, start of game etc and was able to view movies also. The only thing I noticed was a strange discoloration of cosmo canyon itself, but other than that it ran exactly the same as it always does. This leads me to believe that it either didn't install correctly or is just perfect....

Although its more than likely that it didn't install correctly, because for some reason when I've tried to make changes to the game recently the changes haven't taken any effect. I.e. I've put a new model in and it just doesn't appear and shows the previous one instead. I might have to post a "help me" thread about it.

Where do you have definite known glitches so that I can copy the situation to test to see if my FF7 is actually running your driver?
 
Although its more than likely that it didn't install correctly, because for some reason when I've tried to make changes to the game recently the changes haven't taken any effect. I.e. I've put a new model in and it just doesn't appear and shows the previous one instead. I might have to post a "help me" thread about it.
Going on a limb here, But maybe it's the Vista virtual store, That happened to me. It's probably not cause you're waaay better with tech stuff then me.

But it's a thought
 
If it is something to do with VirtualStore (thanks for bringing that up by the way, because I'd forgotten about it) then how could I circumvent the issue?

You see, changing folder permissions within the program files folder doesn't seem to work for me. I've tried giving myself and other programs full access but every time I click apply, it seems ok until I go back into it and discover it's been taken away again. Also, for some bizarre reason FF7Music doesn't seem to be working anymore. Its just stopped loading any music files, which is rather confusing because it worked the last time I played which was 3 days ago.

And also, everytime I try to run FF7Music or FF7 on its own "as an administrator" I get the "FF7.exe has stopped working" nonsense.

I can see virtual store being the issue with changing models, but I can't see it in this instance. If "installing" the new FF7 graphics driver is a case of just modifying the registry, and my computer is telling me that it has successfully modified the registry... then it should be using the graphics driver it's pointing to, no?

Sigh.

Perhaps then the issue is that even with the registry modified, the files aren't "really" there and therefore aren't read, so FF7 defaults to that of FF7Config.

Which begs the question...

Aali... is there a way to run this from a location outside of the FF7 folder? I intend to find a more long-term solution but for the time being, just for testing purposes. Perhaps modifying the registry manually?

EDIT: Just as a small side-note and for no particular reason... I'd like to point out how ironic it is that now everytime I start up FF7 I'm actually hoping the movies don't work.
 
Last edited:
Oh man this is an amazing project.  Gonna give this a test tomorrow.
 
If it is something to do with VirtualStore (thanks for bringing that up by the way, because I'd forgotten about it) then how could I circumvent the issue?

You see, changing folder permissions within the program files folder doesn't seem to work for me. I've tried giving myself and other programs full access but every time I click apply, it seems ok until I go back into it and discover it's been taken away again. Also, for some bizarre reason FF7Music doesn't seem to be working anymore. Its just stopped loading any music files, which is rather confusing because it worked the last time I played which was 3 days ago.

And also, everytime I try to run FF7Music or FF7 on its own "as an administrator" I get the "FF7.exe has stopped working" nonsense.

I can see virtual store being the issue with changing models, but I can't see it in this instance. If "installing" the new FF7 graphics driver is a case of just modifying the registry, and my computer is telling me that it has successfully modified the registry... then it should be using the graphics driver it's pointing to, no?

Sigh.

Perhaps then the issue is that even with the registry modified, the files aren't "really" there and therefore aren't read, so FF7 defaults to that of FF7Config.

Which begs the question...

Aali... is there a way to run this from a location outside of the FF7 folder? I intend to find a more long-term solution but for the time being, just for testing purposes. Perhaps modifying the registry manually?

EDIT: Just as a small side-note and for no particular reason... I'd like to point out how ironic it is that now everytime I start up FF7 I'm actually hoping the movies don't work.
Hmmm. Puzzling.... Sitting here trying to think of why it would do this, I haven't been on Vista in so long (been using Windows 7, and that issue no longer plagues us. :P)
Can you install FF7 other then in the default folder? I'd try doing that (if you can) and see if it works, Or just try reinstalling FF7 all together. If it also fails then i'd say the issue is with your computer, I don't mess with the Registry so i could be wrong here, But if it was done on Vista 64 (or you have vista 64) and/or XP would that cause a problem?

again forgive my lack of knowledge of these things, just throwing out ideas.
 
I guess you could double check the registry yourself,

HKEY_LOCAL_MACHINE\SOFTWARE\Square Soft, Inc.\Final Fantasy VII\1.00\Graphics

Driver should say 3, while DriverPath should point to the dll

(if for some reason the dll fails to load, it will silently revert to d3d, so that might be something to look into aswell)

:EDIT:

Oh, and DriverPath is relative to the working dir of ff7.exe so it should not matter where you installed it

:EDIT2:

I should also point out that I have only tested this on XP SP3, for all I know, it may not work at all on Vista/Windows 7 (Although it really should)
You will notice when the driver is running, it will skip the intro movie and go instantly to the credits scene when you start the game.

:EDIT3:

It seems the snowboard minigame is not completely broken, you just can't see anything unless you pause it. (And when you unpause it will start filling the screen with garbage, so you have to pause/unpause all the time)
 
Last edited:
I've just checked it and its apparently pointing to the right place.

If anyone else is using Vista and having this issue, please speak up. I'd like to know how to get around it. I'm gonna try a full re-install tomorrow morning. (as in, not installing it in the program files folder.)
 
I ran it through IDA on Vista 64-bit and the problem is the registry keys are not located in the same place on Vista 64-bit as in XP.

Modifying these keys does the trick:
Code: [Select]
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Square Soft, Inc.\Final Fantasy VII\1.00\Graphics]"DriverPath"="ff7_opengl.dll""Driver"=dword:00000003"Mode"=dword:00000002"Options"=dword:00000012
 
Hmm, seems I'll have to provide more .reg files next time.. thanks magixts.

Added another fun feature just now, it is now possible to run FF7 in any resolution without modifying FF7.exe :-)

Field looks pretty bad though, I'll probably have to adjust the TNT fix (which is really just alternate pixel center "emulation") for this to work 100%

This will pretty much kill the high-res patch since now you can high-res FF7 without getting any of the bugs/glitches. (This is a "real" fullscreen resize and FF7 doesn't even know about it)

Unfortunately, only multiples of 320x240 are going to look really good (because thats just how the engine works) but "laptop resolutions" (1280x800 etc) should still see an improvement over 640x480
 
I tested this out and it seems to work fine enough for me  :-D
You haven't uploaded the new screensize-feature version yet, have you?
It sounds extremely useful!
 
Status
Not open for further replies.
Back
Top