Jump to content
Sign in to follow this  
Guest

Simple solution for shadows and loss of fps (Or: The tweaking has begun!)

Recommended Posts

Guest

Ok, here we go. Yesterday I posted that I was disappointed with the shadows. http://forum.avsim.net/topic/427393-terrain-shadows-what-a-pity/ My main problem was that I like Buildings (Cast), Vegetation (Cast) and Terrain (Cast and Receive) shadows but that you really need the Ultra setting in order to not constantly see the edge of the shadow nearby (because there is a limit to how far in the distance you see shadows). Obviously the Ultra setting caused my GTX580 to almost give up. So after having a look on the LM forum and checking out the Help file after that, I found a solution that enables me to keep my shadow settings but instead of the fps dropping from 30 to 13 it now only drops to something like 25. And 25 is good. Smooth. Nice.

 

It's really quite simple (although it took some time to check it all ^_^ ). The following is a long story but I think it's worth the read.

 

Since this involves editing the Prepar3D.cfg this is a genuine real P3D tweak! Yihaaa! (Not.) However, it is documented (sort of) in the Help file so it's not some new discovery: I am simply using the possibilities that LM is offering(!).

 

The main slider for shadows gives you different settings for the distance, the number of cascades and the log partition. The defaults in the cfg are there:

 

SHADOW_DRAW_DISTANCE_LOW=4000
SHADOW_DRAW_DISTANCE_MID=6000
SHADOW_DRAW_DISTANCE_HIGH=8000
SHADOW_DRAW_DISTANCE_ULTRA=12000
SHADOW_NUM_CASCADES_LOW=4
SHADOW_NUM_CASCADES_MID=5
SHADOW_NUM_CASCADES_HIGH=7
SHADOW_NUM_CASCADES_ULTRA=12
SHADOW_LOG_PARTITION_LOW=0.850000
SHADOW_LOG_PARTITION_MID=0.850000
SHADOW_LOG_PARTITION_HIGH=0.850000
SHADOW_LOG_PARTITION_ULTRA=0.850000

 

Now as I said my main problem was that with lower settings I could too clearly and obviously see where the shadows ended. So I decided to change ALL the SHADOW_DRAW_DISTANCE to 12000. So that resulted in this:

 

SHADOW_DRAW_DISTANCE_LOW=12000
SHADOW_DRAW_DISTANCE_MID=12000
SHADOW_DRAW_DISTANCE_HIGH=12000
SHADOW_DRAW_DISTANCE_ULTRA=12000
SHADOW_NUM_CASCADES_LOW=4
SHADOW_NUM_CASCADES_MID=5
SHADOW_NUM_CASCADES_HIGH=7
SHADOW_NUM_CASCADES_ULTRA=12
SHADOW_LOG_PARTITION_LOW=0.850000
SHADOW_LOG_PARTITION_MID=0.850000
SHADOW_LOG_PARTITION_HIGH=0.850000
SHADOW_LOG_PARTITION_ULTRA=0.850000

 

I then set up a few testflights and took screenshots to see:

 

1. what the effect was on the quality

 

2. what the effect was on the fps

 

So I left the cascades en log partitions alone. 

 

Conclusions

 

1. The distance where the Terrain shadows end, stays far away indeed, so where it ends with the slider at Ultra it now also ends with the slider at Low. Which was to be expected.

 

2. With lower slider settings the detail (of the shadows on the ground) becomes lower too, so where Ultra gives you 5 different 'patches' of shadow on the side of a mountain, Low gives you one or two. I suppose this is because of the Cascade entry (which was left untouched).

 

3. The distance of the Building and Trees shadows still changes, so this particular Distance setting only takes care of the Terrain shadow!

 

4. Because of point 3 the difference between Low and higher settings is still rather obvious, but the difference between Medium and High and even Ultra is less obvious, specially when the buildings and trees are covered by terrain shadows.

 

5. The differences between Low and Ultra becomes even less obvious when you fly above flat terrain! Where I can see clear differences between Low and Ultra above mountains in Norway, I have to look very, very hard for differences in New York!

 

