Merge branch 'viewdist' into 'master'

Downgrade FOV-dependent view distance factor to a recommendation

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

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

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

@ -51,39 +51,28 @@ viewing distance
This value controls the maximum visible distance (also called the far clipping plane).
Larger values significantly improve rendering in exterior spaces,
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,
creating a jarring visual effect. To prevent this effect, this value must be less than::
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 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
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.
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.
As a result, this setting should further be reduced by a factor that depends on the field of view setting.
In the default configuration this reduction is 7%, hence the factor of 0.93 above.
Using this factor, approximate values recommended for other CellGridRadius values are:
======= ========
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.
As a result, this distance is recommended to further be reduced to avoid pop-in for wide fields of view
and long viewing distances near the edges of the screen if distant terrain and object paging are not used.
Reductions of up to 25% or more can be required to completely eliminate this pop-in.
Such situations are unusual and probably not worth the performance penalty introduced
by loading geometry obscured by fog in the center of the screen.
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
using the View Distance slider in the Detail tab of the Video panel of the Options menu.
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, unless distant terrain is enabled,
in which case the maximum is increased to 81920 units.
field of view
-------------

Loading…
Cancel
Save