Merge branch 'viewdist' into 'master'

Downgrade FOV-dependent view distance factor to a recommendation

See merge request OpenMW/openmw!531
pull/593/head
psi29a 4 years ago
commit fd602e2c31

@ -62,12 +62,12 @@ namespace
double convertToCells(double unitRadius) double convertToCells(double unitRadius)
{ {
return std::round((unitRadius / 0.93 + 1024) / CellSizeInUnits); return std::round((unitRadius + 1024) / CellSizeInUnits);
} }
double convertToUnits(double CellGridRadius) double convertToUnits(double CellGridRadius)
{ {
return (CellSizeInUnits * CellGridRadius - 1024) * 0.93; return CellSizeInUnits * CellGridRadius - 1024;
} }
} }

@ -76,8 +76,8 @@ namespace MWRender
mLandFogStart = viewDistance * (1 - fogDepth); mLandFogStart = viewDistance * (1 - fogDepth);
mLandFogEnd = viewDistance; mLandFogEnd = viewDistance;
} }
mUnderwaterFogStart = std::min(viewDistance, 6666.f) * (1 - underwaterFog); mUnderwaterFogStart = std::min(viewDistance, 7168.f) * (1 - underwaterFog);
mUnderwaterFogEnd = std::min(viewDistance, 6666.f); mUnderwaterFogEnd = std::min(viewDistance, 7168.f);
} }
mFogColor = color; mFogColor = color;
} }

@ -51,39 +51,28 @@ viewing distance
This value controls the maximum visible distance (also called the far clipping plane). This value controls the maximum visible distance (also called the far clipping plane).
Larger values significantly improve rendering in exterior spaces, Larger values significantly improve rendering in exterior spaces,
but also increase the amount of rendered geometry and significantly reduce the frame rate. but also increase the amount of rendered geometry and significantly reduce the frame rate.
Note that when cells are visible before loading (when not using a Distant Land), the geometry will "pop-in" suddenly, Note that when cells are visible before loading, the geometry will "pop-in" suddenly,
creating a jarring visual effect. To prevent this effect, this value must be less than:: creating a jarring visual effect. To prevent this effect, this value should not be greater than:
(CellSizeInUnits * CellGridRadius - 1024) * 0.93 CellSizeInUnits * CellGridRadius - 1024
The CellSizeInUnits is the size of a game cell in units (8192 by default), CellGridRadius determines how many The CellSizeInUnits is the size of a game cell in units (8192 by default), CellGridRadius determines how many
neighboring cells to current one to load (1 by default - 3x3 grid), and 1024 is the threshold distance for loading a new cell. neighboring cells to current one to load (1 by default - 3x3 grid), and 1024 is the threshold distance for loading a new cell.
Additionally, the field of view setting also interacts with this setting because the view frustum end is a plane, The field of view setting also interacts with this setting because the view frustum end is a plane,
so you can see further at the edges of the screen than you should be able to. so you can see further at the edges of the screen than you should be able to.
This can be observed in game by looking at distant objects This can be observed in game by looking at distant objects
and rotating the camera so the objects are near the edge of the screen. and rotating the camera so the objects are near the edge of the screen.
As a result, this setting should further be reduced by a factor that depends on the field of view setting. As a result, this distance is recommended to further be reduced to avoid pop-in for wide fields of view
In the default configuration this reduction is 7%, hence the factor of 0.93 above. and long viewing distances near the edges of the screen if distant terrain and object paging are not used.
Using this factor, approximate values recommended for other CellGridRadius values are:
Reductions of up to 25% or more can be required to completely eliminate this pop-in.
======= ========
Cells Viewing
Distance
======= ========
2 14285
3 21903
4 29522
5 35924
======= ========
Reductions of up to 25% or more can be required to completely eliminate pop-in for wide fields of view
and long viewing distances near the edges of the screen.
Such situations are unusual and probably not worth the performance penalty introduced Such situations are unusual and probably not worth the performance penalty introduced
by loading geometry obscured by fog in the center of the screen. by loading geometry obscured by fog in the center of the screen.
See RenderingManager::configureFog for the relevant source code. See RenderingManager::configureFog for the relevant source code.
This setting can be adjusted in game from the ridiculously low value of 2048.0 to a maximum of 81920.0 This setting can be adjusted in game from the ridiculously low value of 2500 units to a maximum of 7168 units
using the View Distance slider in the Detail tab of the Video panel of the Options menu. using the View Distance slider in the Detail tab of the Video panel of the Options menu, unless distant terrain is enabled,
in which case the maximum is increased to 81920 units.
field of view field of view
------------- -------------

Loading…
Cancel
Save