Distant Terrain settings in Launcher

Feedback on past, current, and future development.
User avatar
Thunderforge
Posts: 440
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Distant Terrain settings in Launcher

Post by Thunderforge » 09 Feb 2018, 05:15

If you haven't noticed from the news, there is now a spiffy new page in the launcher to turn on some Advanced settings that aren't available in the game (e.g. owned crosshair). This is likely to be a temporary solution that will be removed post-1.0.

Distant terrain is one of the most admired features of OpenMW, so I'd like to add a way to access that in the Launcher as well. Here are my mockups for a suggested way to handle that.

First off, I thought that it would be more appropriate to place it on the "Graphics" tab than on the "Advanced" tab. The first thing you see is a checkbox that allows you to enable it (defaulted to off).
Distant Terrain (Disabled).png
Should you check the box, everything else turns on. The settings you can adjust are the ones listed in the original news article.

(Technical question: are distant terrain = false and distant terrain = true; exterior cell load distance = 1 equivalent? If so, then we can eliminate the checkbox by just assuming that distant terrain is always "on".)
Distant Terrain (Enabled - Match).png
Note that Viewing Distance is a radio button group. The documentation for that feature includes a table of recommended values. Choosing the "Match exterior Cell Load Distance" radio button means that it will use these values behind the scenes. For instance, if you set the load distance to 3 cells, then behind the scenes the viewing distance will be set to 21903.

However, you can choose "Custom" to set it to whatever you like. If it's lower than the recommended value for the number of cells, you'll see a warning that the distant terrain may be obscured by fog.
Distant Terrain (Enabled - Custom).png
These UI elements will provide some limitations to what you can set. For instance, the load distance number spinner would probably allow you to choose integers between 0 and 10 (the documentation says that 4 is the point where you start seeing diminishing returns). Similarly, the Small Feature Culling Pixel Size will probably only go up to 16.0, since that's the size that people have indicated NPC hands start disappearing. However, anybody can edit the settings.cfg file to add other values outside of "normal" and the UI won't overwrite it.

What do people think of this? Are there any things that should be changed? Any ways to make it simpler?

CMAugust
Posts: 110
Joined: 10 Jan 2016, 00:13

Re: Distant Terrain settings in Launcher

Post by CMAugust » 09 Feb 2018, 05:59

I suggest exterior cell load distance be excluded from the launcher and shouldn't be fiddled with at all. These settings will look familiar to users of MGE XE, but in OpenMW's case those cells actually are loaded in full. Users will get the wrong idea about OpenMW's performance if their game is running exponentially slower at the same "load distance" they're used to in MGE. At this point in time, toggling distant terrain and viewing distance to various multiples or a custom number would be best. It's unfortunate this will reveal empty land and obvious pop-in, but OpenMW simply doesn't have a distant static LOD generator like MGE yet, and will need one built before distant terrain can be used to its fullest.

Chris
Posts: 1446
Joined: 04 Sep 2011, 08:33

Re: Distant Terrain settings in Launcher

Post by Chris » 09 Feb 2018, 10:42

Related to distant terrain, there's this pull request: https://github.com/OpenMW/openmw/pull/1473

It fixes the settings to avoid requiring cranking up the normal view distance beyond it's normal range, and provides alternate fog settings for the distant terrain to be easily visible.

User avatar
AnyOldName3
Posts: 991
Joined: 26 Nov 2015, 03:25

Re: Distant Terrain settings in Launcher

Post by AnyOldName3 » 09 Feb 2018, 12:27

DIstant terrain automatically puts as much terrain in as is needed to fill the viewing distance. If you leave the viewing distance at the default, then it's not going to add any extra (but Scrawl believes it may be faster on some machines), if you increase it a bit, it will add some, and if you increase it a lot, it might add the whole of Morrowind. Kcat's work in that PR seems to be an attempt to decouple this, but when I've been testing shadows, I've tried using some pretty large viewing distance settings and had no issues with z-fighting, so I'm not convinced there's any merit to doing that. There are also some tweaks to fog and how that obscures things a long way away which may or may not be good, but I've not tested them.

The exterior cell load distance is really only a stopgap solution while we wait for someone to implement distant statics and much like Skyrim's uGridsToLoad setting, it breaks things like when quests trigger. It's unrelated to distant terrain. It just makes more things be rendered in full quality, i.e. not in distant mode.

The units of viewing distance are arbitrary Morrowind distance units. If you open a mesh in NifSkope and it says it's got a height of 1.0, it's how many of those you can stack end to end starting at the start of the view frustum before you touch the end of the view frustum.
AnyOldName3, Master of Shadows

User avatar
Thunderforge
Posts: 440
Joined: 06 Jun 2017, 05:57
Github profile: https://github.com/Thunderforge

Re: Distant Terrain settings in Launcher

Post by Thunderforge » 09 Feb 2018, 19:24

