CesiumGS / cesium-omniverse

Bringing the 3D geospatial ecosystem to Omniverse
https://cesium.com/platform/cesium-for-omniverse/
Apache License 2.0
55 stars 7 forks source link

Validate accuracy of Sun and Shadows in Omniverse Create #212

Open r-veenstra opened 1 year ago

r-veenstra commented 1 year ago

Omniverse Create has built in sun/shadow geo-location tools. Validate the default lighting setup works well with the positions of our tilesets

r-veenstra commented 1 year ago

I have reviewed the lighting setup in Omniverse, and compared to the current Cesium lighting setup in Unreal

I've gone through the following process to test and validate results:

Note: After ensuring the UE5 USD aligned with the photogrammetry, tests needed to be conducted with Fabric turned off, as the dynamic Sun Study tool is not yet compatible with Fabric. Shadows were cast onto the USD Photogrammetry prims imported from UE5, which were confirmed to align perfectly with Cesium for Omniverse prims.

UE5 scene details: UE5_Georeference_Settings

UE5_TimeSettings

Findings:

1) North direction for our datasets in Omniverse aligns to -Z in world space

2) When using the Omniverse Top orthographic viewport, south (+Z world space) is pointing to the top of the viewport, or what users might typically assume to be "North". This will be misleading for users as it will appear the world is "upside down", however see point 3...

OV_Top_Viewport

3) We probably cannot rotate the data imported into Omniverse to resolve this, as it would cause imports from other packages (eg. data imported from Unreal Engine using Cesium for Unreal) to not align correctly. (Currently a Y-up export from the same dataset in UE5 will line up with Omniverse perfectly) @lilleyse @weegeekps we may want to discuss

4) So the user needs to be aware that the Top viewport is facing south. This should be added to tutorial documentation

5) The default geo-referenced light position in Omniverse appears to use positive +X in world space for North.

OV_SunStudy

6) Here are both light sources turned on - green light is from UE5 and is the expected lighting direction based on the CesiumSunSky actor in UE5. Note it is different to the Omniverse light direction.

OV_Vs_UE5_Light

7) To obtain somewhat accurate shadows, the North Orientation value in the Sun Study location needs to be set to 90. Note, when comparing to the lighting exported from UE5 using the same time and location values, there is still a small discrepancy. It is currently unclear what this is caused by.

OV_Vs_UE5_Light_Rotated

Key takeaways: