Camera field of view does not affect 3d tiles level of detail

Ideally, changing your camera’s field of view would also affect 3D tiles level of detail.

In the example here, I have placed a camera into the scene, and by simplying changing the camera’s FOV from 90 to 30, and re-positioning it to frame the same elements in the scene - you can see that I get very different results.


Unreal’s 3D model & terrain systems will adapt their LOD’s to take the camera FOV into account, but Cesium doesn’t seem to do the same. Presumably this means FOV is not accounted for in the Screenspace error calculation - despite FOV clearly affecting a subjects size on the screen?

Hi @cmontero3d,

Cesium definitely takes into account the camera FOV in its LOD computations. However, there appears to be a bug with piloted actors in the Editor specifically.

We’re getting the FOV angle from the FEditorViewportClient::FOVAngle property. But strangely, even after setting the FOV to 30 degrees, the value of that property remains 90.0. The documentation for that property says “Viewport’s stored horizontal field of view (saved in ini files).” Apparently that’s the wrong property to use. There’s another property on that object, “ViewFOV” that is correctly set to 30 degrees in this scenario. So I think we just need to switch to that one.

I wrote an issue for this bug:

The Cesium code that gets the FOV is in ACesium3DTileset::GetEditorCameras(), so should be a straightforward fix if you’re up for trying it and submitting a pull request! Otherwise someone at Cesium will try to get to it soon.

For what it’s worth, this problem won’t appear in-game. The FOV should be correctly honored there.

Kevin

2 Likes

Thanks for the clarification and bug, Kevin!