CMAugust wrote:
09 Feb 2018, 05:59
I suggest exterior cell load distance be excluded from the launcher and shouldn't be fiddled with at all. These settings will look familiar to users of MGE XE, but in OpenMW's case those cells actually are loaded in full. Users will get the wrong idea about OpenMW's performance if their game is running exponentially slower at the same "load distance" they're used to in MGE. At this point in time, toggling distant terrain and viewing distance to various multiples or a custom number would be best. It's unfortunate this will reveal empty land and obvious pop-in, but OpenMW simply doesn't have a distant static LOD generator like MGE yet, and will need one built before distant terrain can be used to its fullest.
Are you suggesting a change to how distant terrain works in OpenMW to instead work more like MGE? Right now, I’m just looking for feedback on how to enable the feature via the Launcher UI without needing to modify the OpenMW.cfg file.
Chris wrote:
09 Feb 2018, 10:42
Related to distant terrain, there's this pull request: https://github.com/OpenMW/openmw/pull/1473
If that PR gets merged, it will definitely change this UI. I hope it gets revisited soon; looks like it stalled 4 months ago.
AnyOldName3 wrote:
09 Feb 2018, 12:27
DIstant terrain automatically puts as much terrain in as is needed to fill the viewing distance. If you leave the viewing distance at the default, then it's not going to add any extra (but Scrawl believes it may be faster on some machines), if you increase it a bit, it will add some, and if you increase it a lot, it might add the whole of Morrowind.
So if I understand correctly, turning Distant Terrain on loads as far as possible, and there is no need to set the viewing distance. If so, then we could remove the Viewing Distance radio button group?

User avatar
AnyOldName3
Posts: 991
Joined: 26 Nov 2015, 03:25

Re: Distant Terrain settings in Launcher

Post by AnyOldName3 » 09 Feb 2018, 21:48

You need to increase the viewing distance if you want to see distant terrain.

With distant terrain off, there is terrain drawn only in fully loaded cells. Viewing distance only controls where fog is and, if set high enough, may introduce z-fighting.

With distant terrain on, anywhere the camera can see, terrain is drawn regardless of which cells are fully loaded. As the viewing distance controls where the camera can see, increasing it increases the distance that terrain is visible from. Viewing distance still controls where fog is and may still introduce z-fighting if set too high.

The exterior cell load distance controls how many cells are fully loaded, and in fully loaded cells everything is drawn and all scripts are run. Things might not get drawn if the viewing distance is too small. This setting is independent of distant terrain.

The in-game view distance slider is useful when only the nearest cells are fully loaded and distant terrain is off. Changing the exterior cell load distance is pointless with the default view distance as you're loading a bunch of stuff you can't see and running a bunch of scripts that don't affect anything you can see. Turning on distant terrain with the default view distance is pointless (ish) as you can't see far enough to see any terrain that isn't in the nearest cells (although on some machines it may improve the load time when you move to different cells).
AnyOldName3, Master of Shadows

Chris
Posts: 1446
Joined: 04 Sep 2011, 08:33

Re: Distant Terrain settings in Launcher

Post by Chris » 09 Feb 2018, 23:13

Basically, the viewing distance option sets the far clip plane used for rendering (beyond which nothing is drawn) and is used to calculate fog. Setting it super high can make fog disappear and increase the chance for Z-fighting, neither of which are desirable.

My pull request basically adds an option to decouple the fog from the viewing distance, so it creates consistent results regardless of the far clip plane, and provides an alternate viewing distance setting that's used with distant terrain, since the existing viewing distance already has a defined range that doesn't allow for far viewing and it seems odd to multi-purpose it (making it behave differently depending on whether distance terrain is enabled or not, potentially requiring readjustment whenever distant terrain is toggled).

User avatar
AnyOldName3
Posts: 991
Joined: 26 Nov 2015, 03:25

Re: Distant Terrain settings in Launcher

Post by AnyOldName3 » 10 Feb 2018, 03:02

IMHO, the fog doesn't really exist for any artistic reason and is just a way to hide the far plane so you don't see objects clip and load distance so you don't see objects pop. It therefore should be tied to the far plane. Any way in which it affects the aesthetic and mood of the game is secondary (otherwise surely it would be affected by other factors like the weather in the original engine) and it's reasonable to expect it to change when things like the view distance are changed.

However, the 'New fog shader' thread has a different fog implementation which I feel does a good job of keeping the mood and aesthetic from the original game without ruining the point of having an increased view distance. The main thing it does is have the fog change density with altitude, and this lets you see that there are hills and mountains in the distance without removing the fog completely. I don't really see any other way to keep the original foggy aesthetic and still have distant terrain (and eventually statics) do something useful.

