Dynamic View Distance (DVD)
Authors: tpw, Das Attorney
Runs on: Arma2, Operation Arrowhead, Combined Operations
1.0 -initial release
1.01 - added signed pbo; (hopefully) keeps working after player respawn
1.02 - added maximum framerate which will not be exceeded; added bikey
1.03 - added increased viewdistance for aircraft; (hopefully) fixed bisign/bikey; starts at preferred viewdistance instead of minimum
Here's a very simple dynamic viewdistance addon which does a few useful things:
What it does:
1 - It dynamically and smoothly adjusts viewdistance according to your framerate.
2 - It prevents the framerate from dropping and staying too low in areas of scenic complexity or lots of AI.
3 - It stabilises the framerate so that there are less noticeable FPS changes.
4 - It increases the viewdistance when using scopes/binoculars, or when in aircraft.
How it works:
The addon launches a background process to monitor the average FPS over a user specified time period (eg 10 seconds). This is then compared to the average from the previous 10 seconds, and if the FPS has decreased then the viewdistance is dropped accordingly. Conversely, if the FPS increases, the viewdistance is increased. It's set up so that it won't cause large oscillations in viewdistance/framerate.
DVD also checks if you are using a scope or binocs and increases the viewdistance to simulate being able to see further and with more detail than with the naked eye.
DVD works on the assumption that in areas of high scenic complexity such as the middle of Zargabad or in a dense forest, you won't really notice that the view distance has been dropped. Similarly, if there are a lot of enemy AI trying to smoke you, you're probably more interested in getting a smooth bead on them than in admiring distant scenery. Another assumption is that increasing viewdistance when looking down a scoped weapon doesn't actually negatively affect FPS most of the time. The last assumption is that when flying, you really are interested in more viewdistance even if the framerate drops a bit.
You'll notice the viewdistance changing if you look for it, just like you'll notice lod switching or clutter popping in if you look for them too. After a while you simply stop noticing.
How to use it:
Install: Extract the @DVD modfolder to your preferred location, and the DVD folder to your Arma2 userconfig directory.
Configure: userconfig\DVD\DVD.hpp allows you to set the values most appropriate to your system. It's heavily commented so should give you no trouble.
These are the values I use on my middle range system (Dual core E6750, GTX460):
300m minimum view distance (m)
2000m preferred view distance (m)
4000m maximum view distance (m)
25FPS minimum framerate
40FPS preferred (realistic!) framerate
10sec time to average framerate over
1.5x viewdistance increase when using scope
1.5x viewdistance increase when in aircraft
Obviously you'll want to change these values to suit your system. If you can't deal with FPS below 30 then set the minimum to 30, and/or lower the minimum viewdistance even further. If your system can comfortably pull 75 FPS at 10000m viewdistance then adjust accordingly (alternatively your computer is so powerful it probably doesn't need this addon!).
Lastly, if you want a more comprehensive system to adjust framerate then look at VictorFarbau's VF FPS Saver (VFFPSS)
DVD may become inactive after changing some advanced video settings mid mission.
This is my first attempt at a useful addon for Arma2, so there are most likely bugs and areas which can be improved. I would value any feedback, so give me your 2 cent's worth here on the BIS forum.
Many thanks to Das Attorney for helping with creating a PBO addon version of DVD, and for general advice. Thanks also to those who've made suggestions and comments to help improve this addon. As always, thanks to BIS for a fantastic piece of software, and for the incredible community here on the BIS forum.