So what about performance?

When I fly above New York with the Shadow slider at Ultra fps drops to around 13 and the sim becomes unflyable. When I fly above New York with the Shadow Slider at Medium the fps is around 24 and flying is great. And that with hardly a difference in quality to be seen! In New York I might as well use Low and get even higher performance!

 

Final conclusion

By applying this very simple edit (you don't have to add anything to the cfg, it's only an edit!) you will be able to enjoy Building, Vegetation and Terrain shadows with a lot lower loss of fps and without getting too annoyed by a constantly moving edge of the shadow nearby.

 

I posted screenshots from my tests here: forum.avsim.net/topic/427530-prepar3d-20-shadow-test-huge-pics/

 

This was tested on a i5 2500K @ 4.5 GHz and a GTX580. Obviously YMMV (up or down) depending on your hardware. I think that specially people with lower end gear will benefit from all this.

Share this post


Link to post

Great Jeroen!

 

I will try this now... thanks for all the hard work!


i9 13900KF @ 5.5Ghz | MoBo MSI PRO Z690-A WiFi | Corsair Vengeance Black RGB RS 64gb DDR4 3200MHz | PNY RTX 4090 XLR Gaming Verto EPIC-X RGB TF | MP33 Pro 1TB M.2-2280 NVME SSD for OS | Samsung 870 QVO 2.5" 4TB SSD SATA2 | Corsair RM1000X 2021 1000W 80 Plus Gold PSU | Antec Dark Fleet DF700 Flux Gaming Case | Win 11 home | LG 48" C2 OLED 4K TV | G512 Keyboard | Razer Basilisk V2 Mouse | TCA Throttle, Sidestick and addons, peddles, TM1600 Hotas | TrackIR 5 | Tobii Eye Tracker | HP Reverb G2 HMD

Doug 

Share this post


Link to post

wow, that's fantastic. I'll definitely give it a try tonight.

 

I was flying FTX Iceland demo and first noticed this shadow problem. My 780ti was silk smooth at High setting plus V-sync and triple-buffering. Even when fps dips down to low 20s it still feels very smooth. But to get full and consistent shadows on terrain I had to set shadows to Ultra. Once I set shadows to Ultra, the drop of fps wasn't huge, but I got micro-stuttering all the time which is really hard to tolerate after getting used to the butter smooth fps...

 

By the way, I got OOM with Iceland demo quite a few times, and this is clean P3D2 + FTXG only. Kind of starts to worry me... maybe indeed the most urgent upgrade to P3D2 is 64bit.


7950X3D / 32GB / RTX4090 / HP Reverb G2 / Win11

Share this post


Link to post

