Jump to content

[1.9.x] TUFX - Post Processing


Recommended Posts

TUFX - Textures Unlimited Special Effects

This is a mod for Kerbal Space Program that makes the Unity Post Process (v2) package available for use within the game. All supported effects from the package are available for use within KSP.

The goal of this mod is to add the ability to use industry-standard image post-processing effects during realtime rendering of the game world, allowing for increased visual fidelity in general use, or for specific effects for cinematic purposes through specially configured profiles.

TUFX allows for users to select a specific 'profile' to be used for each game scene. These profiles specify which effects will be enabled for the scene, and specify the values for each of the parameters for the effects.  The included default profiles in the comparison images below have been setup to be low-impact, both visually and performance-wise.  More aggressive post-processing is available through the creation of custom profiles, using the in-game profile editing tools.

Before After
NbYlicE.png dG4UQdz.png
gEBsHnU.png cOkNiuI.png
sxiGJ5X.png d0PrPJY.png
a9xVi27.png Mm6OmRx.png
EpStaK5.png PdiBqns.png
kF9cBvv.png GvakWTa.png

Cinematic Effects (not default profile)

Before After
1UPTEym.png 4c0y5Y5.png
y9crGm6.png iMno4eE.png

Requirements:

  • Windows / DirectX11, required for single-camera setup in KSP
  • ShaderModel 3.5 or later graphics hardware support (5.0+ recommended)
  • KSP 1.9.0 or later, required for single-camera setup
  • No exceptions. No OpenGL. No DirectX12. Definitely not DirectX9.
  • Any other requirements of the Unity Post Process package (look them up if interested)
  • KS3P will cause conflicts. Choose one or the other.
  • Scatterer currently unsupported (it is not yet available for KSP 1.9+)
  • EVE currently unsupported (it is not yet available for KSP 1.9+)

Installation

Releases of the mod will be available from GitHub: https://github.com/shadowmage45/TUFX/releases

Download the most recent release for your version of KSP, open the .zip file, and extract the contents of the GameData/ subfolder from the package into your KSP installations' GameData/ folder (e.g. Your/KSP/Path/GameData/TUFX). Make sure to include any other dependencies and folders (e.g. ModuleManager) that were included in the release package.

Pre-Release Note: Anything marked as a 'Pre-Release' on the GitHub page is exactly that -- a pre-release intended for testing purposes; if you install one of these releases, you are accepting the risks that come with its use (it may not work, may conflict with other mods, may have unfinished features, etc).

Configuration

The mod includes a default profile for each supported game-scene, and these profiles are included in the standard installation. Additional profiles can be added as KSP-CFG files anywhere in the GameData folder; the loading system will locate all installed TUFX_PROFILE configs, and load all detected profiles into memory for selection and use in-game.

Configuration of the mod is best accomplished through the in-game configuration UI. Click the 'TUfx' app-launcher button to open or close the UI; this button should be available in all supported game scenes (except for main-menu, where app-launcher is not supported).

From within the configuration UI, select a profile for the current scene/to be edited (only the active profile can be edited). Once a profile has been selected, press the 'Change to Edit Mode' button on the top of the configuration UI. This will prompt the UI to display the current configuration of the profile.

Press the 'Enable'/'Disable' toggle by an effect title to toggle that effect on or off.

When an effect is enabled the UI will list each of its adjustable properties directly below the effect header row. Each of these properties will have a toggle to enable specifying a custom value; when this is enabled further controls will be displayed to edit the property depending upon the type of property being edited; integer and decimal values show a text input box and slider, color values provide four component input boxes, boolean values provide a simple toggle, etc.

The property list for a currently enabled effect can be hidden/shown by toggling the 'Show Props'/'Hide Props' button on the effect header row. This does not disable the parameters, merely collapses them to help clean up the UI view.

When finished editing a profile, press the 'Export Selected' button at the top of the UI to export the current configuration into the KSP.log file. From there, you can copy the profile out of the log and rename it to create a new profile, or use the data to overwrite the contents of an existing profile config file. TUFX does not support direct-to-file exporting, as no 'Save File Dialog' has been provided by either Unity or KSP, and I have no desire to create one myself, nor deal with the security issues that would arise from its use.

See the included readme.md document for information on config file syntax, and how to manually edit/create profiles.


Performance Comparison

Comparison data gathered on the following hardware (your results may differ):

  • i5-2500k @ 4.5ghz
  • 24g DDR3
  • GTX970
Scene <KS3P> <TUFX> <TUFX-Disabled> <Stock>
KSC NA 142 170 180
Kerbin-Ground NA 105 118 128
Kerbin-Orbit NA 125 150 165

KS3P was unavailable at the time the testing was performed, so no data was gathered.

Dependencies

Known Issues and Bug Reports

See the github issues repository: https://github.com/shadowmage45/TUFX/issues

The change to use HDR rendering can cause occasional artifacts.  If these are present, you can turn off HDR in the profiles by setting the hdr flag to 'False'.

Licensing/Legal

Credits

  • @Shadowmage - Coding and development.
  • @SQUAD - For creating and publishing KSP.
  • @sarbian - Forking and maintaining ModuleManager
  • @The White Guardian - For creating KS3P, without which I would have never known about the Unity Post Process packages.
Edited by Shadowmage
Link to post
Share on other sites
29 minutes ago, VoidCosmos said:

Does it work with RO and RSS?

This mod alters the way that KSP sends data to the GPU to draw onto your screen. It is technically immune to conflict with any mod, except others like itself (KS3P, Reshade...)

@Shadowmage congrats on the epic new release! :)

Link to post
Share on other sites

So... it's a mod to make my eyes bleed as I strain to see the blurry areas with any clarity.  I am impressed.  Total bleed time is off the charts, and time to bleed start is incredibly short compared to other eyes-bleeding mods available.

 

Maybe I'm missing the point... good work though.

Link to post
Share on other sites
1 minute ago, Gaalidas said:

So... it's a mod to make my eyes bleed

Not necessarily. KS3P's default settings were excessive mainly to clearly show what it's capable of, all at once. But I took it that documentation for the settings and profiling were non-existent. Used well, post-processing mods add to how the universe itself feels and helps that much more in their own special way to making KSP look/feel [realistic; or like it was built to fully exploit the GPU like high class games of this generation].

Just the advanced shadow effects (AO, more point lights and shadow casters, best example is the Mun crash scene) can do wonders for a game with barely there graphics. The shadows round the KSC are a misfire (way too much spread) imo. It tells me that the AO raytracing length (or shadow strength) may be excessive. But, like KS3P, that may just be to clearly show the power of this mod, or I haven't seen examples that confirm that shadows between buildings would behave like this.

 

Link to post
Share on other sites
1 hour ago, Gaalidas said:

So... it's a mod to make my eyes bleed as I strain to see the blurry areas with any clarity.  I am impressed.  Total bleed time is off the charts, and time to bleed start is incredibly short compared to other eyes-bleeding mods available.

 

Maybe I'm missing the point... good work though.

As previously mentioned, these features are present in 99% of other games. Go look at the KSP2 previews and you'll find the same effects set to eleven. I would agree, by default, they might be "over the top" but it's configurable and much like I had with KS3P, I'll be making my own subtle configs. Small amounts of AO and Bloom really do make a huge difference, adding depth and impact to the scene without the eye bleeding.

At least here, you can customise everything to your liking whereas in most other games, these settings will be either on or off to the developers tastes.

 

Edit: Here, this menu is likely what you are missing...

Spoiler

CCBB6C9243EC1BF6A1CB0EC32CD4BE9BFFC76FEA

Downloaded, installed, disabled some things, tweaked 3 or four sliders....no more vaseline or overgrown "shadows".

;D

 

@Shadowmage

Are there plans to introduce TAA or other post process anti aliasing?

Edited by Manwith Noname
Link to post
Share on other sites

While I personally think the HDR disco lights are quite amazing (no really, I've just spent a good 20-30 minutes moving the camera around getting them to popup for entertainment), it might be worth adding more importance to that as a warning for people with epilepsy.

When I wasn't so distracted by the multicolourstroboscopes, I started playing with actual settings...

Spoiler

AB9D719E2C1BC0CDCC952195D5FD986238C49AA1

I think I'm likely to lose entire weeks tweaking this.

Link to post
Share on other sites
4 hours ago, Gameslinx said:

Is this the successor to KS3P? Very nice to see an up-to-date version :) 

Pretty much, yes.  Uses the newer Post Process Package v2.x, and works in newest KSP versions, but both do the same things for the most part.

43 minutes ago, linuxgurugamer said:

Any chance to have this work on 1.8.1?  Asking because Kopernivus is not yet updated to 1.9.1

Might (should load fine), but might have artifacts in places where the multi-camera setup is used.  Can't guarantee anything, nor can I offer any support for issues on older KSP versions.

Just now, Manwith Noname said:

While I personally think the HDR disco lights are quite amazing (no really, I've just spent a good 20-30 minutes moving the camera around getting them to popup for entertainment), it might be worth adding more importance to that as a warning for people with epilepsy.

Yeah, I'm going to change the default profiles to not use HDR, I think.  Will have to redo the color grading and bloom settings, maybe tweak a few others.   Might still include HDR profiles as well, as they can be better looking for screenshots.

3 hours ago, JadeOfMaar said:

The shadows round the KSC are a misfire (way too much spread) imo.

Yeah, probably need to tweak the AO settings a bit in the defaults; they are meant to be not so 'in your face'.  Likely will turn off the chromatic aberration as well, as that tends to only blur things.

2 hours ago, Manwith Noname said:

Are there plans to introduce TAA or other post process anti aliasing?

https://github.com/shadowmage45/TUFX/issues/13

Yep, AFAIK its just a toggle I need to flip, and write a UI to support changing settings.  Shaders and LUTs are already loaded in the asset bundles.

3 hours ago, Gaalidas said:

So... it's a mod to make my eyes bleed as I strain to see the blurry areas with any clarity.  I am impressed.  Total bleed time is off the charts, and time to bleed start is incredibly short compared to other eyes-bleeding mods available.

:)  Pretty much.  It doesn't have to be so blurry (some of the defaults might be a bit over-the-top), and (in the future) could be used simply for the different types of anti-aliasing if desired.  (might have to steal that quote though ;) )

Link to post
Share on other sites
24 minutes ago, linuxgurugamer said:

Thanks, I was wondering if it was using some of the newer features in 1.9.1

Yeah, it does, a bit.  Wouldn't hurt to try though :) (interested myself if it works, but no 1.8 installs around anymore).

-Might- also work with OpenGL / DX12; compilation targets and shader variants are also included, but untested due to the mutli-camera setup likely causing issues.

Link to post
Share on other sites

@Manwith Noname

Various AA settings:

No AA

ZAthNog.png

8x MSAA (hardware)

ANlE01P.png

FXAA

fNQA6V5.png

SMAA

BWnFNqH.png

TAA

S9ixerG.png

 

Should have this setting included for the next round of updates.

23 minutes ago, jrodriguez said:

I will give a go using DX12 (I might recompile the shaders if necessary)

Already built-in; just untested, and fully unsupported (you are on your own in that territory, don't even bother reporting any issues, as I won't fix them).

23 minutes ago, jrodriguez said:

After the Scatterer blocker issue with the single camera setup I have the feeling that DX12 is going to become mandatory for me.

Just need to wait for scatterer to update.  Not sure why everyone is so dead set on trying to get Scatterer working in 1.9, when @blackrack himself said to just be patient for a couple of weeks, and it will all work under DX11 in the future (and likely with better performance).  There is no 'blocker issue', you all just need to be patient and wait for devs to do our stuff.

 

Edited by Shadowmage
Link to post
Share on other sites
33 minutes ago, Shadowmage said:

@Manwith Noname

Various AA settings:

No AA

ZAthNog.png

8x MSAA (hardware)

ANlE01P.png

FX

Already built-in; just untested, and fully unsupported (you are on your own in that territory, don't even bother reporting any issues, as I won't fix them).

Just need to wait for scatterer to update.  Not sure why everyone has such a hard-on for trying to get Scatterer working in 1.9, when @blackrack himself said to just be patient for a couple of weeks, and it will all work under DX11 in the future (and likely with better performance).  There is no 'blocker issue', you all just need to be patient and wait for devs to do our stuff.

 

Don't get me wrong. I'm a Dev myself and KSP modder. I really hope that the Scatterer can be fixed with just one line of code to deactivate the single camera setup. My main concern is that these things can go from one line of code, to require a nasty serenity patch or to even require a new KSP release.

By the way, is the Ambient Occlusion the new Multi Scale Volumetric Occlusion?

 

Link to post
Share on other sites
3 minutes ago, jrodriguez said:

By the way, is the Ambient Occlusion the new Multi Scale Volumetric Occlusion?

Yes; both shaders are included, but only the MSVO is exposed to the API/configs.  Didn't see much of a need to include both.

Link to post
Share on other sites

You write "EVE currently unsupported (it is not yet available for KSP 1.9+)" in the OP. Does that mean there is a known incompatibility?

Or just that because EVE is not updated any issues must be unsupported?

Edited by Warezcrawler
Link to post
Share on other sites
1 hour ago, Warezcrawler said:

You write "EVE currently unsupported (it is not yet available for KSP 1.9+)" in the OP. Does that mean there is a known incompatibility?

Or just that because EVE is not updated any issues must be unsupported?

TUFX requires KSP 1.9.x + DX11; EVE has issues with KSP 1.9.x + DX11, regardless of TUFX being installed.  Once EVE works with KSP1.9.x + DX11, there should be no issues using both.

(it is not a mod incompatibility; it is an EVE not updated yet issue)

Link to post
Share on other sites
3 hours ago, Shadowmage said:

Various AA settings:

New toys!

 

2 hours ago, Shadowmage said:

Yes; both shaders are included, but only the MSVO is exposed to the API/configs.  Didn't see much of a need to include both.

Does the old AO suffer from the same banding due to the far clip? That might be reason to consider having both options if not.

Link to post
Share on other sites
39 minutes ago, Nightside said:

 It starts up ok and looks good in static scenes, but there are weird artifacts in flight scene...

Those artefacts are "normal" when HDR is enabled. I've noticed they tend to emanate from the horizon, particularly where water is involved. If I look to the horizon where land meets the sky, they rarely occur. I've also noticed that the transparency issue with stock part shaders and HDR seems to produce negative images...

Spoiler

2F54E676DB5EDCAD597A0AAF22C294BCB685D593

 

Link to post
Share on other sites
2 hours ago, Manwith Noname said:

Does the old AO suffer from the same banding due to the far clip? That might be reason to consider having both options if not.

Unknown, didn't test.  Its a simple 'mode' setting in the AO profile, so I can probably add it to the UI and load/save stuff.  Never hurts..

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...