Hello. I have scene with ACesium3dTileset actor with raster overlay and a Pawn with a CameraComponent on it.
I am adding CameraComponent at the BeginPlay:
CesiumCameraManager = ACesiumCameraManager::GetDefaultCameraManager(GetWorld());|
CesiumCameraID = CesiumCameraManager->AddCamera(FCesiumCamera());|
And update it in Tick:
FMinimalViewInfo CameraViewInfo;
Camera->GetCameraView(FApp::GetDeltaTime(), CameraViewInfo);
CesiumCameraManager->UpdateCamera(CesiumCameraID, FCesiumCamera(
GetViewportSize(),
CameraViewInfo.Location,
CameraViewInfo.Rotation,
CameraViewInfo.FOV,
Camera->AspectRatio
));
GetViewportSize method just returns this value:
FViewport* Viewport = GEngine->GameViewport->Viewport;
return FVector2D(Viewport->GetSizeXY());
So, here is the issue:
The tileset always culls frustum, option Enable Frustum Culling doesn’t affect anything.
This screenshot was taken with FOV 60, ConstrainAspectRatio=true, Aspect Ratio 1.0
Tileset’s enable culling volume is turned off
This screenshot was taken with same FOV 60, ConstrainAspectRatio=true, but the aspect ratio was set to 1.777778 (~16:9).
Those two screenshots had been taken with ‘Enable Frustum Culling’ to false
I also tried FOV 60, ConstrainAspectRatio=true, AspectRatio=1.777778, but the issue is still here.
I tried with and without Enable Frustum Culling option, it didn’t affect also. The only change I see is that when I press F8 and look aroung with editor’s spectator, when Enable Frustum Culling is set to true, it actually culls the tileset.
I also tried disabling ‘Constrain Aspect Ratio’ on CameraComponent of my Pawn, but it also didn’t change anything:
I tried on another level, where I put 3d tileset with ion raster overlay and DynamicPawn, and the issue was not here:
until I unchecked ‘Constrain Aspect Ratio’:
Same location with Constrain Aspect Ratio unchecked (look at bottom right) - here are holes again.
And this is dynamic pawn with FOV 90, ConstrainAspectRatio=true, AspectRatio=1.0
I am not sure if DynamicPawn tells CesiumCameraManager current aspectratio for override, but I am doing so, and I still see the holes near edges.
How can I resolve the problem?
upd: also another strange behaviour:
I tried multiplying FOV by two (to somehow ‘move’ those ‘holed’ edges), but they are still here! Why?
CesiumCameraManager->UpdateCamera(CesiumCameraID, FCesiumCamera(
GetViewportSize(),
CameraViewInfo.Location,
CameraViewInfo.Rotation,
CameraViewInfo.FOV * 2,
Camera->AspectRatio
));
And also it has a OSM building on it, and the terrain is being culled incorrectly (This screenshot was taken with ‘Enable Frustum Culling’ set to False!).