FXAA Injection?

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Inoperable
Posts: 11
Joined: Wed, 28. Dec 11, 11:41

FXAA Injection?

Post by Inoperable » Fri, 30. Dec 11, 11:41

UPDATE:

To enable FXAA Injection in X3:TC or/and X3:AP do the following:

1. Download FXAA Injector files - I use the same files that I use for SKYRIM, but there is probably a newer version around, Google it

2. Install all the files into the game Dir

3. Start X3 and set Antialiasing to OFF in game settings

4. Set your own Antialiasing settings in Nvidia Control Panel and Override the Application settings

5. Set your Injector settings in injFX_Settings.h

Mines are:
#define USE_ANTI_ALIASING
#define USE_PRE_SHARPEN
//#define USE_BLOOM
//#define USE_TECHNICOLOR
//#define USE_TONEMAP
//#define USE_SEPIA
//#define USE_VIGNETTE
#define USE_POST_SHARPEN
#define USE_FINAL_LIMITER

6. Start the game

7. Profit

The Injector in it's default settings enables all kind of filter so it will look strange the first time you run it. Don't scary yourself. Thats ok and it means the Injector works.

Disable the stuff you don't like (Bloom/Technicolor/.../)
IMPORTANT: disable anti aliasing in X3:TC / X3:AP settings otherwise the injector won't work in Fullscreen mode
Last edited by Inoperable on Fri, 30. Dec 11, 20:34, edited 2 times in total.

qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie » Fri, 30. Dec 11, 12:47

all i know is if you have nvidia card you can force this game to use higher antialiasering and higher anisotropic texture filtering.
So for example you can set the game graphic setting to 4x antialiasering and 4x anisotropic texture filtering and via nvidia control setting force the game
to use much highter settings (depending on videocard).

Your mentioned link is new to me .. not sure how that works.

edit : btw, X3 AP is setup somewhat differently then X3 TC, i would check
first if it works on X3 TC

edit 2 : i read up on this topic and its very interesting material. looks like this is coming from a nvidia techn who is developing it on driver level. appearently some beta nvidia drivers are already using it ? interesting stuff.

Inoperable
Posts: 11
Joined: Wed, 28. Dec 11, 11:41

Post by Inoperable » Fri, 30. Dec 11, 13:33

Yup. I use it in Skyrim and it gives hell a lot to the graphics. I'm trying to enable it in X3:AP now. Will post what I find out.

I'd like to get the Sharpen filter running ;-)

User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden » Fri, 30. Dec 11, 14:52

you can turn up the saturation/contrast on your screen or in the driver settings, no need for "FXAA injector" to get "better graphics"

and AA&AF can also be turned higher via driver in both ati and nvidia since x years. I don't see the benefit of that thing tbh.
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image

qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie » Fri, 30. Dec 11, 15:00

FXAA is rumoured to be perferming equally or better as AA but with lesser costs (giving you more FPS) .. specifically on dx9 games. This could be interesting to get more FPS out of old games like X3 TC and X3 AP (old as in running with DX9). For older computer or computers with lesser videocards thats something to look forward to.

to op : i got the tool you mentioned to work with X3 TC but i'm not sure how to interpret it, zero experience with it. Will see what you come up with.

LINK to thread about this tool, and where you can also download it :
http://forums.guru3d.com/showthread.php?t=355472

(check with Files if you wanna download : FXAAToolHg4.zip is latest version)
Last edited by qwizzie on Fri, 30. Dec 11, 15:20, edited 1 time in total.

User avatar
Killjaeden
Posts: 5366
Joined: Sun, 3. Sep 06, 18:19
x3tc

Post by Killjaeden » Fri, 30. Dec 11, 15:15

AA and AF is performed by the gpu iirc, so you will propably gain 0 benefit, because the CPU is the bottleneck of X3
[ external image ]
X-Tended TC Mod Team Veteran.
Modeller of X3AP Split Acinonyx, Split Drake, Argon Lotan, Teladi Tern. My current work:
Image

qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie » Fri, 30. Dec 11, 15:24

the bottleneck also depends on yr pc / videocard. If you have older pc or older videocard this could in theory grant you more FPS or gets you better visuals.
**in theory**