I feel that until we have an official advanced fog system that can keep the best aspects of every approach, the fog distance and view distance should remain coupled. There's no point rendering a hundred miles of terrain into the distance if it's not visible because there's fog in the way, and on machines powerful enough for distant terrain, it's not desirable to have visible pop-in when the fog finishes further away than the far plane. It might make sense, however, to 'rephrase' certain things and reorganise settings such that the view distance is more clearly the fog end. Long-term, having a setting-driven near and far plane is potentially not going to remain the default. We obviously need a maximum to be set (be it by putting a limit on the maximum far plane distance directly or having a maximum distance for the distant terrain setting) but I've already fixed most of the issues with using per-frame computed near and far planes in my shadow branch, and depth partitioning and other anti-z-fighting techniques exist if necessary. Even without a huge overhaul of things, even if it turns out that OSG's automatic depth partitioning system doesn't work, we could move the distant terrain rendering to a different render bin and use a different near and far plane.

Among all this rambling, I'm basically trying to work out why you'd ever want a view distance to be different from the fog distance as you can't see things behind the fog so it's pointless putting objects there and you can see pop-in if the fog ends further than the view distance.
AnyOldName3, Master of Shadows

CMAugust
Posts: 110
Joined: 10 Jan 2016, 00:13

Re: Distant Terrain settings in Launcher

Post by CMAugust » 10 Feb 2018, 13:13

I've been testing OpenMW's distant terrain lately with an absurd view distance (6666666) to reveal the entire playable area, as a way of simulating the unlimited view distance of later Bethesda titles like Skyrim. The performance impact is negligible barring a few quirks I need to write about, but aside from the lack of any distant LOD objects it also nullifies fog-type weather effects altogether. I'm not sure if the decoupling commit would actually solve this issue. I'd be interested to know for sure.

On another note, while a LOD generator for distant terrain is an absolute must (and is miles away because nobody's started on one) it's still rather pleasant to wander Vvardenfell with crystal-clear visibility. With some quality depth-based view distance shading and the upcoming shadows feature, which includes distant terrain iirc, we'll be seeing some very worthwhile vistas even without statics. I did a mockup of how Red Mountain may look from Caldera.

Original image
Spoiler: Show
Artist's impression
Spoiler: Show

Chris
Posts: 1446
Joined: 04 Sep 2011, 08:33

Re: Distant Terrain settings in Launcher

Post by Chris » 10 Feb 2018, 13:31

AnyOldName3 wrote:
10 Feb 2018, 03:02
IMHO, the fog doesn't really exist for any artistic reason and is just a way to hide the far plane so you don't see objects clip and load distance so you don't see objects pop. It therefore should be tied to the far plane. Any way in which it affects the aesthetic and mood of the game is secondary (otherwise surely it would be affected by other factors like the weather in the original engine) and it's reasonable to expect it to change when things like the view distance are changed.
Fog is affected by weather. There's even a weather type called "Foggy". The "distant fog" settings added in that PR basically mirror what MGE XE does with fog when distant terrain is enabled. At the very least, on clear weather it simulates atmospheric scattering (the fact that the atmosphere is not 100% transparent, and helps provide depth cues we rely on to gauge distance). Other weather types add varying amounts of moisture and mist, which affects visibility by varying amounts also.
However, the 'New fog shader' thread has a different fog implementation which I feel does a good job of keeping the mood and aesthetic from the original game without ruining the point of having an increased view distance. The main thing it does is have the fog change density with altitude, and this lets you see that there are hills and mountains in the distance without removing the fog completely. I don't really see any other way to keep the original foggy aesthetic and still have distant terrain (and eventually statics) do something useful.
I think the new distant fog parameters do quite well at that. One important aspect is that the terrain is still rendered even where the fog is at maximum, rather than cutting it off as the far-clip plane. This creates distant silhouettes of the terrain, instead of a visible far-clip seam.

It's true though that shaders can make better looking fog, by utilizing more complex math based on real physics and taking other factors into account, such as altitude. MGE XE has atmospheric scattering shaders that do wonders, and look much better than the fixed-function-like fog. But even with shaders, the engine needs information about the intended depth of the fog (which transitions slowly as the weather and time change) to know how to make it look.
it's not desirable to have visible pop-in when the fog finishes further away than the far plane.
Personal preference. I would prefer the fog to finish further away than the far plane, if the far plane is relatively close. It creates a rather unpleasing outline on the far-clip seam when there's full density fog there regardless of how close it is, and creates less distinction with fog between various different weathers (a far clip seam is bad enough on its own, no need to force the fog to highlight it).
We obviously need a maximum to be set (be it by putting a limit on the maximum far plane distance directly or having a maximum distance for the distant terrain setting)
Ideally, the far-clip plane will be so far out as to be effectively infinite. Unless the user has limited it for performance reasons, if you can ever notice the far-clip plane with distant terrain it should be considered a bug. Large far plane values can create depth buffer precision issues, but there are ways to mitigate them.
Among all this rambling, I'm basically trying to work out why you'd ever want a view distance to be different from the fog distance as you can't see things behind the fog
http://wlpapers.com/images/foggy-mountains-1.jpg
You can still see beyond those mountains in the back that are covered in fog. You can only make out silhouettes, but they're not clipped out of existence for being engulfed in fog.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests