Xplane 11 Beta – Increase FPS with a few shadow tweaks via a FlyWithLUA Script

I’ve spent the better part of several months now tweaking my simulators for use with Oculus Rift + Flyinside (and also having tested the Vive).  More recently, I’ve had the pleasure of using X-Plane for the first time.  As an aside, X-Plane out of the box (version 11 beta) is leaps and bounds ahead of (Prepar3D) P3D in terms of visuals and of course also due to being 64-bit.  P3D will hopefully catch up in 2017 as its expected they will release a 64bit version.  I’ve also had some time with Aerofly FS2 and its quite good in terms of eye candy, right out of the box with no tweaking, however it will be some time before this one is refined.  That said, I’ve had to become accustomed to using DataRef changes (DataRef Editor) and also using FlyWithLUA so i can drop what are called .Lua files inside the scripts folder.  Using these tweaks you can gain back some performance that the beta for XP11 is lacking.  Its been noted that Beta 6 will gain back some FPS, so patience will win out with this one.  Here are the steps I took to getting FlyWithLua working in XP.First, visit the “org” and find the plugin, which is located here.  Download it and extract it… Copy the “FlyWithLua” to your \X-Plane 11\Resources\Plugins path, so you have the following:

Path\X-Plane 11\Resources\Plugins\FlywithLua

Now go into the \FlywithLua\Scripts folder.. right click, new text document and create a new text document with a .lua extension, call it say, perftweak.lua and hit enter… now double click the file and open with notepad..  (Note: that i also removed all the existing scripts in the folder that came with the download.. i saved them somewhere else in case I need them later)

Put these two lines inside and save:

set(“sim/private/controls/caps/use_csm”, 0.000000)
set(“sim/private/controls/perf/disable_shadow_prep”, 1.000000)

CSM stands for “Cascaded Shadow Maps”   This is always set to 1.0 even if shadow details are off. So Shadows are always being calculated in the sim.  If you set the parameter to “0” (HDR must be activated in preferences) the framerate goes up.. couple this with disable_shadow_prep and you have some gains.  It also seems that the csm entry has the greatest impact here, more so than the disable_shadow_prep.

Now when you run X-Plane, system/weather depending, you may achieve about 5-10 fps boost (in VR).

Here is a comparison to show you how it disables the cockipt/wing shadows and the increase (a 2D window example)…

Without the script:

XP11b3withoutscripts2

 

With the script active:

XP11b3withScripts2

 

These shots were done on a 2D window.. showing about 3 fps for this clear weather situation.  The increase would be more given sun/shadows and clouds and even more so in VR land.  Your mileage may vary.

The specs on my system are in i7-6700k running at 4.7GHz and 32GB DDR4 ram at 3200 MHz along with an Evga 1080 GTX Hybrid (no overclocked).

 

blog comments powered by Disqus