if Nvidia themself are putting so much effort in it.. it must mean something
(try google for ''nvidia 295.18 FXAA'')

Here is some interesting stuff about FXAA in general and some test done on a game that has specifically FXAA in their engine.

http://www.hardocp.com/article/2011/07/ ... echnology/

User avatar
TrixX
Posts: 2035
Joined: Wed, 18. Aug 10, 14:28
x3tc

Post by TrixX » Fri, 30. Dec 11, 16:03

As KJ mentioned if you have any sort of good gfx card or even pretty bad the game is 99% CPU bottlenecked. It requires a lot of single core horsepower to run making the GPU less important in about the only modern game about doing this still.

Most other games have at least 3-4 core support now negating the single core issue, but X3 is not one of them.
"If you’re not prepared to be wrong, you’ll never come up with anything original."
Sir Ken Robinson

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Fri, 30. Dec 11, 16:07

X3:TC/AP is CPU bound even with older cards, so it probably wont make much diffrence to FPS unless your running a EXTREAMLY old card that well - you just shouldnt be using :P
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie » Fri, 30. Dec 11, 16:40

well, i was thinking of laptops with less then medium videocards.
The upcoming beta nvidia driver seems to focus on mobile videocards
(in laptops) in particular. A lot of ppl using older videocards cant even use
full settings, let alone full AA.

I have this laptop with a good processor (Intel i5 first gen) but with an outdated videocard, i'm forced to set AA on 2x and all other settings on medium just to get playable FPS.

With the upcoming driver release or maybe this tool we can profit from gaining extra visual depth in the game... who knows.

I'm willing to keep an open mind, besides the topic sparked my interest :)

qwizzie

Inoperable
Posts: 11
Joined: Wed, 28. Dec 11, 11:41

Post by Inoperable » Fri, 30. Dec 11, 17:41

Guys,

FXAA does not "only" gives you a better AA or better sharpening - It truly enhances the graphics better then any driver settings.

I can't get the same results in Skyrim without FXAA injection through drivers or anything else.

For example the sharpening filter is a must ;)

Inoperable
Posts: 11
Joined: Wed, 28. Dec 11, 11:41

Post by Inoperable » Fri, 30. Dec 11, 17:43

QWIZZIE:

How did you get it to work? I can't see any difference - meaning it does not load in my case.

User avatar
Axeface
Posts: 2943
Joined: Fri, 18. Nov 05, 00:41
x4

Post by Axeface » Fri, 30. Dec 11, 18:11

I was thinking about asking this myself yesterday. In Skyrim FXAA worked wonders.
It smoothed out trees, as the inbuilt edge blur wasnt enough, and it also had 0 impact on FPS, where setting AA in Skyrim did.

If you could get it to work, it could smooth out distant stations.
Looking forward to seeing if it works!

Inoperable
Posts: 11
Joined: Wed, 28. Dec 11, 11:41

Post by Inoperable » Fri, 30. Dec 11, 18:15

UPDATE 1:
Works with Albion Prelude - only in Windowed Mode o.O
meaning the AA is disabled, but I definitely got the sharpening effect and other settings working. Still no AA. Strange.

UPDATE 2:
Works with Terran Conflict, but only in Windowed Mode

Can't find out why the injector does not work in Fullscreen Mode though.

UPDATE 3:
Enabled FRAPS and watched the performance.
Fullscreen Mode I got 60fps with maxed everything (32AA/16AF/AA Transparency SuperSample x 4) and I get 60 fps

in Windowed Mode I get 36 fps o.O

First I thought thats because of the Injector so I disabled it and I still got 36 fps. This is really strange. If I go fullscreen with maxed out settings in Nvidia Control Panel I get 60 fps. If I do the same in Windowed Mode I get 36 fps.

Still I'm overriding the Application Settings in case of Windowed Mode since I can't enable AA otherwise.

UPDATE 4:
Now I get it in Fullscreen as well ;-) Sweet. Sharpen filter makes a lot of diffrerence. Things are more "crispy"

For making it work:

