Go Back   Knife Edge > RealFlight - Current Products > RF-X
Use of this site is subject to our Terms of Use. | Looking for technical support? Read this!

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-19-2018, 09:30 PM
Jeremy Sebens's Avatar
Jeremy Sebens Jeremy Sebens is online now
Registered User
 
Join Date: Oct 2006
Posts: 113
RF-X 1.5 beta: How to enable shader caching for smoother operation.

During this extended early-access beta, we'll provide some tips and tricks for RF-X users to try out. This thread will deal with how to enable shader caching, which dramatically reduces "hitching" or "stutter" when flying.

Background info:
Whenever a new material is loaded by the simulator, the engine checks to see if the shader used by that material has been compiled and loaded onto the GPU's video memory. If not, then the shader gets compiled and loaded. If this doesn't happen fast enough, the rendering system gets stuck until it's finished. This results in a "hitch" or even a series of them.

Once the shader is compiled, it's added to the shader cache, so you shouldn't see the hitch in the future. So if you've been flying around a lot, you probably aren't feeling the stutter as much any more. Since RF-X 1.5 uses a new version of the Unigine engine, your shader cache will be deleted when you install the update, as the old shaders aren't compatible.

What can you do about it?
The good news is that there is now a system for pre-caching the shaders used in the sim. However, it will take a long time the first time you start up and load each world. This could be 3 minutes or more. We invite you to try it out and see what your results are, so that we can find the best way to use this feature in the final release of 1.5.
  1. Here's how to enable shader caching:
  2. Start RF-X
  3. Open the console (ctrl-alt-~)
  4. Type the following command: "render_manager_create_shaders 1"
  5. Restart RF-X
  6. There will be a long delay (possibly 3 minutes or more) while the shaders are compiled and cached. Go make a cup of coffee if you like.
  7. Once the program starts, visit the following airports: Green Grass Flatlands, Blimp Hangar, RC Ranch, and Alpine Lake. There will be a shorter, but still significant delay with each airport load.
Now you should have a solid shader cache. Combined with some content optimization that we've done, this should make the sim noticeably smoother.

At this point, you have a choice. You can leave the caching system enabled, or disable it.
  • Disabling shader caching will make the sim start up much, much faster - just like it did before. Doing so doesn't seem to hurt smoothness. To do so, simply enter "render_manager_create_shaders 0" into the console.
  • If you leave it enabled, the sim will still have some delay on launch, but it won't be nearly as bad as the first time. On my system, it's about 40 seconds. We believe that keeping caching on guarantees that the shaders are all loaded into video memory before the simulation starts. I personally leave it on out of an abundance of caution, but I don't know if it buys me anything.
If you try out the caching (and we hope you will!), please report back in this thread with your results. How long did it take? Did it help? What are your system specs?

Last edited by Jeremy Sebens; 01-19-2018 at 11:44 PM.
Reply With Quote
  #2  
Old 01-22-2018, 01:35 PM
asj5547 asj5547 is offline
Registered User
 
Join Date: Aug 2017
Posts: 669
Shaders OFF, load time from launcher to workshop 27 seconds.
From workshop to airports vary between 4 - 12 seconds.
Shaders ON, load time launcher to workshop 1 minute 23 seconds initially, approximately 1 minute for all consecutive start ups.
From workshop to airports 3 - 6 seconds.
Shaders enabled certainly makes the simulator smoother, although I notice the occasional frame stutter passing by buildings ect., but that is only for the first few seconds of the simulator running.
RF-X version 1.5 is absolutely amazing, colours.... scenery...water physics, incredible !!!
System specs:
Ryzen 5- 1500x oc@3.8ghz.
16gbs ddr4-2400 ram.
GTX1080 gpu.
M.2 nvme drive.

Last edited by asj5547; 02-02-2018 at 08:53 AM.
Reply With Quote
  #3  
Old 01-22-2018, 03:19 PM
Jeremy Sebens's Avatar
Jeremy Sebens Jeremy Sebens is online now
Registered User
 
Join Date: Oct 2006
Posts: 113
Thanks for the report - this is just the sort of info we're looking for.
Reply With Quote
  #4  
Old 01-22-2018, 06:56 PM
asj5547 asj5547 is offline
Registered User
 
Join Date: Aug 2017
Posts: 669
Jeremy, with "depth of field" enabled in video settings, I notice blur/fuzzy look to objects, for instance, the details in rocks, flowers and other surrounding items lose definition.
First thumbnail for each below is depth of field OFF, second of each d.o.f ON.
Attached Images
File Type: jpg RFX 1.5 depth of field off tables.jpg (397.3 KB, 21 views)
File Type: jpg RFX 1.5 depth of field on tables.jpg (229.8 KB, 22 views)
File Type: jpg RFX 1.5 depth of field off sea.jpg (223.3 KB, 23 views)
File Type: jpg RFX 1.5 depth of field on sea.jpg (130.9 KB, 22 views)
Reply With Quote
  #5  
Old 01-22-2018, 07:40 PM
Jeremy Sebens's Avatar
Jeremy Sebens Jeremy Sebens is online now
Registered User
 
Join Date: Oct 2006
Posts: 113
With DOF on, you would expect the vehicle to be in focus, but objects nearer and farther away should be out of focus. This creates an effect similar to what you'd get by opening up the aperture on a camera lens.

However, I see that your vehicle is out of focus. That shouldn't be the case if you're looking at it. I've filed a case in our issue tracking system.
Reply With Quote
  #6  
Old 01-22-2018, 09:36 PM
csgill75's Avatar
csgill75 csgill75 is offline
Registered User
 
Join Date: Mar 2009
Location: Florence, Alabama
Posts: 3,426
I also Timed my startup times With Shaders Off from launcher to workshop Menu, 20 seconds. From the time i Pressed Fly to when I could actually fly, anywhere from 4-9 seconds.

When I enabled Shaders, after I exited the Flying session there was a pause for 33 seconds. Once I restarted RF-X, The Load times from Launcher to workshop menu was 38 seconds. The load times from Fly to actually able to fly was 13 seconds. I do not know why it runs as fast as it does, I was expecting a longer wait than I actually received. The sim flies great either way.

PC specs are
I7 7700K oc@5.01Ghz
16gb DDR4 3200 Ram
1080Ti GPU
Samsung 960 Pro M.2 Drive

Note that I did skip the intro graphics at the startup. It may lead to a slightly faster load time from the launcher.
Reply With Quote
  #7  
Old 02-17-2018, 12:08 AM
asj5547 asj5547 is offline
Registered User
 
Join Date: Aug 2017
Posts: 669
Quote:
Originally Posted by asj5547 View Post
Shaders OFF, load time from launcher to workshop 27 seconds.
From workshop to airports vary between 4 - 12 seconds.
Shaders ON, load time launcher to workshop 1 minute 23 seconds initially, approximately 1 minute for all consecutive start ups.
From workshop to airports 3 - 6 seconds.
Shaders enabled certainly makes the simulator smoother, although I notice the occasional frame stutter passing by buildings ect., but that is only for the first few seconds of the simulator running.
RF-X version 1.5 is absolutely amazing, colours.... scenery...water physics, incredible !!!
System specs:
Ryzen 5- 1500x oc@3.8ghz.
16gbs ddr4-2400 ram.
GTX1080 gpu.
M.2 nvme drive.


I elected to leave "shaders" enabled and the system worked okay for quite a while, but as time passed the launcher to workshop boot time increased, it used to take about 1 minute, now it takes about 2.5 minutes.
2.5 minutes may not seem too long for boot time, unless for instance, you are fine tuning an aircraft and making incremental adjustments, logging out of RF-x, into the Editor and back into RF-X, when making many alterations those 2.5 mins. seem like an eternity, staring at the black RF-X boot screen.
I tried stopping the shaders (render_manager_create_shaders 0) command, but on the next restart the "shaders delay" was still there, also I had initiated the video_vsync 1 command during my RF-X 1.5 testing period and now find it impossible to stop vsync, (screen fps locked at 60)I run the appropriate commands (video_vsync 0) followed by video_restart, the fps increase to 100+ during that session, but when RF-X is restarted fps become locked at 60 fps again.
I tried uninstall leaving online data, serials ect. in place, same result, long delay and 60 fps. So I had to perform full uninstall removing serials, online cache ect. and reinstall from disc and download V 1.5 beta again, fortunately download was smooth and quick with no errors, now RF-X 1.5 loads in 20 - 25 seconds and my fps are constantly over 100. So now I am afraid to load shaders again, I will just let the system sort out any stutters, the longer the system runs during an RF-X session the smoother it becomes any way.

Last edited by asj5547; 02-18-2018 at 06:55 PM.
Reply With Quote
  #8  
Old 03-19-2018, 07:30 PM
TomC TomC is offline
Registered User
 
Join Date: Feb 2009
Posts: 373
I tried enabling shader caching, following Jeremy's instructions. I got similar load times as asj5547 got with/without.

I really did not notice any significant difference either way, just a lot longer initial load times. I did not notice any stuttering to begin with anyway. I've ended up disabling it again and I'm back to nice fast load times.

My NVidia 3d setting have a shader on/off option (which I have ON). I wonder it this can interfere with rfx when you leave it's shader manager enabled?

Alienware 17 R4 laptop (purchased new Dec/2017)
i7 7700hq 2.8/3.6ghz
32gb ddr4 ram
gtx1060 w/6gb ram
250gb ssd, 1tb hd
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:36 AM.