Help & Support

1. System Requirements

Windows 7 or later, installed Prepar3D v4 only, 50+ MBytes on hard drive. The tool was designed for Prepar3D versions 4. All adjustments and tweaks are unavailable for unsupported versions.

The tool is incompatible with FSX to Prepar3D Migration Tool (in enabled state).

2. How to install PTA

PTA is a standalone portable application and not requires specific installation procedure. Just unzip distribution archive in separate directory that not requires administrative privilegies.

Before working with tweaks, please make sure that you have all original Prepar3D shaders in sim. Tweaked or modified shaders can't be used by PTA and will be ignored. (See ERROR messages in log.) In this situation just put the original version of shader in sim and PTA will catch them at next start.

At fisrt start the tool should automatically detect target P3D version, find proper P3D installation directory, shaders cache directory, and create backup of used in tweaks shaders to \SHADERS_BACKUP subdirectory in main PTA directory. Config files, used by tool, will backup to \CONFIG_BACKUP. Please do not delete or modify contents of those subdirectories! Or you will loose ability to restore original sim files!

3. Uninstalling PTA

Since the utility makes changes to the shaders of Prepar3D it's important to restore them to original state. Please don't forget about step #1.

1. Use "Restore original P3D shaders" in Actions menu. All shaders that was properly stored in backup will be restored to sim.
2. Use "Restore initial config files" in Actions menu. Main config file that was properly stored in backup, will be restored.
3. Delete main directory of PTA.

Uninstalling complete.

4. Upgrading notes

When you upgrade or downgrade version of Prepar3D, tool should detect that and ask your permission to delete outdated shaders files from backup. If you select YES, outdated shader backups will be deleted and recreated from new P3D version. But PLEASE MAKE SURE THAT YOU HAVE ORIGINAL SHADERS IN SIM!

All presets (*.ini files) are compatible with the different versions of Prepar3D, but some tweaks may be inactive. It depends on specificity of simulator version you are using.

When new PTA version released, presets compatibility issues and upgrade procedure describes in release notes.

5. Working with presets

Shaders are a programs running on GPU that tells a computer how to draw something in a specific and unique way. PTA tool modify P3D shaders that used by sim to render scene. These modifications become active only at next start of sim, so changes can't be visible "on-the-fly". Thus, to make changes, close Prepar3D application, open PTA and apply desired tweaks. After that start sim.

You don't need start PTA everytime you start sim. The tool makes persistent modifications in shaders files that used by P3D every time later.

Tweaks with customized settings and sim config parameters group in preset. You can save, rename, load preset from file with main menu "Preset". Also you can share your preset with the other people (share ini-file that contains preset).

Activation of each tweak is performed by its checkbox on the left tweaks panel. If checkbox not checked, tweak not applied. All tweaks have a hints on their features and many of tweaks are illustrated. Use "Images..." button to get tweak illustration.

Menu command 'Disable all shaders tweak" deactivates all tweaks in current preset. Command "Set initial tweaks options" allows to restore "default" values for tweaks. All new presets create with that initial values. You can also restore initial parameter for the single tweak by using button "Restore defaults".

Activate the desired tweaks, set the options for tweaks you want and then use "Apply preset" menu item or F9 key to install changes to sim. After applying preset, sim shaders cache clears automatically. Keep in mind that after clearing shaders cache Prepar3D needs extra time to form the scene (shaders recompilation).

Advanced users can use not only numbers as a tweak parameter, but expressions with shared shader variables.

IMPORTANT! Please be carefull while editing these expressions in tweak parameters. Usually parameters are fixed numbers like 0.23 or so. PTA doesn't provide any syntax check and incorrect input values can cause problems. If the rendered scene is corrupted (or you see a black screen) it most likely due to the shader not compiling. To see compilation errors content error logging must be enabled. Switch on "Content error logging" option in General section in sim. Prepar3D must be restarted with this flag enabled and then shut down to have the errors logged. These are logged to the ContentErrorLog.txt located in the %USERPROFILE%\Documents\Prepar3D v4 Files directory.

It's highly discouraged applying tweaks when the Prepar3D is running

6. Post-processing

PTA include set of adapted shaders used by famous Reshade (SweetFX) tool. For detail information please visit http://reshade.me/.

If you want to add these post-processing effects to sim, use tweak "Custom post-processing". Activate the tweak itself, set desired parameters of effects and tick their checkboxes in list. Selected effects will apply to all views in sim as a part of Prepar3D HDR shader. The order of effect activation could be important and depends on set of shaders used. You can set the order by using Drag-n-Drop or Up, Down buttons.

