Found precision loss while converting matrix to GPU format in large Cesium scene

Hello Cesium community,

I’m encountering a runtime error in my project when using a large Cesium-based scene (essentially a planetary-scale environment). The error message is:

Found precision loss while converting matrix to GPU format, verify the input transforms. This error usually indicates the view transform is invalid, or the PreViewTranslation/ViewOrigin was not set up correctly.

Context:

  • Engine version: UE5.5 (binary with debug symbols)

  • Using Cesium for Unreal with planetary-scale coordinates

  • The error occurs during engine initialization, before the main level is fully loaded

  • Distance Fields are enabled, and the crash seems related to FDFMatrix::MakeToRelativeWorldMatrix

What I’ve observed:

  • Matrices used in CheckMatrixPrecision have very large origin values

  • The scene spans millions of units, so object positions are extremely far from the world origin

  • World Origin Rebasing is currently disabled

Attempts to fix:

  • I tried debugging PreViewTranslation and ViewOrigin, but cannot modify engine source

  • Considered enabling World Origin Rebasing, but unsure how to integrate it safely with Cesium

Request:
I would appreciate guidance on:

  1. Best practices for handling Distance Fields or large world matrices in planetary-scale scenes

  2. How to correctly set PreViewTranslation / ViewOrigin in a Cesium large-scale setup

  3. Any engine settings or patches to avoid precision loss in this scenario

Thank you in advance for any advice or examples.

Best regards,
DimAlek)

Hi @dlcshopvorkuta, welcome to the community!

I’m not too familiar with Distance Fields, but Cesium for Unreal provides its own origin rebasing behavior in the Cesium Origin Shift component. The plugin’s DynamicPawn comes with this component attached, but you can attach this to your own custom pawn as well.

Let us know if that helps your use case! If not, please share a minimal reproducible example that triggers this error so that we can troubleshoot it on our machines. Thanks!

Thank you for the suggestion! I should clarify that the crash occurs during Editor startup initialization, before any level is loaded and when the Cesium Origin Shift component isn’t active yet. The engine’s Distance Field system attempts to initialize with planetary-scale coordinates directly, causing precision loss before origin rebasing can be applied. Are there specific settings or patches to handle large coordinates at this early engine initialization phase?