1. Download FXAA Injector - I use the same files I use for SKYRIM, but there is probably a newer version around, google it
2. Install all the files into the game Dir
3. Start X3 and set Antialiasing to OFF in game settings
4. Set your own Antialiasing settings in Nvidia Control Panel and Override the Application settings
5. Set your Injector settings in injFX_Settings.h

Mine are:
#define USE_ANTI_ALIASING
#define USE_PRE_SHARPEN
//#define USE_BLOOM
//#define USE_TECHNICOLOR
//#define USE_TONEMAP
//#define USE_SEPIA
//#define USE_VIGNETTE
#define USE_POST_SHARPEN
#define USE_FINAL_LIMITER

6. Start the game
7. Profit

The Injector in it's default settings enables all kind of filter so it will look strange the first time you run it. Don't scary yourself. Thats ok and it means the Injector works.

Disable the stuff you don't like (Bloom/Technicolor/.../)
Last edited by Inoperable on Fri, 30. Dec 11, 20:29, edited 3 times in total.

dougeye
Posts: 2409
Joined: Sat, 7. Mar 09, 18:29
x3tc

Post by dougeye » Fri, 30. Dec 11, 18:30

could it be an issue with x3 games abilityies to run in the background and when minimised? + i believe skyrim runs in whats known as a false window mode, im not to upto date on my window modes lol
I used to list PC parts here, but "the best" will suffice!

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Fri, 30. Dec 11, 19:02

Inoperable wrote:UPDATE 1:
Works with Albion Prelude - only in Windowed Mode o.O
meaning the AA is disabled, but I definitely got the sharpening effect and other settings working. Still no AA. Strange.

UPDATE 2:
Works with Terran Conflict, but only in Windowed Mode

Can't find out why the injector does not work in Fullscreen Mode though.

There are major diffrences between fullscreen and windowed mode when it comes to DirectX, while the end user code doesnt change (much if at all), internally DirectX runs Windowed and Fullscreen in diffrent ways.

Quite a few internal flags change depending on witch mode your in, any number of these could be causing problems with FXAA, It is after all a hack (DLL injection), so its bound not to work on same games & modes.

If it is a code/compatability problem, i dont think you will be able to fix it as FXAA is closed source (i think?)

Another problem could be that X3 is running its own fullscreen shaders that are conflicting, but thats just a guess.
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie » Fri, 30. Dec 11, 19:09

FXAA as tool is an open source project i think

quote :

'' All source code used for the tool, with exception of d3d9.dll source code, is available on Mercurial Hg: http://www.assembla.com/spaces/fxaa-pp-inject/wiki ''

to OP : maybe you can ask around on their site, if they experienced this problem with other games.

another option is waiting for the official Nvidia (beta) driver .. shouldnt take too long i guess since one was leaked anyways
Last edited by qwizzie on Fri, 30. Dec 11, 19:15, edited 1 time in total.

User avatar
Jack08
Posts: 2993
Joined: Sun, 25. Dec 05, 10:42
x3tc

Post by Jack08 » Fri, 30. Dec 11, 19:14

the d3d9 proxy dll is the sourcecode that would likely be required to fix this, thats the part i was refrencing. Looks thats the only part that they are not releasing :D

shame, would love to see how its done, i failed to hijack the shader engine of directx with my own DLL in X3... could never get it to stabilize
[ external image ]
"One sure mark of a fool is to dismiss anything that falls outside his experience as being impossible."
―Farengar Secret-Fire

Inoperable
Posts: 11
Joined: Wed, 28. Dec 11, 11:41

Post by Inoperable » Fri, 30. Dec 11, 20:36

I make it work in Fullscreen as well ;) Had to disable Antialiasing in X3:AP settings. Don't ask me why but now it works. I'm getting Antialiasing through the OVERRIDE function in Nvidia Control Panel to work.

Graphics looks really nice and I got my 60fps back ;)

qwizzie
Posts: 562
Joined: Thu, 1. Jun 06, 12:17
x4

Post by qwizzie » Fri, 30. Dec 11, 21:09

can you tell me what options / filters you use in that tool for X3 TC / AP ? There are a lot of filters and options you can use in there and i assume not all work really well in X3 TC / AP ?

Post Reply

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”