Fix For Cesium Sun Sky issues with Georeference Origin

I understand that last year there was a post regarding lighting making actors look dark when the CesiumGeoreference was set to the Origin (Getting incorrect lighting when Georeference is True Origin) but i am still having this issue and really need to have the CesiumGeoreference at the origin because the actors position is sent in as ECEF coordinates.

Has there been a fix for this issue?

There has not been a specific fix for this issue. I think if you need to use True Origin, you’ll probably need to take manual control of your lighting. That means using Unreal’s built-in SunSky Actor and configuring it to your liking, rather than using the CesiumSunSky.

Another option is to use a local origin on the CesiumGeoreference, and convert the ECEF coordinates coming into your application to Unreal world coordinates using the Blueprint and C++ accessible functions on the CesiumGeoreference Actor.

I know there is a blueprint function for converting ECEF position to Unreal but is there one for rotations? Or do you know the best way to get this done?

The CesiumGeoreference has Blueprint-accessible TransformUnrealRotatorToEastSouthUp and TransformEastSouthUpRotatorToUnreal functions, which might help.

You can also get various transformation matrices with ComputeUnrealToEarthCenteredEarthFixedTransformation, ComputeEarthCenteredEarthFixedToUnrealTransformation, ComputeEastSouthUpToUnrealTransformation, ComputeEastSouthUpAtEarthCenteredEarthFixedPositionToUnrealTransformation, or ComputeUnrealToEastSouthUpTransformation.

Thank you for that, I was able to find the first 2 functions in the blueprints, but the second list of functions I was unable to find in the blueprints. Where would I find these?

Those functions are exposed on the CesiumGeoreference Actor in exactly the same way as TransformUnrealRotatorToEastSouthUp, so if you saw that one, I don’t know why you wouldn’t see the others. I can see them all in the list, inside the “Cesium” category, when I drag a pin out from the CesiumGeoreference:

I am using Simulink to do some of the modelling, so unfortunately I am stuck with version 1.20 until they release updated support. Do you know if there is a way I can implement the math for the rotation myself?

Cesium for Unreal is open source, so you can look at the code for the latest version and port it into your application.

Your old version of Cesium for Unreal may not have LocalHorizontalCoordinateSystem, either. You can find that in cesium-native: