Jump to content
tpw

Dynamic View Distance (DVD)

Recommended Posts

Dynamic View Distance (DVD)

Download: http://www.filefront.com/17860873/Dynamic View Distance_103.7z

Version: 1.03

Released: 20110128

Authors: tpw, Das Attorney

Requires: CBA

Runs on: Arma2, Operation Arrowhead, Combined Operations

Changelog:

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)

http://forums.bistudio.com/showthread.php?t=73964

Known issues

DVD may become inactive after changing some advanced video settings mid mission.

Feedback:

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.

Thanks:

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.

tpw

Edited by tpw

Share this post


Link to post
Share on other sites
Could you please make a signed version of this addon?

Sure thing, just give me time to learn how to!

---------- Post added at 19:04 ---------- Previous post was at 19:03 ----------

Cheers Foxhound!

Share this post


Link to post
Share on other sites
Sure thing, just give me time to learn how to!

---------- Post added at 19:04 ---------- Previous post was at 19:03 ----------

Regarding signing, U might want to have a look at this LINK

When we want to use it, a signed version would be nice.

Share this post


Link to post
Share on other sites

your dvd-addon is great, thx for that. but i ve a problem. i play warfare, at beginning it works wonderful, but when i died and respawn, its not working for me. the viewdistance stayed by 300 and the addon changes nothing more. perhaps you can fix or control this itself. thx and great work .

sry for my english, its not my language

Share this post


Link to post
Share on other sites

Hmm, I haven't experienced the pausing myself. It should be pretty light on cpu as it just measures the fps once a second, and does the viewdistance adjustment after 10 sec.The viewdistance is adjusted incrementally which should prevent a spike in cpu/gpu usage. Thanks for the feedback, I'll look into it further.

---------- Post added at 07:08 ---------- Previous post was at 07:05 ----------

your dvd-addon is great, thx for that. but i ve a problem. i play warfare, at beginning it works wonderful, but when i died and respawn, its not working for me. the viewdistance stayed by 300 and the addon changes nothing more. perhaps you can fix or control this itself. thx and great work .

sry for my english, its not my language

Yep, you've discovered a limitation of the current version. At present it runs in a loop while the player is alive. The wheels fall off when the player dies and respawns. I'll work on this as a top priority. Thanks for the feedback carstendem1.

Share this post


Link to post
Share on other sites
Regarding signing, U might want to have a look at this LINK

When we want to use it, a signed version would be nice.

Thanks mate, I've created a signed version v1.01 which you can download from the 1st post.

@carstendem1: please try this new version and see if it helps with your respawning issues.

Share this post


Link to post
Share on other sites

This is Great, although the Default View Distance should be Turned up a bit (if possible)

Share this post


Link to post
Share on other sites
This is Great, although the Default View Distance should be Turned up a bit (if possible)

Thanks Jakewed. Do you mean the distance first set when the mission starts? It always starts at the minimum view distance which you specify in userconfig\DVD\DVD.hpp. The default setting is 300m, you can easily change it to 500 or more if you like.

Share this post


Link to post
Share on other sites

Tested this but the VD went above the specified maximum VD. So when the FPS was equal/above maxfps specified the VD went up to 8000 although it was set to 3000 max. The minimum VD seemed to work however.

Ran latest beta and with some addons. Maybe some conflict there. Have to check again when i get home from work.

Very nice addon otherwise. Always liked Myke's dynamic VD in ArmA.

Share this post


Link to post
Share on other sites
Tested this but the VD went above the specified maximum VD. So when the FPS was equal/above maxfps specified the VD went up to 8000 although it was set to 3000 max. The minimum VD seemed to work however.

Ran latest beta and with some addons. Maybe some conflict there. Have to check again when i get home from work.

Very nice addon otherwise. Always liked Myke's dynamic VD in ArmA.

Thanks Alex72. So if you have max viewdistance set at say 3000, and your preferred fps is 50, then at 50fps you should be getting roughly 3000m viewdistance. If your framerate is 60, you might get 4000 or more. At 90fps it might go up to 8000, but I wouldn't know because my box can't do it :) The idea is that the viewdistance is increased to actually try to get the fps to drop to your preferred value.

Can you try having a play with the values in DVD.hpp and let me know what happens.

I'm running a lot of other mods and addons and have no conflicts, but maybe I just got lucky!

Share this post


Link to post
Share on other sites

Hey tpw,

very nice addon.

As we play mostly MP and the vd is fixed to 2500m by mission, this addon gets over it. Is it possible to have a max vd fixed inside the addon ?

Like the hpp inside or done by script....

The point is that ppl with better systems have an advantage.

Anyway thx for this great addon..

Share this post


Link to post
Share on other sites
Hey tpw,

very nice addon.

As we play mostly MP and the vd is fixed to 2500m by mission, this addon gets over it. Is it possible to have a max vd fixed inside the addon ?

Like the hpp inside or done by script....

The point is that ppl with better systems have an advantage.

Anyway thx for this great addon..

Hi Muecke

Are you saying that you want an absolute cap on view distance? Yes I can easily do this.

In that case you'd have to enter:

minimum viewdistance eg 300m - viewdistance won't drop below this

preferred viewdistance eg 2000m - addon will try to maintain this distance

maximum viewdistance eg 2500m - the view distance would never exceed this.

I will try to incorporate this into the next release in a day or so.

---------- Post added at 22:03 ---------- Previous post was at 22:02 ----------

thx tpw :). the problem is fixed and it works for me. great :)

Fantastic. I always like a satisfied customer!

Share this post


Link to post
Share on other sites

sounds an interesting project, will have to try it out :)

Share this post


Link to post
Share on other sites
Hi Muecke

Are you saying that you want an absolute cap on view distance? Yes I can easily do this.

In that case you'd have to enter:

minimum viewdistance eg 300m - viewdistance won't drop below this

preferred viewdistance eg 2000m - addon will try to maintain this distance

maximum viewdistance eg 2500m - the view distance would never exceed this.

I will try to incorporate this into the next release in a day or so.

Yes,good to hear that.

But, i mean the .hpp included in the addon, not as a extra file.Then it can be signed and noone can change the vd settings....

Share this post


Link to post
Share on other sites

I've tested the addon and it's working surprisingly good. I think the idea is really interesting but it needs some tweaks like the maximum viewdistance (mentioned above) and smoother transition of fog. I think that the reason of stuttering which I've encounted a few times is too rough and too fast change in viewdistance. A little delay for every change of viewdistance and smoother transition would make it more bearable for the PC.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×