diff --git a/Documentation/release-process.md b/Documentation/release-process.md index 864b591aa..cfd54f464 100644 --- a/Documentation/release-process.md +++ b/Documentation/release-process.md @@ -5,6 +5,7 @@ This is the process we follow when releasing a new version of Cesium for Unreal ## Verify the code * Update any hard coded API keys in the code * CesiumSceneGeneration.cpp, testIonToken - Make sure matches samples project + * Google3dTilesLoadTest.cpp, testGoogleUrl - Make sure matches samples project * Verify that the cesium-native submodule in the `extern` directory references the expected commit of cesium-native. Update it if necessary. Verify that CI has completed successfully for that commit of cesium-native. * Merge `ue4-main` into `ue5-main`. * Wait for CI to complete for the `ue4-main` and `ue5-main` branches. Verify that it does so successfully. diff --git a/Source/CesiumRuntime/Private/Tests/Google3dTilesLoadTest.cpp b/Source/CesiumRuntime/Private/Tests/Google3dTilesLoadTest.cpp new file mode 100644 index 000000000..c8be8b6e8 --- /dev/null +++ b/Source/CesiumRuntime/Private/Tests/Google3dTilesLoadTest.cpp @@ -0,0 +1,235 @@ +// Copyright 2020-2023 CesiumGS, Inc. and Contributors + +#if WITH_EDITOR + +#include "CesiumLoadTestCore.h" + +#include "Engine/World.h" +#include "Misc/AutomationTest.h" + +#include "Cesium3DTileset.h" +#include "CesiumSunSky.h" + +using namespace Cesium; + +namespace Cesium { +FString testGoogleUrl( + "https://tile.googleapis.com/v1/3dtiles/root.json?key=AIzaSyCaIL-JEK2Tw9MMBVKSTIu8dPkwfzfqAbU"); +} + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FGoogleTilesPompidou, + "Cesium.Performance.GoogleTiles.Pompidou", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::PerfFilter) + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FGoogleTilesChrysler, + "Cesium.Performance.GoogleTiles.Chrysler", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::PerfFilter) + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FGoogleTilesGuggenheim, + "Cesium.Performance.GoogleTiles.Guggenheim", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::PerfFilter) + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FGoogleTilesDeathValley, + "Cesium.Performance.GoogleTiles.DeathValley", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::PerfFilter) + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FGoogleTilesTokyo, + "Cesium.Performance.GoogleTiles.Tokyo", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::PerfFilter) + +IMPLEMENT_SIMPLE_AUTOMATION_TEST( + FGoogleTilesGoogleplex, + "Cesium.Performance.GoogleTiles.Googleplex", + EAutomationTestFlags::EditorContext | EAutomationTestFlags::PerfFilter) + +#define TEST_SCREEN_WIDTH 1280 +#define TEST_SCREEN_HEIGHT 720 + +void googleWarmCacheSetup(SceneGenerationContext& context) { + context.refreshTilesets(); +} + +void setupForPompidou(SceneGenerationContext& context) { + context.setCommonProperties( + FVector(2.352200, 48.860600, 200), + FVector(0, 0, 0), + FRotator(-20.0, -90.0, 0.0), + 60.0f); + + context.sunSky->TimeZone = 2.0f; + context.sunSky->UpdateSun(); + + ACesium3DTileset* tileset = context.world->SpawnActor(); + tileset->SetUrl(Cesium::testGoogleUrl); + tileset->SetTilesetSource(ETilesetSource::FromUrl); + tileset->SetActorLabel(TEXT("Center Pompidou, Paris, France")); + context.tilesets.push_back(tileset); +} + +void setupForChrysler(SceneGenerationContext& context) { + context.setCommonProperties( + FVector(-73.9752624659, 40.74697185903, 307.38), + FVector(0, 0, 0), + FRotator(-15.0, -90.0, 0.0), + 60.0f); + + context.sunSky->TimeZone = -4.0f; + context.sunSky->UpdateSun(); + + ACesium3DTileset* tileset = context.world->SpawnActor(); + tileset->SetUrl(Cesium::testGoogleUrl); + tileset->SetTilesetSource(ETilesetSource::FromUrl); + tileset->SetActorLabel(TEXT("Chrysler Building, NYC")); + context.tilesets.push_back(tileset); +} + +void setupForGuggenheim(SceneGenerationContext& context) { + context.setCommonProperties( + FVector(-2.937, 43.2685, 150), + FVector(0, 0, 0), + FRotator(-15.0, 0.0, 0.0), + 60.0f); + + context.sunSky->TimeZone = 2.0f; + context.sunSky->UpdateSun(); + + ACesium3DTileset* tileset = context.world->SpawnActor(); + tileset->SetUrl(Cesium::testGoogleUrl); + tileset->SetTilesetSource(ETilesetSource::FromUrl); + tileset->SetActorLabel(TEXT("Guggenheim Museum, Bilbao, Spain")); + context.tilesets.push_back(tileset); +} + +void setupForDeathValley(SceneGenerationContext& context) { + context.setCommonProperties( + FVector(-116.812278, 36.42, 300), + FVector(0, 0, 0), + FRotator(0, 0.0, 0.0), + 60.0f); + + context.sunSky->TimeZone = -7.0f; + context.sunSky->UpdateSun(); + + ACesium3DTileset* tileset = context.world->SpawnActor(); + tileset->SetUrl(Cesium::testGoogleUrl); + tileset->SetTilesetSource(ETilesetSource::FromUrl); + tileset->SetActorLabel( + TEXT("Zabriskie Point, Death Valley National Park, California")); + context.tilesets.push_back(tileset); +} + +void setupForTokyo(SceneGenerationContext& context) { + context.setCommonProperties( + FVector(139.7563178458, 35.652798383944, 525.62), + FVector(0, 0, 0), + FRotator(-15, -150, 0.0), + 60.0f); + + context.sunSky->TimeZone = 9.0f; + context.sunSky->UpdateSun(); + + ACesium3DTileset* tileset = context.world->SpawnActor(); + tileset->SetUrl(Cesium::testGoogleUrl); + tileset->SetTilesetSource(ETilesetSource::FromUrl); + tileset->SetActorLabel(TEXT("Tokyo Tower, Tokyo, Japan")); + context.tilesets.push_back(tileset); +} + +void setupForGoogleplex(SceneGenerationContext& context) { + context.setCommonProperties( + FVector(-122.083969, 37.424492, 142.859116), + FVector(0, 0, 0), + FRotator(-25, 95, 0), + 90.0f); + + ACesium3DTileset* tileset = context.world->SpawnActor(); + tileset->SetUrl(Cesium::testGoogleUrl); + tileset->SetTilesetSource(ETilesetSource::FromUrl); + tileset->SetActorLabel(TEXT("Google Photorealistic 3D Tiles")); + + context.tilesets.push_back(tileset); +} + +bool FGoogleTilesPompidou::RunTest(const FString& Parameters) { + std::vector testPasses; + testPasses.push_back(TestPass{"Cold Cache", nullptr, nullptr}); + + return RunLoadTest( + GetBeautifiedTestName(), + setupForPompidou, + testPasses, + TEST_SCREEN_WIDTH, + TEST_SCREEN_HEIGHT); +} + +bool FGoogleTilesChrysler::RunTest(const FString& Parameters) { + std::vector testPasses; + testPasses.push_back(TestPass{"Cold Cache", nullptr, nullptr}); + testPasses.push_back(TestPass{"Warm Cache", googleWarmCacheSetup, nullptr}); + + return RunLoadTest( + GetBeautifiedTestName(), + setupForChrysler, + testPasses, + TEST_SCREEN_WIDTH, + TEST_SCREEN_HEIGHT); +} + +bool FGoogleTilesGuggenheim::RunTest(const FString& Parameters) { + std::vector testPasses; + testPasses.push_back(TestPass{"Cold Cache", nullptr, nullptr}); + testPasses.push_back(TestPass{"Warm Cache", googleWarmCacheSetup, nullptr}); + + return RunLoadTest( + GetBeautifiedTestName(), + setupForGuggenheim, + testPasses, + TEST_SCREEN_WIDTH, + TEST_SCREEN_HEIGHT); +} + +bool FGoogleTilesDeathValley::RunTest(const FString& Parameters) { + std::vector testPasses; + testPasses.push_back(TestPass{"Cold Cache", nullptr, nullptr}); + testPasses.push_back(TestPass{"Warm Cache", googleWarmCacheSetup, nullptr}); + + return RunLoadTest( + GetBeautifiedTestName(), + setupForDeathValley, + testPasses, + TEST_SCREEN_WIDTH, + TEST_SCREEN_HEIGHT); +} + +bool FGoogleTilesTokyo::RunTest(const FString& Parameters) { + std::vector testPasses; + testPasses.push_back(TestPass{"Cold Cache", nullptr, nullptr}); + testPasses.push_back(TestPass{"Warm Cache", googleWarmCacheSetup, nullptr}); + + return RunLoadTest( + GetBeautifiedTestName(), + setupForTokyo, + testPasses, + TEST_SCREEN_WIDTH, + TEST_SCREEN_HEIGHT); +} + +bool FGoogleTilesGoogleplex::RunTest(const FString& Parameters) { + std::vector testPasses; + testPasses.push_back(TestPass{"Cold Cache", nullptr, nullptr}); + testPasses.push_back(TestPass{"Warm Cache", googleWarmCacheSetup, nullptr}); + + return RunLoadTest( + GetBeautifiedTestName(), + setupForGoogleplex, + testPasses, + TEST_SCREEN_WIDTH, + TEST_SCREEN_HEIGHT); +} + +#endif