IMPORTANT: To use post-processing, you SHOULD turn on HDR Lighting option in sim. However, if you don't use Prepar3D HDR Lighting and only need post-processing, you may set "Turn off Prepar3D HDR" checkbox.

Use "Restore defaults" button to return to default settings for selected post-effect.

In addition to effect-specific parameters each post-effect shader has parameter "DayNightUse". The value of this parameter specifies when post-process will be active:

DayNightUse = 0 - post-effect will work all the time; 1 - active only at daylight; 2 - night; 3 - twilight; 4 - day and twilight; 5 - night and twilight.

Advanced users can use not only numbers as a post-effect parameter, but expressions with shared shader variables.

Troublshooting post-processing

IMPORTANT! Please be carefull while editing parameters of custom shaders. Usually parameters are fixed numbers like 0.23 or so. PTA doesn't provide any syntax check and incorrect input values can cause problems. If the custom post-process effect is not being displayed it most likely due to the shader not compiling. To see compilation errors content error logging must be enabled. Switch on "Content error logging" option in General section in sim. Prepar3D must be restarted with this flag enabled and then shut down to have the errors logged. These are logged to the ContentErrorLog.txt located in the %USERPROFILE%\Documents\Prepar3D v4 Files directory.

7. Prepar3D config parameters

In addition to shaders modifications, it's often useful to use it with relevant configuration parameters of Prepar3D. Activate this function by ticking the "Tweak P3D main configuration file" checkbox. Put the desired fragment of configuration settings in the text box manually, or choose directly from the current prepar3d.cfg by using the button "Add from Prepar3D.cfg...". Put ONLY those sections/values that you want add or change in the main config file. If a section/value does not exist, it will be created.

You can apply changes in Prepar3D.cfg without modifying shaders by using button "Apply".

IMPORTANT! While manually editing a configuration fragment, take care to use the correct syntax for config files. Keep in mind that all modifications applied to main Prepar3D config file will not roll back automatically. You can just restore config file from backup created at first start.

8. Custom tweaks

In addition to the existing PTA built-in tweaks you can also use your own tweaks. Use this feature if you have some manual corrections that need to be applied to the shader files.

Add a new custom tweak to the list, give it a name, select the required shader file and specify the code block to be replaced by your code. These edits will be applied immediately after built-in tweaks in order specified in the list.

Untick the checkbox to deactivate custom tweak. Use [V] button to check the presence of block to be replaced in a selected shader file

IMPORTANT! There is no error detection provided! To locate the errors in your code please activate an option "Content Error Logging" in General section of P3D settings. (Error message appears at sim exit).

9. Command-line parameters

If you using batch files to start simulator, or third party tools like SimStarter NG, PTA provides command-line interface for presets applying. Start tool with full filename of preset as first parameter and preset will apply in "quiet" mode (with clearing of Prepar3D shaders cache).

Example:

PTA.exe "c:\My Presets\Preset for ORBX.ini"

If preset applied successfully, PTA returns 0 as EXITCODE (you can check it with %ERRORLEVEL% variable). If preset applied with errors, EXITCODE = 1.

If you need start the additional instance of PTA (for example, to compare presets in PTA GUI), add a special key "+instance" to start command or shortcut properties. I.e. "PTA.exe +instance".

10. Using expressions

Usually the tweak parameters are numbers. It's quite enough for the most cases. But sometimes the fine tuning requires dynamically changing parameters depending on certain conditions.

For instance you want to reduce the sky saturation on a rainy day to get some gloomy environment. In this case the sky saturation tweak parameter must consider precipitation level and the current altitude (because on cruise level sky remains the same in all cases).

In such situations use expression based parameters in the drop-down popup of parameter editor.

IMPORTANT! Be careful with editing expressions. Each expression must be enclosed in parenthesis. All shaders variables are case-sensitive. There is no exhaustive error detection provided. Incorrect expressions can cause problems. If the rendered scene is corrupted (or you see a black screen) it most likely due to the shader not compiling. To see compilation errors content error logging must be enabled. Switch on "Content error logging" option in General section in sim. Prepar3D must be restarted with this flag enabled and then shut down to have the errors logged. These are logged to the ContentErrorLog.txt located in the %USERPROFILE%\Documents\Prepar3D v4 Files directory.

Some useful shaders variables that you can use in expressions:

cb_fPrecipitationLevel - the current level of precipitation. None = 0; Very high = 1. Very low, Low, Moderate High: between 0 and 1 proportionally.