Your a *star* will give it a go tomorrow. :) (I've been told I have to spend a little more time with my darling wife who knows about the new sim so is just checking that she comes before the sim lol Its so frustrating)

 

edit: so I'm sat with her reading the forums on the pad... Haha

Share this post


Link to post
Guest

I'm looking forward to your experiences. You never know if this will work for everyone so if this is 'tweak for everyone' depends on your findings! ^_^ For me it is a keeper, at least until I have a better GPU (but I think I will keep using this setting even then!).

 

BTW With the option to tweak this, you in fact have two 'sliders' to control the shadow: one for distance of terrain and one for distance of buildings and trees. Looking at the amount of options LM gives you on the option screen for shadows, I am a bit amazed they simply didn't implement sliders all of this...! Just like they seperated autogen trees and autogen buildings, they could have done the same for this, specially because the KNOW shadows have a high impact: all the more reasons to put an extra slider in the interface.

 

But well, this works just as well. ^_^

Share this post


Link to post

Thanks for the tip Jeroen, 

 

I changed the values and as far as shadows go, it sure does a difference - which is great - but still takes a toll on my FPS... :unsure: For now, it'll be a keeper as far as the CFG file is concerned but I will unfortunately have to untick the building and vegetation cast and receive boxes for now.

 

Frederick


Frederick

Share this post


Link to post
Guest

Yes, the gain in performance also depends on hardware and sim setting, of course... If you have totally terrible unplayble performance with shadows, this tweak won't make it suddenly work. However, if you have a tolerable but not too satisfying performance (which imho is somewhere between 10 to 20 fps) this edit might/could/should help. And that was my situation: I had shadows enabled with okay performance but I didn't like how the edge showed up close. The only solution seemed to be to set the slider to Ultra but then performance plummeted. With this tweak I now have the terrain distance at Ultra but the other options at Medium, as if I had more sliders to my disposal, and for me this is a great and very satisfying compromise.

 

I was hoping P3D would give me two things: no more autogen popping up and shadows all over the place... and now I've got both!

Share this post


Link to post

I totally agree that the lower limit of what is buttery smooth flight and FPS is a number that we are not used too. I've not been able to test it out on my system to any degree of certainty as yet. As a complete guess its around 12/13 on my system. I've got it too the point where I have terrain and building cast and receive on and scenery and autogen sliders at max. Vegetation is at dense but I also have a feeling that for some odd reason when the scenery sliders are inline FPS are better but I don't know if its my Imagination or not.

 

I've decided that the trick with P3D is to switch off the FPS counter and then and only then advance settings until some deterioration is noticed. Only then will you know what the limits are. So this is how I'm going to test tomorrow with your shadows tweak.

Share this post


Link to post

 

 


BTW With the option to tweak this, you in fact have two 'sliders' to control the shadow: one for distance of terrain and one for distance of buildings and trees. Looking at the amount of options LM gives you on the option screen for shadows, I am a bit amazed they simply didn't implement sliders all of this...! Just like they seperated autogen trees and autogen buildings, they could have done the same for this, specially because the KNOW shadows have a high impact: all the more reasons to put an extra slider in the interface.

Hey Jeroen,

Great information.  I would encourage you to post the suggestion for new sliders on the P3D forum.  I would think that the dev team would think that this would be a worthwhile feature.  Could be easy to develop and test and it would make a solid difference to many users.  Please suggest it on the forum.  Thanks for looking into this.

  • Upvote 1

spacer.png

REX AccuSeason Developer

REX Simulations

Share this post


Link to post

Fantastic information. Maybe we can pin this?

Share this post


Link to post
Guest

 

 


I would encourage you to post the suggestion for new sliders on the P3D forum

 

Already did that yesterday!  B)

 

 

 


Fantastic information. Maybe we can pin this?

 

Before this gets pinned, I'd like to hear some experiences with all this. No use in pinning it if it only works like this on my PC.  ^_^

Share this post


Link to post

Thanks, J v E.

 

Is this dealing with the anoying cone of shadows that is around the aircraft when the shadow quaility is set to medium?

 

I will give it a shot over the weekend!

 

Happy landings!


IXEG 737 Beta-Tester and First Officer

i7 6700K@4.4GHz, 32GB RAM, Palit GTX 1080 GameRock Premium@2Ghz, Oculus Rift S, ButtKicker
X-Plane 11 latedt version on a Samsung M.2 SSD for speedy loading times

Share this post


Link to post
Guest

 

 


Is this dealing with the anoying cone of shadows that is around the aircraft when the shadow quaility is set to medium?

 

Yes, with the edits as I did them in the OP and the slider at Medium, you will get Medium shadow quality for everything apart for Terrain which will be at Ultra distance (so not Ultra quality). This makes the cone less obvious. The difference in quality is hard to see so imho there is no reall loss but only gain (larger cone without too high fps hit).

Share this post


Link to post

Great find Jaroen. I assume this does not fix the reversed shadow issue that you reported also?


Intel i7 10700K | Asus Maximus XII Hero | Asus TUF RTX 3090 | 32GB HyperX Fury 3200 DDR4 | 1TB Samsung M.2 (W11) | 2TB Samsung M.2 (MSFS2020) | Arctic Liquid Freezer II 280mm AIO | 43" Samsung Q90B | 27" Asus Monitor

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...