[Report] Issue where Dithering LOD transition does not consider FOV

(This is a translation of a [Japanese [Content removed] by Kitamura Toshihide.)

Thank you for your continued support.

Dithering LOD transition does not consider FOV, so that changing the FOV does not let dithering happen. In this condition, if normal camera movement causes dithering and FOV changes trigger LOD switching simultaneously, the switching may happen in an awkward way.

As Nanite is now used mainly, LOD may be considered a legacy feature. However, there are still opportunities to use it, so I am reporting this.

In the past, the issue was caused because LODDistanceFactor and ProjectionMatrix were not temporalized. So the issue was fixed by the following approach:

(1) Store the history of View.LODDistanceFactor and View.ViewMatrices.GetProjectionMatrix() in FTemporalLODState.

note: View.LODDistanceFactor was used for screen size scaling with the ratio of the current FOV to DefaultFOV. So handling this was necessary, as well.

(2) Replace View.ViewMatrices.GetProjectionMatrix(), which was used in ComputeTemporalLODBoundsScreenRadiusSquared(), with its temporalized version.

return ComputeBoundsScreenRadiusSquared(Origin, SphereRadius, View.GetTemporalLODOrigin(SampleIndex), View.GetTemporalProjectionMatrix(SampleIndex));

(3) Replace View.LODDistanceFactor, which was used in ComputeTemporalStaticMeshLOD(), with its temporalized version:

const float ScreenSizeScale = FactorScale * View.GetTemporalLODDistanceFactor(SampleIndex);

In this thread, LODDistanceFactor has been organized, so the fix will be easier in the latest version.

[Content removed]

再現手順
(1) Unzip DitherTest2.zip and start NewMap2 in PIE.

FOV is changed in Sequencer, but no dithering occurs. (DitherTest - FOV only.mp4)

(2) Start NewMap3 in PIE.

(3) If the camera movement causes dithering and FOV changes trigger LOD switching simultaneously, the switching may happen in an awkward way. (DitherTest - FOV and Move.mp4)

In the project, a cube from BasicShapes has been duplicated and its LODs have been created as follows:

- LOD0: Screen Size 1

- LOD1: Screen Size 0.25

- LOD2: Screen Size 0.1

Also, the material is in DitherMat with “Dithered LOD Transition” enabled.

Hi,

thanks for reporting this issue and providing the repro project. I have filed a bug report and will post the link here once it becomes available on the public issue tracker, so you can track its progress.

Best regards,

Sam

Hi,

the issue is now available on the public issue tracker at this link.

Thanks again,

Sam