cb_Altitude - altitude in meters

cb_SurfaceAlt - surface altitude in meters

cb_mSun.mDiffuse.r - red component of diffuse sun light. Between 0 and 1 (max. brightness)
cb_mSun.mDiffuse.g - green component of diffuse sun light
cb_mSun.mDiffuse.b - blue component of diffuse sun light

cb_mSun.mAmbient.r, cb_mSun.mAmbient.g, cb_mSun.mAmbient.b - the same for ambient sun light.

Same for moon: cb_mSun.mDiffuse.mDiffuse.r and so on.

cb_mDayNightInterpolant day = 0, night = 1. At twilight this value between ~0.01 and ~0.9

cb_mFogColor.rgb - color of the fog (red, green, blue components)

cb_mFogDensity - the density of fog. Values looks like between 0.0000000001 and 0.00000001000

Variables available only in GPUTerrain.fx tweaks:

iSeason - the season number; fall = 1, spring = 2, summer=3, winter=4

eyeDist - distance between current rendering terrain and the eye point

Examples of using expressions

Example 1. I don't like it when very thick fog covers the sunset & sky. The first solution is to put a number in the "Sky fog tuning" tweak parameter (0.1, for example). In this case the fog will be reduced, not just during sunrise/sunset, for for the whole day. The second solution is take into account sunlight power as a tweak parameter.

For example, I want the fog influence to stay at it's default value (1.00) at noon and smoothly decrease down to 0.1 at dusk (when sunlight power becomes less than 0.3 as an example). I can use the green component of sunlight as a sunlight power and try linear interpolation expression like this:

Fog influence = 0.1+(SunPower-0)/(0.3-0)*(1-0.1) or

Fog influence = saturate(0.1 + cb_mSun.mDiffuse.g/0.33)

Here cb_mSun.mDiffuse.g is sun power (in the afternoon it's strong and equals ~0.9, at night = 0), saturate function that clamps value in to [0..1]. Don't forget to put whole expression in a parenthesis in Fog influence parameter editor:

(saturate(0.1 + cb_mLights[SUN_LIGHT].mDiffuse.g/0.33)) will be a final expression for "Sky fog tuning" tweak parameter.


Example 2. I'm going to reduce fog influence on the sky depending on altitude. When altitude > 8000ft, I want to get clear sky.

Use cb_Altitude (altitude in meters) variable in "Sky fog tuning" tweak parameter:

(saturate(1.0 - cb_Altitude/2438)) will be the final expression. Here cb_Altitude - altitude in meters, 2438 is 8000ft.


Example 3. Let's get some gloom in rainy environment. The cloud lighting reduction if precipitation is already presents in P3D by default. So the points of interest are: terrain saturation and sky saturation below 4000ft level.

The precipitation level defined by cb_fPrecipitationLevel shader variable. None = 0; Very high = 1. Very low, Low, Moderate High: between 0 and 1 proportionally.

To reduce sky saturation I'll use tweak sky saturation. Let's sky saturation equals 70% of regular value at the ground level and 100% of regular value at 4000ft. Thus the saturation with dependence of the altitude will be (linear interpolation):

0.7 + (cb_Altitude - 0)/(1219-0)*(1-0.7) or

0.7 + cb_Altitude/1219 * 0.3. Here 1219 is 4000ft in meters.

Let's max. precipitation level give the additional 30% reduction of saturation value: (cb_fPrecipitationLevel * 0.3).

The final expression for sky saturation tweak parameter will be

(saturate((0.7 + cb_Altitude/1219 * 0.3) - (cb_fPrecipitationLevel * 0.3))),

for terrain saturation tweak: (1 - cb_fPrecipitationLevel * 0.3).


Example 4. (For amphibian aircraft.) When the eye point is at sea level, the default reflection coefficient of water surface looks insufficient. But on the contrary, at altitude this coefficient seems a little strong.

The default value for water reflection coefficient is 0.40. Lets it will be 0.8 at sea level and 0.30 at altitudes above 700ft.
Using linear interpolation: 0.8 + (cb_Altitude - 0)/(213 - 0) * (0.3 - 0.8) or
0.8 - 0.5 * Altitude/213. Here 213 is 700ft in meters.
To prevent incorrect values for altitudes out of [0..700] ft range use clamp function (It clamps the specified value to the specified minimum and maximum range). The final expression for water reflection coefficient will be:
(clamp(0.8 - 0.5 * cb_Altitude/213, 0.3, 0.8))
As a result:

Sea level
At sea level
700ft level
700ft level