[Issue] Problems with Cesium and UE 5.5.3 on MacOS/iOS

Hello Fellow devs

I want to report some weird issues that I am having with Cesium for Unreal Version 2.13.3

I am getting these weird black spots when Cutting the geometry using a CesiumCartographicPolygon. The issue doesn’t exist on the Windows version of the project.



Windows Version

Also getting some build errors when packaging for iOS or Build with Xcode also for iOS. The cause seems to be CesiumPropertyTable.cpp because my Build stops and fails when reaching this point. Packaging(Developer) for MacOS seems to not give error but the Black spots issue persist and when I try to package(Shipping) Cesium doesn’t load the 3D Tiles.

I hope this report can help the community and developers to improve Cesium on Apple Platforms and If there are ways to solve these issues please let me know. :grin:

Regards! :smiley:
Have a nice weekend

Hi @Midgarq, welcome to the community!

I am getting these weird black spots when Cutting the geometry using a CesiumCartographicPolygon. The issue doesn’t exist on the Windows version of the project.

I don’t think you have said what platform you’re running on for these screenshots. I’m guessing macOS? What sort of Mac is this? We’re aware of some rendering problems on Intel Macs, but generally the Apple Silicon ones seem to work well.

That big black square is especially unusual. It looks like something over the top of your display, rather than a problem with the Cesium tiles themselves. I’m not sure what to make of it.

Does the clipping sample in the Cesium for Unreal Samples project work on your system?

Also getting some build errors when packaging for iOS or Build with Xcode also for iOS. The cause seems to be CesiumPropertyTable.cpp because my Build stops and fails when reaching this point.

This is most likely caused by running out of memory. Clang struggles with some of the templates used in the 3D Tiles 1.1 metadata system, and uses an unreasonable amount of memory to compile them. Please see here for a way to limit the number of simultaneous files that Unreal compiles, which will reduce the memory usage and allow the build to succeed:

when I try to package(Shipping) Cesium doesn’t load the 3D Tiles.

That’s very strange. Any error messages in the log?

@Kevin_Ring Thanks for your reply!

Blockquote I don’t think you have said what platform you’re running on for these screenshots. I’m guessing macOS? What sort of Mac is this? We’re aware of some rendering problems on Intel Macs, but generally the Apple Silicon ones seem to work well.

Yes, I got 2 versions of the project, one running on a Macbook pro M4 Max, which is the one with the black weird artifacts and a second one on Windows which runs very stable.

That big black square is especially unusual. It looks like something over the top of your display, rather than a problem with the Cesium tiles themselves. I’m not sure what to make of it.

It’s kind strange because it appears only when I rotate the scene in-game (MacOS). Windows version does not get this issue. The issue stops when I stop Cesium, so It’s somehow related. Also Black artifacts shows only when I am close to the area being cut by the CesiumCartographicPolygon. If I zoom out the black artifacts disappear.

Gonna do some test and will share my results tomorrow.

Regards!

Hello @Kevin_Ring I hope you are doing fine :slight_smile:

After modifying the BuildConfigurator.xml with

<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
	<BuildConfiguration>
		<bAllowUBAExecutor>false</bAllowUBAExecutor>
		<bAllowUBALocalExecutor>false</bAllowUBALocalExecutor>
		<MaxParallelActions>1</MaxParallelActions>
	</BuildConfiguration>
</Configuration>

I am still getting this error when trying to package the project.

UATHelper: Packaging (IOS): ------ Building 4 action(s) started ------
UATHelper: Packaging (IOS): Took 2.03s to run dotnet, ExitCode=138
UATHelper: Packaging (IOS): UnrealBuildTool failed. See log for more details. (/Users/joseantonioalvarezcanache/Library/Logs/Unreal Engine/LocalBuildLogs/UBA-CityHaus-IOS-Shipping.txt)
UATHelper: Packaging (IOS): AutomationTool executed for 0h 0m 3s
UATHelper: Packaging (IOS): AutomationTool exiting with ExitCode=138 (138)
UATHelper: Packaging (IOS): RunUAT ERROR: AutomationTool was unable to run successfully. Exited with code: 138
PackagingResults: Error: AutomationTool was unable to run successfully. Exited with code: 138
PackagingResults: Error: Unknown Error

Is there other things I can tweak to make package process lighter?

My specs are:
Apple M4 Max
36gb Ram
MacOS 15.3.1

Thank you in advice for all the support :smiley:
Regards

After modifying the BuildConfigurator.xml with

The filename is BuildConfiguration.xml. If it’s in the right location and named correctly, you should see a message from UBT in the log saying that it’s using it, so look for that.

My specs are:
Apple M4 Max
36gb Ram
MacOS 15.3.1

I have a nearly identical system. Can you help me to reproduce this myself? Ideally, step-by-step instructions starting with the Cesium for Unreal Samples project.

Sure! Thanks for your Reply!

What I do to recreate this issue is:

  1. Open the project and do the basic config of Cesium (Connect, Generate token, etc…)
  2. Add Google Photorealistic 3D Tiles to scene and config the CesiumGeoreference coordinates and height. In this case I’m using 20,655084 -105,231998 for my project.
  3. Add a CesiumCartographicPolygon to scene and adjust the corners to match the area as desired.
  4. Add a CesiumPolygonRasterOverlay to the Google photorealistic tiles and select the polygon created before.

There is the black textures when zoom is near the overlay area. After a zoom out the black spot/texture disappears.

The filename is BuildConfiguration.xml. If it’s in the right location and named correctly, you should see a message from UBT in the log saying that it’s using it, so look for that.

Thanks for letting me know. I will try to package again.

Let me know If you could reproduce the issue, I will be looking forward.

Regards
Jose :smiley:

Edit: Just checking. Is this the right directory to place the BuildConfiguration.xml?

Hello @Kevin_Ring

I did a clean install of Unreal and every plugin and finally could test the project on my iPhone 16 pro :smiley:

But that comes with new issues because it seems that CesiumPolygonRasterOverlay is not working :frowning: and some tiles won’t load.

Any clue on what could be causing this?

Thanks for all the support so far

Regards
Jose

Hi @Midgarq,

There is the black textures when zoom is near the overlay area. After a zoom out the black spot/texture disappears.

Thanks for the instructions! I can definitely confirm that clipping is broken on my MBP in UE 5.5, at least. It doesn’t look quite the same as yours, but I suspect it’s the same problem. It gives me something to debug, at least!

I wrote an issue for this with details of my investigation so far:

If you get a chance, I think it’s worth opening up the CesiumSelectTexCoords material function within the plugin and changing the code in the Custom node in there to look like this:

float2 texCoords1[4] = {TexCoord0, TexCoord1, TexCoord2, TexCoord3};
float2 texCoords2[4] = {TexCoord4, TexCoord5, TexCoord6, TexCoord7};
int index = TexCoordIndex;
if (index < 4) return texCoords1[index];
else return texCoords2[index - 4];

I’ll be very interested to know if that solves your problem as well!

Is this the right directory to place the BuildConfiguration.xml?

No, it should go in the Library (or Biblioteca) that is in your user home directory, not the root one.

Hello @Kevin_Ring

If you get a chance, I think it’s worth opening up the CesiumSelectTexCoords material function within the plugin and changing the code in the Custom node in there to look like this:

float2 texCoords1[4] = {TexCoord0, TexCoord1, TexCoord2, TexCoord3};
float2 texCoords2[4] = {TexCoord4, TexCoord5, TexCoord6, TexCoord7};
int index = TexCoordIndex;
if (index < 4) return texCoords1[index];
else return texCoords2[index - 4];

I’ll be very interested to know if that solves your problem as well!

This did the trick in Stand alone mobile game mode inside Unreal Editor.

Haven’t tried yet on my iPhone yet.

I will try to do more testing and let you know the outcome.

Thanks for your support and have a nice weekend! :smiley:

Regards
Jose

Thanks Jose!

I’ve just opened a PR with this fix, so it should be in the next release (early April):

Awesome @Kevin_Ring

Thanks for your support and glad this thread could help to improve Cesium!

Regards

Jose

Hello @Kevin_Ring

I don’t know If this is a Cesium issue related but I am getting this crash with testing my app with TestFlight.

“_GLOBAL__sub_I_SqliteCache.cpp”

The app runs fine when I run it directly from Xcode on my iPhone but When I try to test it through TestFlight this happens.

By any chance is this a known issue or is it related to Cesium?

Let me know your thoughs

Regards
Jose

I believe this is an Unreal Engine bug. I’ve reported it to Epic and it should be fixed in the next release. In the meantime, there’s a workaround here:

Thanks for your reply! @Kevin_Ring

It worked really great!

Finally I can test the app from TestFlight!

Thanks for your support and will let you know the outcome!

Regards
Jose

1 Like