From 891ec440ae91296bde301777ea32e83b213f956c Mon Sep 17 00:00:00 2001 From: Project PLATEAU <79615787+Project-PLATEAU@users.noreply.github.com> Date: Fri, 24 Feb 2023 00:52:53 +0900 Subject: [PATCH 01/80] Create navigation collision --- Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 41f534337..76aff5383 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -2103,6 +2103,8 @@ static void loadPrimitiveGameThreadPart( pStaticMesh->GetRenderData()->ScreenSize[0].Default = 1.0f; #endif pStaticMesh->CreateBodySetup(); + + pStaticMesh->CreateNavCollision(true); UBodySetup* pBodySetup = pMesh->GetBodySetup(); From 58570c66975d64c941d08ba10e39cbf5e7272ac2 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 23 Feb 2023 15:39:11 -0500 Subject: [PATCH 02/80] wait until the new token is resolved, delete tileset if necessary outside pTileset --- CHANGES.md | 6 ++++++ .../CesiumEditor/Private/SelectCesiumIonToken.cpp | 15 +++++++++------ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 39b5ab8dc..c59b32d49 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,8 +2,14 @@ ### v1.23.0 - 2023-03-01 +##### Additions :tada: + - Added support for rendering point clouds (`pnts`). +##### Fixes :wrench: + +- Fixed bug that causes a crash when changing the project default token. + ### v1.22.0 - 2023-02-01 ##### Additions :tada: diff --git a/Source/CesiumEditor/Private/SelectCesiumIonToken.cpp b/Source/CesiumEditor/Private/SelectCesiumIonToken.cpp index c986b26c8..54c4d5418 100644 --- a/Source/CesiumEditor/Private/SelectCesiumIonToken.cpp +++ b/Source/CesiumEditor/Private/SelectCesiumIonToken.cpp @@ -392,12 +392,11 @@ void SelectCesiumIonToken::createRadioButton( } FReply SelectCesiumIonToken::UseOrCreate() { - if (!this->_promise) { - return FReply::Handled(); - } - - Promise> promise = std::move(*this->_promise); - this->_promise.reset(); + Promise> promise = + FCesiumEditorModule::ion() + .getAsyncSystem() + .createPromise>(); + SharedFuture> future = promise.getFuture().share(); TSharedRef pPanel = StaticCastSharedRef(this->AsShared()); @@ -497,6 +496,10 @@ FReply SelectCesiumIonToken::UseOrCreate() { pPanel->RequestDestroyWindow(); }); + while (!future.isReady()) { + FCesiumEditorModule::ion().getAssetAccessor()->tick(); + FCesiumEditorModule::ion().getAsyncSystem().dispatchMainThreadTasks(); + } return FReply::Handled(); } From 234d15d1dd058a5871e7b926d8eabe9c07486d41 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 28 Feb 2023 23:02:34 +1100 Subject: [PATCH 03/80] Switch back to panel promise/future. --- .../CesiumEditor/Private/SelectCesiumIonToken.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Source/CesiumEditor/Private/SelectCesiumIonToken.cpp b/Source/CesiumEditor/Private/SelectCesiumIonToken.cpp index 54c4d5418..b0d3da65c 100644 --- a/Source/CesiumEditor/Private/SelectCesiumIonToken.cpp +++ b/Source/CesiumEditor/Private/SelectCesiumIonToken.cpp @@ -392,11 +392,12 @@ void SelectCesiumIonToken::createRadioButton( } FReply SelectCesiumIonToken::UseOrCreate() { - Promise> promise = - FCesiumEditorModule::ion() - .getAsyncSystem() - .createPromise>(); - SharedFuture> future = promise.getFuture().share(); + if (!this->_promise || !this->_future) { + return FReply::Handled(); + } + + Promise> promise = std::move(*this->_promise); + this->_promise.reset(); TSharedRef pPanel = StaticCastSharedRef(this->AsShared()); @@ -496,10 +497,11 @@ FReply SelectCesiumIonToken::UseOrCreate() { pPanel->RequestDestroyWindow(); }); - while (!future.isReady()) { + while (!this->_future->isReady()) { FCesiumEditorModule::ion().getAssetAccessor()->tick(); FCesiumEditorModule::ion().getAsyncSystem().dispatchMainThreadTasks(); } + return FReply::Handled(); } From 418784e59df3b50bb12303f2b9998cb4b0a02655 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 28 Feb 2023 23:20:48 +1100 Subject: [PATCH 04/80] Update CHANGES.md, bump version to v1.23.0. --- CHANGES.md | 6 ++++-- CesiumForUnreal.uplugin | 4 ++-- extern/cesium-native | 2 +- package.json | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c59b32d49..90729148c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,11 +4,13 @@ ##### Additions :tada: -- Added support for rendering point clouds (`pnts`). +- Added support for rendering 3D Tiles point clouds (`pnts`). ##### Fixes :wrench: -- Fixed bug that causes a crash when changing the project default token. +- Fixed bug that caused a crash when changing the project default token with tilesets active in the level. + +In addition to the above, this release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.21.3 to v0.22.0. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native. ### v1.22.0 - 2023-02-01 diff --git a/CesiumForUnreal.uplugin b/CesiumForUnreal.uplugin index 67e85585a..b3f0fa61a 100644 --- a/CesiumForUnreal.uplugin +++ b/CesiumForUnreal.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, - "Version": 38, - "VersionName": "1.22.0", + "Version": 39, + "VersionName": "1.23.0", "FriendlyName": "Cesium for Unreal", "Description": "Unlock the 3D geospatial ecosystem in Unreal Engine with real-world 3D content and a high accuracy full-scale WGS84 globe.", "Category": "Geospatial", diff --git a/extern/cesium-native b/extern/cesium-native index 7600488e9..e4bc2e8d9 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 7600488e9c1ef66b428d062b021b02ca34573616 +Subproject commit e4bc2e8d98ef8a5d99f2875b4e9d86fb202dd385 diff --git a/package.json b/package.json index e6de519f1..9f57c8644 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cesium-unreal", - "version": "1.22.0", + "version": "1.23.0", "description": "Cesium for Unreal", "main": "index.js", "directories": { From 5cfa9673dddb5c087558a126d56c891249460611 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 28 Feb 2023 23:43:46 +1100 Subject: [PATCH 05/80] Update CHANGES.md. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 90729148c..a4dfe02ca 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,7 @@ ##### Fixes :wrench: - Fixed bug that caused a crash when changing the project default token with tilesets active in the level. +- Vertex buffers created for 3D Tiles are now set to use full-precision UV coordinates, avoiding problems in particular with feature IDs. In addition to the above, this release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.21.3 to v0.22.0. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native. From e3f21970a70af889ebf32596fb31fc71d43fd0bd Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Mar 2023 11:05:23 +1100 Subject: [PATCH 06/80] Update for breaking changes in cesium-native. --- Source/CesiumRuntime/Private/Cesium3DTileset.cpp | 1 - Source/CesiumRuntime/Private/CesiumGeoreference.cpp | 1 - Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 8 ++++---- Source/CesiumRuntime/Private/GeoTransforms.cpp | 9 +++++---- Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp | 1 - Source/CesiumRuntime/Private/VecMath.cpp | 1 - 6 files changed, 9 insertions(+), 12 deletions(-) diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index 1ee993301..06a3a4cf6 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -20,7 +20,6 @@ #include "CesiumCustomVersion.h" #include "CesiumGeospatial/Cartographic.h" #include "CesiumGeospatial/Ellipsoid.h" -#include "CesiumGeospatial/Transforms.h" #include "CesiumGltf/ImageCesium.h" #include "CesiumGltf/Ktx2TranscodeTargets.h" #include "CesiumGltfComponent.h" diff --git a/Source/CesiumRuntime/Private/CesiumGeoreference.cpp b/Source/CesiumRuntime/Private/CesiumGeoreference.cpp index e7c7e2857..8f6566739 100644 --- a/Source/CesiumRuntime/Private/CesiumGeoreference.cpp +++ b/Source/CesiumRuntime/Private/CesiumGeoreference.cpp @@ -4,7 +4,6 @@ #include "Camera/PlayerCameraManager.h" #include "CesiumActors.h" #include "CesiumCommon.h" -#include "CesiumGeospatial/Transforms.h" #include "CesiumRuntime.h" #include "CesiumTransforms.h" #include "CesiumUtility/Math.h" diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 41f534337..59df92f9c 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -13,8 +13,8 @@ #include "CesiumFeatureTexture.h" #include "CesiumFeatureTextureProperty.h" #include "CesiumGeometry/Axis.h" -#include "CesiumGeometry/AxisTransforms.h" #include "CesiumGeometry/Rectangle.h" +#include "CesiumGeometry/Transforms.h" #include "CesiumGltf/AccessorView.h" #include "CesiumGltf/ExtensionKhrMaterialsUnlit.h" #include "CesiumGltf/ExtensionMeshPrimitiveExtFeatureMetadata.h" @@ -1508,15 +1508,15 @@ void applyGltfUpAxisTransform(const Model& model, glm::dmat4x4& rootTransform) { // The default up-axis of glTF is the Y-axis, and no other // up-axis was specified. Transform the Y-axis to the Z-axis, // to match the 3D Tiles specification - rootTransform *= CesiumGeometry::AxisTransforms::Y_UP_TO_Z_UP; + rootTransform *= CesiumGeometry::Transforms::Y_UP_TO_Z_UP; return; } const CesiumUtility::JsonValue& gltfUpAxis = gltfUpAxisIt->second; int gltfUpAxisValue = static_cast(gltfUpAxis.getSafeNumberOrDefault(1)); if (gltfUpAxisValue == static_cast(CesiumGeometry::Axis::X)) { - rootTransform *= CesiumGeometry::AxisTransforms::X_UP_TO_Z_UP; + rootTransform *= CesiumGeometry::Transforms::X_UP_TO_Z_UP; } else if (gltfUpAxisValue == static_cast(CesiumGeometry::Axis::Y)) { - rootTransform *= CesiumGeometry::AxisTransforms::Y_UP_TO_Z_UP; + rootTransform *= CesiumGeometry::Transforms::Y_UP_TO_Z_UP; } else if (gltfUpAxisValue == static_cast(CesiumGeometry::Axis::Z)) { // No transform required } else { diff --git a/Source/CesiumRuntime/Private/GeoTransforms.cpp b/Source/CesiumRuntime/Private/GeoTransforms.cpp index 1ccf53960..10f4ffd38 100644 --- a/Source/CesiumRuntime/Private/GeoTransforms.cpp +++ b/Source/CesiumRuntime/Private/GeoTransforms.cpp @@ -2,7 +2,7 @@ #include "GeoTransforms.h" -#include "CesiumGeospatial/Transforms.h" +#include "CesiumGeospatial/GlobeTransforms.h" #include "CesiumTransforms.h" #include "VecMath.h" @@ -52,7 +52,7 @@ glm::dquat GeoTransforms::ComputeSurfaceNormalRotationUnreal( void GeoTransforms::updateTransforms() noexcept { this->_georeferencedToEcef = - CesiumGeospatial::Transforms::eastNorthUpToFixedFrame( + CesiumGeospatial::GlobeTransforms::eastNorthUpToFixedFrame( _center, _ellipsoid); this->_ecefToGeoreferenced = glm::affineInverse(this->_georeferencedToEcef); @@ -166,6 +166,7 @@ glm::dmat3 GeoTransforms::ComputeEastSouthUpToUnreal( glm::dmat3 GeoTransforms::ComputeEastNorthUpToEcef(const glm::dvec3& ecef) const noexcept { - return glm::dmat3( - CesiumGeospatial::Transforms::eastNorthUpToFixedFrame(ecef, _ellipsoid)); + return glm::dmat3(CesiumGeospatial::GlobeTransforms::eastNorthUpToFixedFrame( + ecef, + _ellipsoid)); } diff --git a/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp b/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp index 3470b68d6..aa93b7158 100644 --- a/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp +++ b/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp @@ -6,7 +6,6 @@ #include "CesiumCustomVersion.h" #include "CesiumGeoreference.h" #include "CesiumGeospatial/Ellipsoid.h" -#include "CesiumGeospatial/Transforms.h" #include "CesiumGlobeAnchorComponent.h" #include "CesiumRuntime.h" #include "CesiumTransforms.h" diff --git a/Source/CesiumRuntime/Private/VecMath.cpp b/Source/CesiumRuntime/Private/VecMath.cpp index 1e87ec406..76f4657d4 100644 --- a/Source/CesiumRuntime/Private/VecMath.cpp +++ b/Source/CesiumRuntime/Private/VecMath.cpp @@ -5,7 +5,6 @@ #include "CesiumUtility/Math.h" #include "Math/Quat.h" #include "Math/RotationMatrix.h" -#include #include #include #include From 11b3a04a34bef8b24f5a0da3e4cbe1a1ff455ba1 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Mar 2023 11:18:13 +1100 Subject: [PATCH 07/80] Add missing headers for non-unity build. --- Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 2 ++ Source/CesiumRuntime/Private/CesiumLifetime.cpp | 1 + Source/CesiumRuntime/Private/CesiumRasterOverlay.cpp | 1 + Source/CesiumRuntime/Private/ScreenCreditsWidget.cpp | 1 + Source/CesiumRuntime/Public/CesiumRuntime.h | 1 + 5 files changed, 6 insertions(+) diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 59df92f9c..7aa7b5141 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -46,9 +46,11 @@ #include "StaticMeshOperations.h" #include "StaticMeshResources.h" #include "UObject/ConstructorHelpers.h" +#include "VecMath.h" #include "mikktspace.h" #include #include +#include #include #include #include diff --git a/Source/CesiumRuntime/Private/CesiumLifetime.cpp b/Source/CesiumRuntime/Private/CesiumLifetime.cpp index 183698ed6..4375b5945 100644 --- a/Source/CesiumRuntime/Private/CesiumLifetime.cpp +++ b/Source/CesiumRuntime/Private/CesiumLifetime.cpp @@ -1,6 +1,7 @@ // Copyright 2020-2021 CesiumGS, Inc. and Contributors #include "CesiumLifetime.h" +#include "CesiumRuntime.h" #include "Engine/StaticMesh.h" #include "Engine/Texture2D.h" #include "PhysicsEngine/BodySetup.h" diff --git a/Source/CesiumRuntime/Private/CesiumRasterOverlay.cpp b/Source/CesiumRuntime/Private/CesiumRasterOverlay.cpp index 2c6ed1a9e..45fee8d3f 100644 --- a/Source/CesiumRuntime/Private/CesiumRasterOverlay.cpp +++ b/Source/CesiumRuntime/Private/CesiumRasterOverlay.cpp @@ -6,6 +6,7 @@ #include "Cesium3DTilesSelection/Tileset.h" #include "Cesium3DTileset.h" #include "CesiumAsync/IAssetResponse.h" +#include "CesiumRuntime.h" FCesiumRasterOverlayLoadFailure OnCesiumRasterOverlayLoadFailure{}; diff --git a/Source/CesiumRuntime/Private/ScreenCreditsWidget.cpp b/Source/CesiumRuntime/Private/ScreenCreditsWidget.cpp index c1c58695e..070caecaf 100644 --- a/Source/CesiumRuntime/Private/ScreenCreditsWidget.cpp +++ b/Source/CesiumRuntime/Private/ScreenCreditsWidget.cpp @@ -12,6 +12,7 @@ #include "Math/UnrealMathUtility.h" #include "Misc/Base64.h" #include "Rendering/DrawElements.h" +#include "Runtime/Launch/Resources/Version.h" #include "Slate/SlateGameResources.h" #include "UObject/ConstructorHelpers.h" #include "Widgets/DeclarativeSyntaxSupport.h" diff --git a/Source/CesiumRuntime/Public/CesiumRuntime.h b/Source/CesiumRuntime/Public/CesiumRuntime.h index 606c61c89..f383d15c7 100644 --- a/Source/CesiumRuntime/Public/CesiumRuntime.h +++ b/Source/CesiumRuntime/Public/CesiumRuntime.h @@ -4,6 +4,7 @@ #include "CoreMinimal.h" #include "Modules/ModuleManager.h" +#include class ACesium3DTileset; class UCesiumRasterOverlay; From d7f59408f7a96b848bc00001fd4965431c9a08dc Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 1 Mar 2023 11:22:40 +1100 Subject: [PATCH 08/80] Update CHANGES.md. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index a4dfe02ca..71de6ded9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -10,6 +10,7 @@ - Fixed bug that caused a crash when changing the project default token with tilesets active in the level. - Vertex buffers created for 3D Tiles are now set to use full-precision UV coordinates, avoiding problems in particular with feature IDs. +- Added some missing headers, to avoid compiler errors in non-unity builds. In addition to the above, this release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.21.3 to v0.22.0. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native. From 685f697e462a8398bd61ac3ff09bc506ef8fe58b Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sat, 4 Mar 2023 19:18:44 -0500 Subject: [PATCH 09/80] add nasm to ci --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 937f1b195..86d0dcdca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,6 +17,7 @@ jobs: install: - choco install 7zip.portable - choco install python --version 3.9.2 + - choco install nasm - python -m pip install --upgrade pip - pip3 install --upgrade pip - pip3 install awscli @@ -53,6 +54,7 @@ jobs: - choco install python --version 3.9.2 - choco install wget - choco install ninja + - choco install nasm - python -m pip install --upgrade pip - pip3 install --upgrade pip - pip3 install awscli @@ -86,6 +88,7 @@ jobs: os: osx osx_image: xcode11.3 install: + - brew install nasm - python -m pip install --upgrade pip - pip3 install --upgrade pip - pip3 install awscli @@ -115,6 +118,7 @@ jobs: os: osx osx_image: xcode11.3 install: + - brew install nasm - python -m pip install --upgrade pip - pip3 install --upgrade pip - pip3 install awscli @@ -153,6 +157,7 @@ jobs: - choco install python --version 3.9.2 - choco install wget - choco install ninja + - choco install nasm - python -m pip install --upgrade pip - pip3 install --upgrade pip - pip3 install awscli From fd3c7844a9fcd14a4cf21fb4240e492a4d660610 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sat, 4 Mar 2023 19:19:07 -0500 Subject: [PATCH 10/80] add turbojpeg to list of libraries to load --- Source/CesiumRuntime/CesiumRuntime.Build.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/CesiumRuntime/CesiumRuntime.Build.cs b/Source/CesiumRuntime/CesiumRuntime.Build.cs index 9197a9acb..0246c902b 100644 --- a/Source/CesiumRuntime/CesiumRuntime.Build.cs +++ b/Source/CesiumRuntime/CesiumRuntime.Build.cs @@ -91,6 +91,7 @@ public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target) "spdlog", "sqlite3", "tinyxml2", + "turbojpeg", "uriparser", "webpdecoder", "ktx_read", From 57fb53498e7cc8d58ce560af79a53955076e4f37 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sat, 4 Mar 2023 19:19:41 -0500 Subject: [PATCH 11/80] use libturbojpeg branch of cesium-native --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index e4bc2e8d9..a443f1f50 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit e4bc2e8d98ef8a5d99f2875b4e9d86fb202dd385 +Subproject commit a443f1f50e2ae5beced56c6c0c7fcebdd8d3d000 From ce47558ec3d02bb860836e6a732a45147249dd63 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sat, 4 Mar 2023 21:39:34 -0500 Subject: [PATCH 12/80] fix getting toolchain file path --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index a443f1f50..18b8102dd 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit a443f1f50e2ae5beced56c6c0c7fcebdd8d3d000 +Subproject commit 18b8102dd3c997c23c4a66d156b891c49e91d713 From 07e6ea11f47970809448bae0f382409de9a3178d Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 00:34:32 -0500 Subject: [PATCH 13/80] find another way to get nasm on macos --- .travis.yml | 1 - extern/cesium-native | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 86d0dcdca..7ef47e09b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -88,7 +88,6 @@ jobs: os: osx osx_image: xcode11.3 install: - - brew install nasm - python -m pip install --upgrade pip - pip3 install --upgrade pip - pip3 install awscli diff --git a/extern/cesium-native b/extern/cesium-native index 18b8102dd..f0e91283a 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 18b8102dd3c997c23c4a66d156b891c49e91d713 +Subproject commit f0e91283a486045a9252b50160e85090670b7301 From 2643de32f6fcc6e453f6b14c0cf1372f9151ec7b Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 01:56:06 -0500 Subject: [PATCH 14/80] update cesium-native --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index f0e91283a..06a193d4a 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit f0e91283a486045a9252b50160e85090670b7301 +Subproject commit 06a193d4a9335b158c5933227e5a039f347e93db From c5dbaab40574b3c8a0fb8fe7916442b6f3ec1d19 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 03:19:18 -0500 Subject: [PATCH 15/80] download and install nasm on osx --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 7ef47e09b..e344dbe05 100644 --- a/.travis.yml +++ b/.travis.yml @@ -122,6 +122,9 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie + - curl -O https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/macosx/nasm-2.16.01-macosx.zip + - unzip nasm-2.16.01-macosx.zip + - export PATH=“$PATH:$PWD/nasm-2.16.01” - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: From 0445bcdced87324aeafab2c5012d459abce53be9 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 03:56:36 -0500 Subject: [PATCH 16/80] fix macos/ios build --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e344dbe05..95d240711 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,6 +92,9 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie + - curl -O https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/macosx/nasm-2.16.01-macosx.zip + - unzip nasm-2.16.01-macosx.zip + - export PATH=“$PATH:$PWD/nasm-2.16.01” - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: @@ -117,7 +120,6 @@ jobs: os: osx osx_image: xcode11.3 install: - - brew install nasm - python -m pip install --upgrade pip - pip3 install --upgrade pip - pip3 install awscli From b880940b59d734818f1caadc26dcc0037eb5810a Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 05:05:54 -0500 Subject: [PATCH 17/80] add insecure flag to curl --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 95d240711..5104c7dfe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,7 +92,7 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie - - curl -O https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/macosx/nasm-2.16.01-macosx.zip + - curl -kO https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/macosx/nasm-2.16.01-macosx.zip - unzip nasm-2.16.01-macosx.zip - export PATH=“$PATH:$PWD/nasm-2.16.01” - chmod +x "./travis/travis-get-ue-427.sh" @@ -124,7 +124,7 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie - - curl -O https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/macosx/nasm-2.16.01-macosx.zip + - curl -kO https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/macosx/nasm-2.16.01-macosx.zip - unzip nasm-2.16.01-macosx.zip - export PATH=“$PATH:$PWD/nasm-2.16.01” - chmod +x "./travis/travis-get-ue-427.sh" From 2d3e98d2a5202cc683a32ef76318b0ad9aa21dbc Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 14:12:46 -0500 Subject: [PATCH 18/80] build nasm from source --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5104c7dfe..1786ed1fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,9 +92,9 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie - - curl -kO https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/macosx/nasm-2.16.01-macosx.zip - - unzip nasm-2.16.01-macosx.zip - - export PATH=“$PATH:$PWD/nasm-2.16.01” + - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.16.tar.gz + - tar -xzvf nasm-2.16.tar.gz + - pushd nasm-nasm-2.16 && ./autogen.sh && ./configure && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: @@ -124,9 +124,9 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie - - curl -kO https://www.nasm.us/pub/nasm/releasebuilds/2.16.01/macosx/nasm-2.16.01-macosx.zip - - unzip nasm-2.16.01-macosx.zip - - export PATH=“$PATH:$PWD/nasm-2.16.01” + - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.16.tar.gz + - tar -xzvf nasm-2.16.tar.gz + - pushd nasm-nasm-2.16 && ./autogen.sh && ./configure && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: From ba34ec227062862e5591024b44fa4f8eecffcc6b Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 14:24:18 -0500 Subject: [PATCH 19/80] use older version of nasm --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1786ed1fd..e5aa7386e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -125,8 +125,8 @@ jobs: - pip3 install awscli - pip3 install httpie - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.16.tar.gz - - tar -xzvf nasm-2.16.tar.gz - - pushd nasm-nasm-2.16 && ./autogen.sh && ./configure && make && sudo make install && popd + - tar -xzvf nasm-2.14.tar.gz + - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: From ac1dd4f34da3776dd64c2c28773f57e78833cf41 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 14:30:57 -0500 Subject: [PATCH 20/80] use older version of nasm --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e5aa7386e..b9da68ac7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,9 +92,9 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie - - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.16.tar.gz - - tar -xzvf nasm-2.16.tar.gz - - pushd nasm-nasm-2.16 && ./autogen.sh && ./configure && make && sudo make install && popd + - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.14.tar.gz + - tar -xzvf nasm-2.14.tar.gz + - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: @@ -124,7 +124,7 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie - - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.16.tar.gz + - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.14.tar.gz - tar -xzvf nasm-2.14.tar.gz - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" From 0aa7f12197da754f7001cf8a9c4a9fc987961f91 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 14:56:30 -0500 Subject: [PATCH 21/80] use different install prefix as not to replace other nasm --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b9da68ac7..9e325daeb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -94,7 +94,7 @@ jobs: - pip3 install httpie - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.14.tar.gz - tar -xzvf nasm-2.14.tar.gz - - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure && make && sudo make install && popd + - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure --prefix=/usr/local && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: @@ -126,7 +126,7 @@ jobs: - pip3 install httpie - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.14.tar.gz - tar -xzvf nasm-2.14.tar.gz - - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure && make && sudo make install && popd + - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure --prefix=/usr/local && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: From 85aa1c1c00fb165489fd8181750a54af94a3a20a Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sun, 5 Mar 2023 18:36:34 -0500 Subject: [PATCH 22/80] download nasm from another source --- .travis.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9e325daeb..78479790e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,9 +92,9 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie - - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.14.tar.gz - - tar -xzvf nasm-2.14.tar.gz - - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure --prefix=/usr/local && make && sudo make install && popd + - wget https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz + - tar -xzvf nasm-2.14.02.tar.xz + - pushd nasm-2.14.02 && ./configure --prefix=/usr/local && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: @@ -124,9 +124,9 @@ jobs: - pip3 install --upgrade pip - pip3 install awscli - pip3 install httpie - - wget https://github.com/netwide-assembler/nasm/archive/refs/tags/nasm-2.14.tar.gz - - tar -xzvf nasm-2.14.tar.gz - - pushd nasm-nasm-2.14 && ./autogen.sh && ./configure --prefix=/usr/local && make && sudo make install && popd + - wget https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz + - tar -xzvf nasm-2.14.02.tar.xz + - pushd nasm-2.14.02 && ./configure --prefix=/usr/local && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" before_script: From 7dcd11758f845bb0985f521ccdab815d38437c48 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 6 Mar 2023 01:46:49 -0500 Subject: [PATCH 23/80] use newer version of xcode --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 78479790e..c66d25a6c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,7 +86,7 @@ jobs: env: PATH=/c/Python39:/c/Python39/Scripts:$PATH - name: MacOS 4.27 os: osx - osx_image: xcode11.3 + osx_image: xcode12 install: - python -m pip install --upgrade pip - pip3 install --upgrade pip From ba06598974dbb2b9cfd8b60a55b5bf8b4a355600 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 6 Mar 2023 01:50:49 -0500 Subject: [PATCH 24/80] use newer xcode version for ios --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c66d25a6c..f86874fa7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -118,7 +118,7 @@ jobs: - export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000) - name: iOS 4.27 os: osx - osx_image: xcode11.3 + osx_image: xcode12 install: - python -m pip install --upgrade pip - pip3 install --upgrade pip From dcb0928e59f199f9058436513364c7dcf4974326 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 6 Mar 2023 13:33:45 -0500 Subject: [PATCH 25/80] Revert "use newer version of xcode" This reverts commit 7dcd11758f845bb0985f521ccdab815d38437c48. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f86874fa7..5b3d5e76a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -86,7 +86,7 @@ jobs: env: PATH=/c/Python39:/c/Python39/Scripts:$PATH - name: MacOS 4.27 os: osx - osx_image: xcode12 + osx_image: xcode11.3 install: - python -m pip install --upgrade pip - pip3 install --upgrade pip From e60907c3ee5748962e93a9666f0766c5487880c6 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 6 Mar 2023 13:34:03 -0500 Subject: [PATCH 26/80] Revert "use newer xcode version for ios" This reverts commit ba06598974dbb2b9cfd8b60a55b5bf8b4a355600. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5b3d5e76a..78479790e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -118,7 +118,7 @@ jobs: - export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000) - name: iOS 4.27 os: osx - osx_image: xcode12 + osx_image: xcode11.3 install: - python -m pip install --upgrade pip - pip3 install --upgrade pip From 4bc88887a241a8264f5446b6791ce3b060bb119b Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 6 Mar 2023 13:38:09 -0500 Subject: [PATCH 27/80] update cesium-native --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 06a193d4a..039921b5e 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 06a193d4a9335b158c5933227e5a039f347e93db +Subproject commit 039921b5e9491bc4048488906423b862746e7a62 From 05bb8514aa00d2c66643660fa8753918269cdca6 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 6 Mar 2023 13:58:57 -0500 Subject: [PATCH 28/80] only test compile as static library --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 039921b5e..ea3b028f5 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 039921b5e9491bc4048488906423b862746e7a62 +Subproject commit ea3b028f558ae7f7a2d1a2c0174e4a96a343bb2d From 1d91699ddbb4bbce4299ed37162045e9fe8a0935 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 6 Mar 2023 14:12:46 -0500 Subject: [PATCH 29/80] update ios toolchain file --- extern/unreal-ios-toolchain.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extern/unreal-ios-toolchain.cmake b/extern/unreal-ios-toolchain.cmake index 524c89e17..8d33a91f2 100644 --- a/extern/unreal-ios-toolchain.cmake +++ b/extern/unreal-ios-toolchain.cmake @@ -1,4 +1,6 @@ set(GENERATOR Xcode) set(CMAKE_SYSTEM_NAME iOS) set(CMAKE_OSX_ARCHITECTURES arm64) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) \ No newline at end of file +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +set(CMAKE_MACOSX_BUNDLE YES) +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") From 8c10969c8ba7828f61b46501551638daf9633568 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Tue, 7 Mar 2023 23:34:59 -0500 Subject: [PATCH 30/80] update cesium-native --- Source/CesiumRuntime/CesiumRuntime.Build.cs | 5 ++--- extern/cesium-native | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/CesiumRuntime/CesiumRuntime.Build.cs b/Source/CesiumRuntime/CesiumRuntime.Build.cs index 0246c902b..12ec9d1a2 100644 --- a/Source/CesiumRuntime/CesiumRuntime.Build.cs +++ b/Source/CesiumRuntime/CesiumRuntime.Build.cs @@ -91,7 +91,6 @@ public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target) "spdlog", "sqlite3", "tinyxml2", - "turbojpeg", "uriparser", "webpdecoder", "ktx_read", @@ -106,11 +105,11 @@ public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target) if (Target.Platform == UnrealTargetPlatform.Win64) { - libs = libs.Concat(new string[] { "tidy_static" }).ToArray(); + libs = libs.Concat(new string[] { "tidy_static", "turbojpeg-static" }).ToArray(); } else { - libs = libs.Concat(new string[] { "tidy" }).ToArray(); + libs = libs.Concat(new string[] { "tidy", "turbojpeg" }).ToArray(); } if (preferDebug) diff --git a/extern/cesium-native b/extern/cesium-native index ea3b028f5..232c08ccf 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit ea3b028f558ae7f7a2d1a2c0174e4a96a343bb2d +Subproject commit 232c08ccf34ed81642d374dfb0cb3ce20305e5bc From 7d75608b9b5a19a59826b78f6a5d950b541163b7 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 8 Mar 2023 01:26:15 -0500 Subject: [PATCH 31/80] use newer xcode version to fix ios build --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 232c08ccf..ce53fe64d 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 232c08ccf34ed81642d374dfb0cb3ce20305e5bc +Subproject commit ce53fe64d6a0b060120f20cafc53ae684a4169d7 From d99e33565c3d70b754eecfe81d2d3e6ffb7b312a Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 8 Mar 2023 02:10:14 -0500 Subject: [PATCH 32/80] use newer version of xcode --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index ce53fe64d..b20d0464e 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit ce53fe64d6a0b060120f20cafc53ae684a4169d7 +Subproject commit b20d0464ea534dbfd8cfea1ebe6867f866588b73 From 59cce70bb3cc8013564de91b200f720ff80168a6 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 8 Mar 2023 17:42:37 -0500 Subject: [PATCH 33/80] fix macosx build --- extern/cesium-native | 2 +- extern/unreal-ios-toolchain.cmake | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/extern/cesium-native b/extern/cesium-native index b20d0464e..de1799ecb 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit b20d0464ea534dbfd8cfea1ebe6867f866588b73 +Subproject commit de1799ecb17ae9e3b0347669f3ad82a12d5a99e3 diff --git a/extern/unreal-ios-toolchain.cmake b/extern/unreal-ios-toolchain.cmake index 8d33a91f2..524c89e17 100644 --- a/extern/unreal-ios-toolchain.cmake +++ b/extern/unreal-ios-toolchain.cmake @@ -1,6 +1,4 @@ set(GENERATOR Xcode) set(CMAKE_SYSTEM_NAME iOS) set(CMAKE_OSX_ARCHITECTURES arm64) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) -set(CMAKE_MACOSX_BUNDLE YES) -set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_POSITION_INDEPENDENT_CODE ON) \ No newline at end of file From c7b06be6f35022216698222785e80036053696b0 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 8 Mar 2023 21:23:29 -0500 Subject: [PATCH 34/80] build using toolchain file which passed ci --- .travis.yml | 2 +- extern/cesium-native | 2 +- extern/unreal-ios-toolchain.cmake | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 78479790e..838f0636d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -134,7 +134,7 @@ jobs: - export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION} - cd extern - mkdir build-ios - - cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release + - cmake -B build-ios -S . -GXcode -DCMAKE_TOOLCHAIN_FILE="unreal-ios-toolchain.cmake" -DCMAKE_BUILD_TYPE=Release - cd .. script: - cd extern diff --git a/extern/cesium-native b/extern/cesium-native index de1799ecb..cded26ccf 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit de1799ecb17ae9e3b0347669f3ad82a12d5a99e3 +Subproject commit cded26ccfa0b2115e48d382508fe4bd331053a04 diff --git a/extern/unreal-ios-toolchain.cmake b/extern/unreal-ios-toolchain.cmake index 524c89e17..2d4d965ff 100644 --- a/extern/unreal-ios-toolchain.cmake +++ b/extern/unreal-ios-toolchain.cmake @@ -1,4 +1,5 @@ -set(GENERATOR Xcode) set(CMAKE_SYSTEM_NAME iOS) set(CMAKE_OSX_ARCHITECTURES arm64) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) \ No newline at end of file +set(CMAKE_POSITION_INDEPENDENT_CODE ON) +set(CMAKE_MACOSX_BUNDLE YES) +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO) From e339151e9902b789513e63f550b52b683636aec1 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 8 Mar 2023 23:19:58 -0500 Subject: [PATCH 35/80] dont shadow toolchain variables with empty params from command line --- extern/cesium-native | 2 +- extern/unreal-ios-toolchain.cmake | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index cded26ccf..f937b5d1a 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit cded26ccfa0b2115e48d382508fe4bd331053a04 +Subproject commit f937b5d1a0a8ec5fd75e72888f19473f4e0668b5 diff --git a/extern/unreal-ios-toolchain.cmake b/extern/unreal-ios-toolchain.cmake index 2d4d965ff..886a7a45c 100644 --- a/extern/unreal-ios-toolchain.cmake +++ b/extern/unreal-ios-toolchain.cmake @@ -2,4 +2,5 @@ set(CMAKE_SYSTEM_NAME iOS) set(CMAKE_OSX_ARCHITECTURES arm64) set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_MACOSX_BUNDLE YES) +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11") set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO) From 9ad06dacc8c4c8f3958f0d54f810707d930c8668 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 8 Mar 2023 23:54:58 -0500 Subject: [PATCH 36/80] undo rearanging order of cmake args --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index f937b5d1a..387d9a902 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit f937b5d1a0a8ec5fd75e72888f19473f4e0668b5 +Subproject commit 387d9a902e1f3f863f62d2663eaf7e22bd04f271 From 9ae7d006f29095c3c33b675dbbda543fde9d6ace Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 01:05:18 -0500 Subject: [PATCH 37/80] test whether empty strings in the configure command is breaking everything --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 387d9a902..6fb592814 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 387d9a902e1f3f863f62d2663eaf7e22bd04f271 +Subproject commit 6fb592814ebb5d929ad6aca44af0ab7f9e3e1ced From b5e9160911b8d76740de6defeead2ace9bc3c0b2 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 01:56:43 -0500 Subject: [PATCH 38/80] test whether variables set in toolchain are ignored --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 838f0636d..2eeff9cdb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -134,7 +134,7 @@ jobs: - export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION} - cd extern - mkdir build-ios - - cmake -B build-ios -S . -GXcode -DCMAKE_TOOLCHAIN_FILE="unreal-ios-toolchain.cmake" -DCMAKE_BUILD_TYPE=Release + - cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE="unreal-ios-toolchain.cmake" -DCMAKE_BUILD_TYPE=Release - cd .. script: - cd extern From ad506e200e7234016a0ea250d8b0f1fb09dba536 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 02:40:56 -0500 Subject: [PATCH 39/80] test whether setting CMAKE_SYSTEM_PROCESSOR makes a difference --- .travis.yml | 2 +- extern/cesium-native | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2eeff9cdb..bf573a9ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -134,7 +134,7 @@ jobs: - export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION} - cd extern - mkdir build-ios - - cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_TOOLCHAIN_FILE="unreal-ios-toolchain.cmake" -DCMAKE_BUILD_TYPE=Release + - cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_TOOLCHAIN_FILE="unreal-ios-toolchain.cmake" -DCMAKE_BUILD_TYPE=Release - cd .. script: - cd extern diff --git a/extern/cesium-native b/extern/cesium-native index 6fb592814..b5a0cbc04 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 6fb592814ebb5d929ad6aca44af0ab7f9e3e1ced +Subproject commit b5a0cbc04af7fab703ebcb3ba9fe5af2bb181376 From 8533da9de1598cee7b27adf3a3ff1c008ce2b16b Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 04:34:45 -0500 Subject: [PATCH 40/80] revert to something to an error i can fix --- .travis.yml | 2 +- extern/cesium-native | 2 +- extern/unreal-ios-toolchain.cmake | 6 ++---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index bf573a9ef..78479790e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -134,7 +134,7 @@ jobs: - export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION} - cd extern - mkdir build-ios - - cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DCMAKE_TOOLCHAIN_FILE="unreal-ios-toolchain.cmake" -DCMAKE_BUILD_TYPE=Release + - cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release - cd .. script: - cd extern diff --git a/extern/cesium-native b/extern/cesium-native index b5a0cbc04..9e598bda3 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit b5a0cbc04af7fab703ebcb3ba9fe5af2bb181376 +Subproject commit 9e598bda38e7e744acbad088c59d1056420aa188 diff --git a/extern/unreal-ios-toolchain.cmake b/extern/unreal-ios-toolchain.cmake index 886a7a45c..524c89e17 100644 --- a/extern/unreal-ios-toolchain.cmake +++ b/extern/unreal-ios-toolchain.cmake @@ -1,6 +1,4 @@ +set(GENERATOR Xcode) set(CMAKE_SYSTEM_NAME iOS) set(CMAKE_OSX_ARCHITECTURES arm64) -set(CMAKE_POSITION_INDEPENDENT_CODE ON) -set(CMAKE_MACOSX_BUNDLE YES) -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11") -set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) \ No newline at end of file From 2e47523f80855361522529d58def866704ff5f19 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 06:25:37 -0500 Subject: [PATCH 41/80] use newer version of cmake for ios build --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index 78479790e..a875d747e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -129,6 +129,10 @@ jobs: - pushd nasm-2.14.02 && ./configure --prefix=/usr/local && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" + addons: + homebrew: + packages: + - cmake before_script: - export CESIUM_UNREAL_VERSION=$(git describe) - export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION} From 51425fe4eb084f525cd8c63f59a8cf30cf9f5955 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 06:41:22 -0500 Subject: [PATCH 42/80] update brew --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index a875d747e..656685239 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,11 +133,13 @@ jobs: homebrew: packages: - cmake + update: true before_script: - export CESIUM_UNREAL_VERSION=$(git describe) - export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION} - cd extern - mkdir build-ios + - cmake --version - cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release - cd .. script: From fe192e6f5e2b35581531f022d8f42794cce12215 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 11:01:11 -0500 Subject: [PATCH 43/80] use newer xcode --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 656685239..3044d985e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -118,7 +118,7 @@ jobs: - export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000) - name: iOS 4.27 os: osx - osx_image: xcode11.3 + osx_image: xcode12.2 install: - python -m pip install --upgrade pip - pip3 install --upgrade pip @@ -129,11 +129,6 @@ jobs: - pushd nasm-2.14.02 && ./configure --prefix=/usr/local && make && sudo make install && popd - chmod +x "./travis/travis-get-ue-427.sh" - "./travis/travis-get-ue-427.sh &" - addons: - homebrew: - packages: - - cmake - update: true before_script: - export CESIUM_UNREAL_VERSION=$(git describe) - export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION} From da4b26bb82f6ca89adf4f03bd404f602e57cb3d3 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 12:10:03 -0500 Subject: [PATCH 44/80] use xcode 12.3 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3044d985e..dc6ce1802 100644 --- a/.travis.yml +++ b/.travis.yml @@ -118,7 +118,7 @@ jobs: - export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000) - name: iOS 4.27 os: osx - osx_image: xcode12.2 + osx_image: xcode12.3 install: - python -m pip install --upgrade pip - pip3 install --upgrade pip From cb6c7465f3638fa6538496b474c737131f1f4138 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 12:29:31 -0500 Subject: [PATCH 45/80] try newer version of xcode --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dc6ce1802..d9f2c7d3f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -118,7 +118,7 @@ jobs: - export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000) - name: iOS 4.27 os: osx - osx_image: xcode12.3 + osx_image: xcode14.2 install: - python -m pip install --upgrade pip - pip3 install --upgrade pip From 5d4a1030466f4d223764480f63ccb37348f6b37d Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 13:17:45 -0500 Subject: [PATCH 46/80] abandon trying to install component --- .travis.yml | 4 ++-- extern/cesium-native | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d9f2c7d3f..8ea3dc948 100644 --- a/.travis.yml +++ b/.travis.yml @@ -117,8 +117,8 @@ jobs: - aws s3 cp ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip s3://builds-cesium-unreal/ - export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000) - name: iOS 4.27 - os: osx - osx_image: xcode14.2 + os: os + osx_image: xcode11.3 install: - python -m pip install --upgrade pip - pip3 install --upgrade pip diff --git a/extern/cesium-native b/extern/cesium-native index 9e598bda3..befa8df2a 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 9e598bda38e7e744acbad088c59d1056420aa188 +Subproject commit befa8df2a3a5e9ff66ba5847f534cacf6549a3f4 From e22c74cabdf6aa89d32e71755512daa2a8919f96 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 13:36:15 -0500 Subject: [PATCH 47/80] fix travis file --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8ea3dc948..78479790e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -117,7 +117,7 @@ jobs: - aws s3 cp ${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip s3://builds-cesium-unreal/ - export PACKAGE_LINK=$(aws --region us-east-1 s3 presign s3://builds-cesium-unreal/${BUILD_CESIUM_UNREAL_PACKAGE_NAME}.zip --expires-in 315360000) - name: iOS 4.27 - os: os + os: osx osx_image: xcode11.3 install: - python -m pip install --upgrade pip @@ -134,7 +134,6 @@ jobs: - export BUILD_CESIUM_UNREAL_PACKAGE_NAME=CesiumForUnreal-427-ios-${CESIUM_UNREAL_VERSION} - cd extern - mkdir build-ios - - cmake --version - cmake -B build-ios -S . -GXcode -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_ARCHITECTURES=arm64 -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Release - cd .. script: From d4726f679afe20b3515f68132e093b3a59790826 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 14:18:54 -0500 Subject: [PATCH 48/80] pass system name --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index befa8df2a..55c5ad1d7 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit befa8df2a3a5e9ff66ba5847f534cacf6549a3f4 +Subproject commit 55c5ad1d79a55c487820a045994d66be20ab3e77 From 6b2108e28df44ed4c07d6ee92206c6885ced620a Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 15:01:53 -0500 Subject: [PATCH 49/80] revert to cmake list that worked --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 55c5ad1d7..07a1eb794 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 55c5ad1d79a55c487820a045994d66be20ab3e77 +Subproject commit 07a1eb7941611cb8b4aefe0712bd27d2d9025ae9 From bdb513b25e9f4cda008f9f4d1099be00b8264946 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 9 Mar 2023 15:12:22 -0500 Subject: [PATCH 50/80] fix library name --- Source/CesiumRuntime/CesiumRuntime.Build.cs | 5 +++-- extern/cesium-native | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/CesiumRuntime/CesiumRuntime.Build.cs b/Source/CesiumRuntime/CesiumRuntime.Build.cs index 12ec9d1a2..0246c902b 100644 --- a/Source/CesiumRuntime/CesiumRuntime.Build.cs +++ b/Source/CesiumRuntime/CesiumRuntime.Build.cs @@ -91,6 +91,7 @@ public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target) "spdlog", "sqlite3", "tinyxml2", + "turbojpeg", "uriparser", "webpdecoder", "ktx_read", @@ -105,11 +106,11 @@ public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target) if (Target.Platform == UnrealTargetPlatform.Win64) { - libs = libs.Concat(new string[] { "tidy_static", "turbojpeg-static" }).ToArray(); + libs = libs.Concat(new string[] { "tidy_static" }).ToArray(); } else { - libs = libs.Concat(new string[] { "tidy", "turbojpeg" }).ToArray(); + libs = libs.Concat(new string[] { "tidy" }).ToArray(); } if (preferDebug) diff --git a/extern/cesium-native b/extern/cesium-native index 07a1eb794..4e97b7440 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 07a1eb7941611cb8b4aefe0712bd27d2d9025ae9 +Subproject commit 4e97b7440654f3aa6e9138891951cde294be4255 From 43ca86cf620f5c1af8056b22211223fa857f2bd1 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 13 Mar 2023 18:18:01 +1100 Subject: [PATCH 51/80] Add a note about nasm. --- Documentation/developer-setup-windows.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/developer-setup-windows.md b/Documentation/developer-setup-windows.md index bbcae9558..ff8d0e12d 100644 --- a/Documentation/developer-setup-windows.md +++ b/Documentation/developer-setup-windows.md @@ -4,6 +4,7 @@ Detailed instructions for setting up a Cesium for Unreal development environment - Install CMake (version 3.15 or newer) from https://cmake.org/install/ - Install Visual Studio 2017 v15.6+ or Visual Studio 2019 v16.5+. +- For best JPEG-decoding performance, you must have [nasm](https://www.nasm.us/) installed so that CMake can find it. Everything will work fine without it, just slower. - Install the Unreal Engine (version 4.26 or newer) from https://www.unrealengine.com/en-US/download ## For Cross Compiling Android on Windows From 4d2a06ae3a585e640d157c57759dba504ab994ff Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 13 Mar 2023 18:18:38 +1100 Subject: [PATCH 52/80] Add nasm prereq for macOS, too. --- Documentation/developer-setup-osx.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/developer-setup-osx.md b/Documentation/developer-setup-osx.md index 342202bbb..9dfe7a548 100644 --- a/Documentation/developer-setup-osx.md +++ b/Documentation/developer-setup-osx.md @@ -4,6 +4,7 @@ Detailed instructions for setting up a Cesium for Unreal development environment - Install CMake (version 3.15 or newer) from https://cmake.org/install/ - Install Xcode 11.3 from https://developer.apple.com/xcode/resources/ +- For best JPEG-decoding performance, you must have [nasm](https://www.nasm.us/) installed so that CMake can find it. Everything will work fine without it, just slower. - Install the Unreal Engine (version 4.26 or newer) from https://www.unrealengine.com/en-US/download # Cloning the git repos From 7c1a295afb839d9e74b2dd78ef3824985a209076 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 13 Mar 2023 18:19:07 +1100 Subject: [PATCH 53/80] Add nasm to Linux instructions. --- Documentation/developer-setup-linux.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/developer-setup-linux.md b/Documentation/developer-setup-linux.md index 0ff19ac75..36ce7eac9 100644 --- a/Documentation/developer-setup-linux.md +++ b/Documentation/developer-setup-linux.md @@ -3,6 +3,7 @@ Detailed instructions for setting up a Cesium for Unreal development environment # Prerequisities - Install CMake (version 3.15 or newer) from https://cmake.org/install/ +- For best JPEG-decoding performance, you must have [nasm](https://www.nasm.us/) installed so that CMake can find it. Everything will work fine without it, just slower. - Build Unreal Engine for Linux by following the [Linux Quickstart](https://docs.unrealengine.com/en-US/SharingAndReleasing/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html) After compiling Unreal Engine, set the following environment variables in your `.bashrc`. From 27db075154cfe0562dfbad19ac6b10aa5fcfe990 Mon Sep 17 00:00:00 2001 From: Project PLATEAU <79615787+Project-PLATEAU@users.noreply.github.com> Date: Tue, 14 Mar 2023 11:15:47 +0900 Subject: [PATCH 54/80] Put navigation collision generation behind a feature flag --- Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 7 ++++++- Source/CesiumRuntime/Public/CesiumRuntimeSettings.h | 9 +++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 76aff5383..ec5f0702a 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -26,6 +26,7 @@ #include "CesiumMaterialUserData.h" #include "CesiumRasterOverlays.h" #include "CesiumRuntime.h" +#include "CesiumRuntimeSettings.h" #include "CesiumTextureUtility.h" #include "CesiumTransforms.h" #include "CesiumUtility/Tracing.h" @@ -2104,7 +2105,11 @@ static void loadPrimitiveGameThreadPart( #endif pStaticMesh->CreateBodySetup(); - pStaticMesh->CreateNavCollision(true); + UCesiumRuntimeSettings* pSettings = + GetMutableDefault(); + if (pSettings && pSettings->EnableExperimentalCreateNavCollisionFeature) { + pStaticMesh->CreateNavCollision(true); + } UBodySetup* pBodySetup = pMesh->GetBodySetup(); diff --git a/Source/CesiumRuntime/Public/CesiumRuntimeSettings.h b/Source/CesiumRuntime/Public/CesiumRuntimeSettings.h index ecd190ace..0f898bc83 100644 --- a/Source/CesiumRuntime/Public/CesiumRuntimeSettings.h +++ b/Source/CesiumRuntime/Public/CesiumRuntimeSettings.h @@ -52,4 +52,13 @@ class CESIUMRUNTIME_API UCesiumRuntimeSettings : public UDeveloperSettings { */ UPROPERTY(Config, EditAnywhere, Category = "Experimental Feature Flags") bool EnableExperimentalOcclusionCullingFeature = false; + + /** + * Creates collisions for navigation when a 3D Tiles tileset is loaded. + * It is recommended to set "Runtime Generation" to "Static" in the + * navigation mesh settings in the project settings, as collision + * calculations become very slow when enabled. + */ + UPROPERTY(Config, EditAnywhere, Category = "Experimental Feature Flags") + bool EnableExperimentalCreateNavCollisionFeature = false; }; From 2ae9dd048cb878712bc8beafeb831cb40164aeeb Mon Sep 17 00:00:00 2001 From: Giovanni Vindiola Date: Tue, 14 Mar 2023 02:29:31 -0700 Subject: [PATCH 55/80] adds the BlueprintReadWrite property specifier to GlobeAwareDefaultPawn FlyTo variables --- Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h b/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h index 511e75258..95d6faf6d 100644 --- a/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h +++ b/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h @@ -78,7 +78,7 @@ class CESIUMRUNTIME_API AGlobeAwareDefaultPawn : public ADefaultPawn { * 1 range on both axes. The {@see FlyToMaximumAltitudeCurve} dictates the * actual max altitude at each point along the curve. */ - UPROPERTY(EditAnywhere, Category = "Cesium") + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") UCurveFloat* FlyToAltitudeProfileCurve; /** @@ -86,7 +86,7 @@ class CESIUMRUNTIME_API AGlobeAwareDefaultPawn : public ADefaultPawn { * curves. This allows us to accelerate and deaccelerate as wanted throughout * the curve. */ - UPROPERTY(EditAnywhere, Category = "Cesium") + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") UCurveFloat* FlyToProgressCurve; /** @@ -94,20 +94,20 @@ class CESIUMRUNTIME_API AGlobeAwareDefaultPawn : public ADefaultPawn { * This can be used in conjunction with the {@see FlyToAltitudeProfileCurve} * to allow the pawn to take some altitude during the flight. */ - UPROPERTY(EditAnywhere, Category = "Cesium") + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium") UCurveFloat* FlyToMaximumAltitudeCurve; /** * The length in seconds that the flight should last. */ - UPROPERTY(EditAnywhere, Category = "Cesium", meta = (ClampMin = 0.0)) + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium", meta = (ClampMin = 0.0)) double FlyToDuration = 5.0; /** * The granularity in degrees with which keypoints should be generated for * the flight interpolation. */ - UPROPERTY(EditAnywhere, Category = "Cesium", meta = (ClampMin = 0.0)) + UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium", meta = (ClampMin = 0.0)) double FlyToGranularityDegrees = 0.01; /** From cb547e316e5752132f05dfa4f6202ac9b45a7f59 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 14 Mar 2023 22:00:38 +1100 Subject: [PATCH 56/80] Update CHANGES.md --- CHANGES.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index 71de6ded9..c57808a20 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Change Log +### ? - ? + +##### Additions :tada: + +- The `FlyToAltitudeProfileCurve`, `FlyToProgressCurve`, `FlyToMaximumAltitudeCurve`, `FlyToDuration`, and `FlyToGranularityDegrees` properties of `GlobeAwareDefaultPawn` / `DynamicPawn` may now be read and written from Blueprints. + ### v1.23.0 - 2023-03-01 ##### Additions :tada: From e0794a7d6f4bfa116e069548ca45f935b2c35abf Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 14 Mar 2023 22:41:53 +1100 Subject: [PATCH 57/80] Formatting. --- Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h b/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h index 95d6faf6d..bb27c308d 100644 --- a/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h +++ b/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h @@ -100,14 +100,22 @@ class CESIUMRUNTIME_API AGlobeAwareDefaultPawn : public ADefaultPawn { /** * The length in seconds that the flight should last. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium", meta = (ClampMin = 0.0)) + UPROPERTY( + EditAnywhere, + BlueprintReadWrite, + Category = "Cesium", + meta = (ClampMin = 0.0)) double FlyToDuration = 5.0; /** * The granularity in degrees with which keypoints should be generated for * the flight interpolation. */ - UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Cesium", meta = (ClampMin = 0.0)) + UPROPERTY( + EditAnywhere, + BlueprintReadWrite, + Category = "Cesium", + meta = (ClampMin = 0.0)) double FlyToGranularityDegrees = 0.01; /** From 2684bebd0978885f8546ce58878d4782102b073d Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 14 Mar 2023 23:20:10 +1100 Subject: [PATCH 58/80] Fix errors caused by blueprint-accessible doubles. --- .../Private/GlobeAwareDefaultPawn.cpp | 14 +++++++++----- .../CesiumRuntime/Public/GlobeAwareDefaultPawn.h | 4 ++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp b/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp index aa93b7158..49f76459b 100644 --- a/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp +++ b/Source/CesiumRuntime/Private/GlobeAwareDefaultPawn.cpp @@ -107,7 +107,9 @@ void AGlobeAwareDefaultPawn::FlyToLocationECEF( double flyTotalAngle = glm::angle(flyQuat); glm::dvec3 flyRotationAxis = glm::axis(flyQuat); int steps = glm::max( - int(flyTotalAngle / glm::radians(this->FlyToGranularityDegrees)) - 1, + int(flyTotalAngle / + glm::radians(static_cast(this->FlyToGranularityDegrees))) - + 1, 0); this->_keypoints.clear(); this->_currentFlyTime = 0.0; @@ -153,8 +155,9 @@ void AGlobeAwareDefaultPawn::FlyToLocationECEF( for (int step = 1; step <= steps; step++) { double percentage = (double)step / (steps + 1); double altitude = glm::mix(sourceAltitude, destinationAltitude, percentage); - double phi = - glm::radians(this->FlyToGranularityDegrees * static_cast(step)); + double phi = glm::radians( + static_cast(this->FlyToGranularityDegrees) * + static_cast(step)); glm::dvec3 rotated = glm::rotate(sourceUpVector, phi, flyRotationAxis); if (auto scaled = ellipsoid.scaleToGeodeticSurface(rotated)) { @@ -265,7 +268,7 @@ void AGlobeAwareDefaultPawn::_handleFlightStep(float DeltaSeconds) { } // If we reached the end, set actual destination location and orientation - if (this->_currentFlyTime >= this->FlyToDuration) { + if (this->_currentFlyTime >= static_cast(this->FlyToDuration)) { const glm::dvec3& finalPoint = _keypoints.back(); this->GlobeAnchor->MoveToECEF(finalPoint); Controller->SetControlRotation(this->_flyToDestinationRotation.Rotator()); @@ -281,7 +284,8 @@ void AGlobeAwareDefaultPawn::_handleFlightStep(float DeltaSeconds) { // We're currently in flight. Interpolate the position and orientation: - double rawPercentage = this->_currentFlyTime / this->FlyToDuration; + double rawPercentage = + this->_currentFlyTime / static_cast(this->FlyToDuration); // In order to accelerate at start and slow down at end, we use a progress // profile curve diff --git a/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h b/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h index bb27c308d..638ed41f8 100644 --- a/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h +++ b/Source/CesiumRuntime/Public/GlobeAwareDefaultPawn.h @@ -105,7 +105,7 @@ class CESIUMRUNTIME_API AGlobeAwareDefaultPawn : public ADefaultPawn { BlueprintReadWrite, Category = "Cesium", meta = (ClampMin = 0.0)) - double FlyToDuration = 5.0; + float FlyToDuration = 5.0f; /** * The granularity in degrees with which keypoints should be generated for @@ -116,7 +116,7 @@ class CESIUMRUNTIME_API AGlobeAwareDefaultPawn : public ADefaultPawn { BlueprintReadWrite, Category = "Cesium", meta = (ClampMin = 0.0)) - double FlyToGranularityDegrees = 0.01; + float FlyToGranularityDegrees = 0.01f; /** * A delegate that will be called whenever the pawn finishes flying From 9f5c4b62ac729d155ec349c13644fadb2a4dd8a4 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Tue, 14 Mar 2023 18:18:15 -0400 Subject: [PATCH 59/80] set metallic to 0 if using khr materials, add option to ignore khr materials --- CHANGES.md | 6 ++++ .../CesiumRuntime/Private/Cesium3DTileset.cpp | 12 ++++++++ .../Private/CesiumGltfComponent.cpp | 30 +++++++++++++++---- .../CesiumRuntime/Private/CreateGltfOptions.h | 1 + Source/CesiumRuntime/Public/Cesium3DTileset.h | 15 ++++++++++ 5 files changed, 59 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 71de6ded9..2a97def41 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,11 @@ # Change Log +### v1.24.0 - 2023-04-01 + +##### Fixes :wrench: + +- Fixed wierd reflection on tilesets with KHR Materials Unlit when the sun is close to the horizon. Added option to ignore KHR Materials Unlit. + ### v1.23.0 - 2023-03-01 ##### Additions :tada: diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index 06a3a4cf6..52233f1f7 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -339,6 +339,14 @@ void ACesium3DTileset::SetEnableWaterMask(bool bEnableMask) { } } +void ACesium3DTileset::SetIgnoreKhrMaterialsUnlit( + bool bIgnoreKhrMaterialsUnlit) { + if (this->IgnoreKhrMaterialsUnlit!= bIgnoreKhrMaterialsUnlit) { + this->IgnoreKhrMaterialsUnlit = bIgnoreKhrMaterialsUnlit; + this->DestroyTileset(); + } +} + void ACesium3DTileset::SetMaterial(UMaterialInterface* InMaterial) { if (this->Material != InMaterial) { this->Material = InMaterial; @@ -648,6 +656,9 @@ class UnrealResourcePreparer options.pPhysXCookingModule = this->_pPhysXCookingModule; #endif + options.ignoreKhrMaterialsUnlit = + this->_pActor->GetIgnoreKhrMaterialsUnlit(); + options.pEncodedMetadataDescription = &this->_pActor->_encodedMetadataDescription; @@ -2033,6 +2044,7 @@ void ACesium3DTileset::PostEditChangeProperty( PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, GenerateSmoothNormals) || PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, EnableWaterMask) || + PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, IgnoreKhrMaterialsUnlit) || PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, Material) || PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, TranslucentMaterial) || diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 7aa7b5141..732422e66 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -779,10 +779,26 @@ static void loadPrimitive( } int materialID = primitive.material; + const Material& material = materialID >= 0 && materialID < model.materials.size() ? model.materials[materialID] : defaultMaterial; + + bool isUnlit = material.hasExtension() && + !options.pMeshOptions->pNodeOptions->pModelOptions + ->ignoreKhrMaterialsUnlit; + if (isUnlit) { + Material& unlitMaterial = const_cast(material); + unlitMaterial.emissiveFactor = {1.0, 1.0, 1.0}; + if (!unlitMaterial.pbrMetallicRoughness) { + unlitMaterial.pbrMetallicRoughness = + std::make_optional(); + } + unlitMaterial.pbrMetallicRoughness->metallicFactor = 0.0; + unlitMaterial.pbrMetallicRoughness->roughnessFactor = 1.0; + } + const MaterialPBRMetallicRoughness& pbrMetallicRoughness = material.pbrMetallicRoughness ? material.pbrMetallicRoughness.value() : defaultPbrMetallicRoughness; @@ -1094,7 +1110,7 @@ static void loadPrimitive( } } } else { - if (material.hasExtension()) { + if (isUnlit) { glm::dvec3 ecefCenter = glm::dvec3( transform * glm::dvec4(VecMath::createVector3D(RenderData->Bounds.Origin), 1.0)); @@ -1913,6 +1929,14 @@ static void loadPrimitiveGameThreadPart( pMesh->SetCustomDepthStencilValue( pGltf->CustomDepthParameters.CustomDepthStencilValue); + + static constexpr std::array emissiveFactor = {1.0, 1.0, 1.0}; + if (loadResult.pMaterial && std::equal( + loadResult.pMaterial->emissiveFactor.begin(), + loadResult.pMaterial->emissiveFactor.end(), + emissiveFactor.begin())) { + pMesh->bCastDynamicShadow = false; + } UStaticMesh* pStaticMesh = NewObject(pMesh, meshName); pMesh->SetStaticMesh(pStaticMesh); @@ -1940,10 +1964,6 @@ static void loadPrimitiveGameThreadPart( material.pbrMetallicRoughness ? material.pbrMetallicRoughness.value() : defaultPbrMetallicRoughness; - if (material.hasExtension()) { - pMesh->bCastDynamicShadow = false; - } - const FName ImportedSlotName( *(TEXT("CesiumMaterial") + FString::FromInt(nextMaterialId++))); diff --git a/Source/CesiumRuntime/Private/CreateGltfOptions.h b/Source/CesiumRuntime/Private/CreateGltfOptions.h index 8a423fc21..8949db19b 100644 --- a/Source/CesiumRuntime/Private/CreateGltfOptions.h +++ b/Source/CesiumRuntime/Private/CreateGltfOptions.h @@ -21,6 +21,7 @@ struct CreateModelOptions { #if PHYSICS_INTERFACE_PHYSX IPhysXCookingModule* pPhysXCookingModule = nullptr; #endif + bool ignoreKhrMaterialsUnlit = false; }; struct CreateNodeOptions { diff --git a/Source/CesiumRuntime/Public/Cesium3DTileset.h b/Source/CesiumRuntime/Public/Cesium3DTileset.h index 4381eacf2..458496281 100644 --- a/Source/CesiumRuntime/Public/Cesium3DTileset.h +++ b/Source/CesiumRuntime/Public/Cesium3DTileset.h @@ -755,6 +755,13 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor { meta = (EditCondition = "PlatformName != TEXT(\"Mac\")")) bool EnableWaterMask = false; + UPROPERTY( + EditAnywhere, + BlueprintGetter = GetIgnoreKhrMaterialsUnlit, + BlueprintSetter = SetIgnoreKhrMaterialsUnlit, + Category = "Cesium|Rendering") + bool IgnoreKhrMaterialsUnlit = false; + /** * A custom Material to use to render opaque elements in this tileset, in * order to implement custom visual effects. @@ -899,6 +906,14 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor { UFUNCTION(BlueprintSetter, Category = "Cesium|Rendering") void SetEnableWaterMask(bool bEnableMask); + UFUNCTION(BlueprintGetter, Category = "Cesium|Rendering") + bool GetIgnoreKhrMaterialsUnlit()const { + return IgnoreKhrMaterialsUnlit; + } + UFUNCTION(BlueprintSetter, Category = "Cesium|Rendering") + void SetIgnoreKhrMaterialsUnlit(bool bIgnoreKhrMaterialsUnlit); + + UFUNCTION(BlueprintGetter, Category = "Cesium|Rendering") UMaterialInterface* GetMaterial() const { return Material; } From 247e6908e30229117eb0b37b14839332c41fe066 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Tue, 14 Mar 2023 18:53:54 -0400 Subject: [PATCH 60/80] run clang format --- Source/CesiumRuntime/Private/Cesium3DTileset.cpp | 5 +++-- Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 1 - Source/CesiumRuntime/Public/Cesium3DTileset.h | 5 +---- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index 52233f1f7..7c523f4e1 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -341,7 +341,7 @@ void ACesium3DTileset::SetEnableWaterMask(bool bEnableMask) { void ACesium3DTileset::SetIgnoreKhrMaterialsUnlit( bool bIgnoreKhrMaterialsUnlit) { - if (this->IgnoreKhrMaterialsUnlit!= bIgnoreKhrMaterialsUnlit) { + if (this->IgnoreKhrMaterialsUnlit != bIgnoreKhrMaterialsUnlit) { this->IgnoreKhrMaterialsUnlit = bIgnoreKhrMaterialsUnlit; this->DestroyTileset(); } @@ -2044,7 +2044,8 @@ void ACesium3DTileset::PostEditChangeProperty( PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, GenerateSmoothNormals) || PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, EnableWaterMask) || - PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, IgnoreKhrMaterialsUnlit) || + PropName == + GET_MEMBER_NAME_CHECKED(ACesium3DTileset, IgnoreKhrMaterialsUnlit) || PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, Material) || PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, TranslucentMaterial) || diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 732422e66..21b28e3ba 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -1929,7 +1929,6 @@ static void loadPrimitiveGameThreadPart( pMesh->SetCustomDepthStencilValue( pGltf->CustomDepthParameters.CustomDepthStencilValue); - static constexpr std::array emissiveFactor = {1.0, 1.0, 1.0}; if (loadResult.pMaterial && std::equal( loadResult.pMaterial->emissiveFactor.begin(), diff --git a/Source/CesiumRuntime/Public/Cesium3DTileset.h b/Source/CesiumRuntime/Public/Cesium3DTileset.h index 458496281..0f71db2f7 100644 --- a/Source/CesiumRuntime/Public/Cesium3DTileset.h +++ b/Source/CesiumRuntime/Public/Cesium3DTileset.h @@ -907,13 +907,10 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor { void SetEnableWaterMask(bool bEnableMask); UFUNCTION(BlueprintGetter, Category = "Cesium|Rendering") - bool GetIgnoreKhrMaterialsUnlit()const { - return IgnoreKhrMaterialsUnlit; - } + bool GetIgnoreKhrMaterialsUnlit() const { return IgnoreKhrMaterialsUnlit; } UFUNCTION(BlueprintSetter, Category = "Cesium|Rendering") void SetIgnoreKhrMaterialsUnlit(bool bIgnoreKhrMaterialsUnlit); - UFUNCTION(BlueprintGetter, Category = "Cesium|Rendering") UMaterialInterface* GetMaterial() const { return Material; } From 9f8585fdc6d92a836ff10b7d58bcd9685466170c Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 15 Mar 2023 06:02:36 -0400 Subject: [PATCH 61/80] switch to add_subdirectory --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 4e97b7440..3b193607c 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 4e97b7440654f3aa6e9138891951cde294be4255 +Subproject commit 3b193607c547ecd0a3cb26ba1b7c24c6ef3ab32b From 0731dd6357c79e084ff504ae2946ff6f5bdcf3aa Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Wed, 15 Mar 2023 22:21:37 -0400 Subject: [PATCH 62/80] go back to external project --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 3b193607c..ee26f34a4 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 3b193607c547ecd0a3cb26ba1b7c24c6ef3ab32b +Subproject commit ee26f34a40375612772e6eda3f4f2142ea1d8c45 From 47b02406c110238b953f81ce73a5ee4fde9339c9 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 16 Mar 2023 12:00:01 -0400 Subject: [PATCH 63/80] revert to checkmark --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index ee26f34a4..fb150dfd1 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit ee26f34a40375612772e6eda3f4f2142ea1d8c45 +Subproject commit fb150dfd1fde8ec74d0395623e67c470d3749be8 From 4b44f48c2b48adcf01df334f7c375ad97e3740dd Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Thu, 16 Mar 2023 13:34:58 -0400 Subject: [PATCH 64/80] revert cmakelist --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index fb150dfd1..c3731b314 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit fb150dfd1fde8ec74d0395623e67c470d3749be8 +Subproject commit c3731b3141f398f1b3d75f96b0f161bb16e6dbee From 17734e6cb0d45654a2bb34a147192c24c2e4aa68 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 20 Mar 2023 15:26:41 -0400 Subject: [PATCH 65/80] add option 'isUnlit' to primitive load result --- .../Private/CesiumGltfComponent.cpp | 26 +++++-------------- Source/CesiumRuntime/Private/LoadGltfResult.h | 2 ++ 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 21b28e3ba..c58a71cb4 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -785,19 +785,9 @@ static void loadPrimitive( ? model.materials[materialID] : defaultMaterial; - bool isUnlit = material.hasExtension() && + primitiveResult.isUnlit = material.hasExtension() && !options.pMeshOptions->pNodeOptions->pModelOptions ->ignoreKhrMaterialsUnlit; - if (isUnlit) { - Material& unlitMaterial = const_cast(material); - unlitMaterial.emissiveFactor = {1.0, 1.0, 1.0}; - if (!unlitMaterial.pbrMetallicRoughness) { - unlitMaterial.pbrMetallicRoughness = - std::make_optional(); - } - unlitMaterial.pbrMetallicRoughness->metallicFactor = 0.0; - unlitMaterial.pbrMetallicRoughness->roughnessFactor = 1.0; - } const MaterialPBRMetallicRoughness& pbrMetallicRoughness = material.pbrMetallicRoughness ? material.pbrMetallicRoughness.value() @@ -1110,7 +1100,7 @@ static void loadPrimitive( } } } else { - if (isUnlit) { + if (primitiveResult.isUnlit) { glm::dvec3 ecefCenter = glm::dvec3( transform * glm::dvec4(VecMath::createVector3D(RenderData->Bounds.Origin), 1.0)); @@ -1663,10 +1653,10 @@ static void SetGltfParameterValues( } pMaterial->SetScalarParameterValueByInfo( FMaterialParameterInfo("metallicFactor", association, index), - static_cast(pbr.metallicFactor)); + static_cast(loadResult.isUnlit ? 0.0f : pbr.metallicFactor)); pMaterial->SetScalarParameterValueByInfo( FMaterialParameterInfo("roughnessFactor", association, index), - static_cast(pbr.roughnessFactor)); + static_cast(loadResult.isUnlit ? 1.0f : pbr.roughnessFactor)); pMaterial->SetScalarParameterValueByInfo( FMaterialParameterInfo("opacityMask", association, index), 1.0f); @@ -1928,14 +1918,10 @@ static void loadPrimitiveGameThreadPart( pGltf->CustomDepthParameters.CustomDepthStencilWriteMask); pMesh->SetCustomDepthStencilValue( pGltf->CustomDepthParameters.CustomDepthStencilValue); - - static constexpr std::array emissiveFactor = {1.0, 1.0, 1.0}; - if (loadResult.pMaterial && std::equal( - loadResult.pMaterial->emissiveFactor.begin(), - loadResult.pMaterial->emissiveFactor.end(), - emissiveFactor.begin())) { + if (loadResult.isUnlit) { pMesh->bCastDynamicShadow = false; } + UStaticMesh* pStaticMesh = NewObject(pMesh, meshName); pMesh->SetStaticMesh(pStaticMesh); diff --git a/Source/CesiumRuntime/Private/LoadGltfResult.h b/Source/CesiumRuntime/Private/LoadGltfResult.h index dccdbee2f..6d4429fd9 100644 --- a/Source/CesiumRuntime/Private/LoadGltfResult.h +++ b/Source/CesiumRuntime/Private/LoadGltfResult.h @@ -65,6 +65,8 @@ struct LoadPrimitiveResult { TUniquePtr waterMaskTexture; std::unordered_map textureCoordinateParameters; + bool isUnlit = false; + bool onlyLand = true; bool onlyWater = false; From 8289ab88079c8337b384a8202f7a88167780f54d Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Mon, 20 Mar 2023 15:28:07 -0400 Subject: [PATCH 66/80] update changes, run format --- CHANGES.md | 2 ++ Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2f4054e13..ce8dcdf59 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,8 @@ ##### Fixes :wrench: - Fixed wierd reflection on tilesets with KHR Materials Unlit when the sun is close to the horizon. Added option to ignore KHR Materials Unlit. +- Fixed unexpected reflection on tilesets with `KHR_materials_unlit` extension when the sun is close to the horizon. +- Added an option to ignore the `KHR_materials_unlit` extension entirely. ### v1.23.0 - 2023-03-01 diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index c58a71cb4..62f24cd7b 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -779,15 +779,15 @@ static void loadPrimitive( } int materialID = primitive.material; - const Material& material = materialID >= 0 && materialID < model.materials.size() ? model.materials[materialID] : defaultMaterial; - primitiveResult.isUnlit = material.hasExtension() && - !options.pMeshOptions->pNodeOptions->pModelOptions - ->ignoreKhrMaterialsUnlit; + primitiveResult.isUnlit = + material.hasExtension() && + !options.pMeshOptions->pNodeOptions->pModelOptions + ->ignoreKhrMaterialsUnlit; const MaterialPBRMetallicRoughness& pbrMetallicRoughness = material.pbrMetallicRoughness ? material.pbrMetallicRoughness.value() From 4e7ec4c3339ead0e80361a1552cb32db5c88e24e Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 21 Mar 2023 22:14:11 +1100 Subject: [PATCH 67/80] Use no-priority-inversion branch of cesium-native. --- .../CesiumRuntime/Private/Cesium3DTileset.cpp | 27 +++++++++---------- .../Private/CesiumGltfComponent.h | 14 +++++----- Source/CesiumRuntime/Public/Cesium3DTileset.h | 5 ++-- extern/cesium-native | 2 +- 4 files changed, 23 insertions(+), 25 deletions(-) diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index 06a3a4cf6..1f3468346 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -76,9 +76,8 @@ ACesium3DTileset::ACesium3DTileset() _pTileset(nullptr), _lastTilesRendered(0), - _lastTilesLoadingLowPriority(0), - _lastTilesLoadingMediumPriority(0), - _lastTilesLoadingHighPriority(0), + _lastWorkerThreadTileLoadQueueLength(0), + _lastMainThreadTileLoadQueueLength(0), _lastTilesVisited(0), _lastTilesCulled(0), @@ -1731,10 +1730,10 @@ void ACesium3DTileset::updateLastViewUpdateResultState( } if (result.tilesToRenderThisFrame.size() != this->_lastTilesRendered || - result.tilesLoadingLowPriority != this->_lastTilesLoadingLowPriority || - result.tilesLoadingMediumPriority != - this->_lastTilesLoadingMediumPriority || - result.tilesLoadingHighPriority != this->_lastTilesLoadingHighPriority || + result.workerThreadTileLoadQueueLength != + this->_lastWorkerThreadTileLoadQueueLength || + result.mainThreadTileLoadQueueLength != + this->_lastMainThreadTileLoadQueueLength || result.tilesVisited != this->_lastTilesVisited || result.culledTilesVisited != this->_lastCulledTilesVisited || result.tilesCulled != this->_lastTilesCulled || @@ -1744,9 +1743,10 @@ void ACesium3DTileset::updateLastViewUpdateResultState( result.maxDepthVisited != this->_lastMaxDepthVisited) { this->_lastTilesRendered = result.tilesToRenderThisFrame.size(); - this->_lastTilesLoadingLowPriority = result.tilesLoadingLowPriority; - this->_lastTilesLoadingMediumPriority = result.tilesLoadingMediumPriority; - this->_lastTilesLoadingHighPriority = result.tilesLoadingHighPriority; + this->_lastWorkerThreadTileLoadQueueLength = + result.workerThreadTileLoadQueueLength; + this->_lastMainThreadTileLoadQueueLength = + result.mainThreadTileLoadQueueLength; this->_lastTilesVisited = result.tilesVisited; this->_lastCulledTilesVisited = result.culledTilesVisited; @@ -1760,7 +1760,7 @@ void ACesium3DTileset::updateLastViewUpdateResultState( LogCesium, Display, TEXT( - "%s: %d ms, Visited %d, Culled Visited %d, Rendered %d, Culled %d, Occluded %d, Waiting For Occlusion Results %d, Max Depth Visited: %d, Loading-Low %d, Loading-Medium %d, Loading-High %d, Loaded tiles %g%%"), + "%s: %d ms, Visited %d, Culled Visited %d, Rendered %d, Culled %d, Occluded %d, Waiting For Occlusion Results %d, Max Depth Visited: %d, Loading-Worker %d, Loading-Main %d, Loaded tiles %g%%"), *this->GetName(), (std::chrono::high_resolution_clock::now() - this->_startTime).count() / 1000000, @@ -1771,9 +1771,8 @@ void ACesium3DTileset::updateLastViewUpdateResultState( result.tilesOccluded, result.tilesWaitingForOcclusionResults, result.maxDepthVisited, - result.tilesLoadingLowPriority, - result.tilesLoadingMediumPriority, - result.tilesLoadingHighPriority, + result.workerThreadTileLoadQueueLength, + result.mainThreadTileLoadQueueLength, this->LoadProgress); } } diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.h b/Source/CesiumRuntime/Private/CesiumGltfComponent.h index df0a4c5af..c4e3c33d9 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.h +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.h @@ -82,20 +82,20 @@ class UCesiumGltfComponent : public USceneComponent { virtual ~UCesiumGltfComponent(); UPROPERTY(EditAnywhere, Category = "Cesium") - UMaterialInterface* BaseMaterial; + UMaterialInterface* BaseMaterial = nullptr; UPROPERTY(EditAnywhere, Category = "Cesium") - UMaterialInterface* BaseMaterialWithTranslucency; + UMaterialInterface* BaseMaterialWithTranslucency = nullptr; UPROPERTY(EditAnywhere, Category = "Cesium") - UMaterialInterface* BaseMaterialWithWater; + UMaterialInterface* BaseMaterialWithWater = nullptr; UPROPERTY(EditAnywhere, Category = "Rendering") - FCustomDepthParameters CustomDepthParameters; + FCustomDepthParameters CustomDepthParameters{}; - FCesiumMetadataModel Metadata; + FCesiumMetadataModel Metadata{}; - CesiumEncodedMetadataUtility::EncodedMetadata EncodedMetadata; + CesiumEncodedMetadataUtility::EncodedMetadata EncodedMetadata{}; void UpdateTransformFromCesium(const glm::dmat4& CesiumToUnrealTransform); @@ -121,5 +121,5 @@ class UCesiumGltfComponent : public USceneComponent { private: UPROPERTY() - UTexture2D* Transparent1x1; + UTexture2D* Transparent1x1 = nullptr; }; diff --git a/Source/CesiumRuntime/Public/Cesium3DTileset.h b/Source/CesiumRuntime/Public/Cesium3DTileset.h index 4381eacf2..5bc84f1a3 100644 --- a/Source/CesiumRuntime/Public/Cesium3DTileset.h +++ b/Source/CesiumRuntime/Public/Cesium3DTileset.h @@ -1075,9 +1075,8 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor { // For debug output uint32_t _lastTilesRendered; - uint32_t _lastTilesLoadingLowPriority; - uint32_t _lastTilesLoadingMediumPriority; - uint32_t _lastTilesLoadingHighPriority; + uint32_t _lastWorkerThreadTileLoadQueueLength; + uint32_t _lastMainThreadTileLoadQueueLength; bool _activeLoading; uint32_t _lastTilesVisited; diff --git a/extern/cesium-native b/extern/cesium-native index c3731b314..799a3b2eb 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit c3731b3141f398f1b3d75f96b0f161bb16e6dbee +Subproject commit 799a3b2eb1891cd942ba8c011c1285171ab4b4e5 From a7579a8b63be4e766e59d31fba2e3589a8b7a1b0 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Wed, 22 Mar 2023 15:49:18 +1100 Subject: [PATCH 68/80] Update native, add probably unnecessary init. --- Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 2 +- extern/cesium-native | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 7aa7b5141..4dabad570 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -103,7 +103,7 @@ void destroyHalfLoadedTexture( } class HalfConstructedReal : public UCesiumGltfComponent::HalfConstructed { public: - LoadModelResult loadModelResult; + LoadModelResult loadModelResult{}; virtual ~HalfConstructedReal() { // TODO: deal with metadata case, when metadata uses async texture creation diff --git a/extern/cesium-native b/extern/cesium-native index 799a3b2eb..f4b7b23af 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 799a3b2eb1891cd942ba8c011c1285171ab4b4e5 +Subproject commit f4b7b23afe0c07398c12b518b0151cac16097b1d From f58a9423285681a55c84af28a663a10c6f5d22b7 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 24 Mar 2023 15:34:37 +1100 Subject: [PATCH 69/80] Improve doc and display name of new property. --- Source/CesiumRuntime/Public/Cesium3DTileset.h | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Source/CesiumRuntime/Public/Cesium3DTileset.h b/Source/CesiumRuntime/Public/Cesium3DTileset.h index cec9c4b75..6493197a7 100644 --- a/Source/CesiumRuntime/Public/Cesium3DTileset.h +++ b/Source/CesiumRuntime/Public/Cesium3DTileset.h @@ -755,11 +755,22 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor { meta = (EditCondition = "PlatformName != TEXT(\"Mac\")")) bool EnableWaterMask = false; + /** + * Whether to ignore the KHR_materials_unlit extension on the glTF tiles in + * this tileset, if it exists, and instead render with standard lighting and + * shadows. This property will have no effect if the tileset does not have any + * tiles that use this extension. + * + * The KHR_materials_unlit extension is often applied to photogrammetry + * tilesets because lighting and shadows are already baked into their + * textures. + */ UPROPERTY( EditAnywhere, BlueprintGetter = GetIgnoreKhrMaterialsUnlit, BlueprintSetter = SetIgnoreKhrMaterialsUnlit, - Category = "Cesium|Rendering") + Category = "Cesium|Rendering", + meta = (DisplayName = "Ignore KHR_materials_unlit")) bool IgnoreKhrMaterialsUnlit = false; /** From 4489266ba18551e90c9e687d3351ba838a6cf7b4 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 24 Mar 2023 15:35:17 +1100 Subject: [PATCH 70/80] Update CHANGES.md --- CHANGES.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index ce8dcdf59..bd9cc3ef5 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,7 +8,8 @@ ##### Fixes :wrench: -- Fixed wierd reflection on tilesets with KHR Materials Unlit when the sun is close to the horizon. Added option to ignore KHR Materials Unlit. +- Fixed unexpected reflection on tilesets with `KHR_materials_unlit` extension when the sun is close to the horizon. +- Added an option to ignore the `KHR_materials_unlit` extension entirely. - Fixed unexpected reflection on tilesets with `KHR_materials_unlit` extension when the sun is close to the horizon. - Added an option to ignore the `KHR_materials_unlit` extension entirely. From 56326efd3d702864262a082f10b611a4c8544550 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 24 Mar 2023 15:36:04 +1100 Subject: [PATCH 71/80] Remove duplicate changelog entries. --- CHANGES.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index bd9cc3ef5..256aebab1 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,8 +8,6 @@ ##### Fixes :wrench: -- Fixed unexpected reflection on tilesets with `KHR_materials_unlit` extension when the sun is close to the horizon. -- Added an option to ignore the `KHR_materials_unlit` extension entirely. - Fixed unexpected reflection on tilesets with `KHR_materials_unlit` extension when the sun is close to the horizon. - Added an option to ignore the `KHR_materials_unlit` extension entirely. From dae22dc3512fd3b3abf48d12745af7bec7ea2b61 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Fri, 24 Mar 2023 15:36:51 +1100 Subject: [PATCH 72/80] Update CHANGES.md --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 256aebab1..bdc9e17bf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,11 +5,11 @@ ##### Additions :tada: - The `FlyToAltitudeProfileCurve`, `FlyToProgressCurve`, `FlyToMaximumAltitudeCurve`, `FlyToDuration`, and `FlyToGranularityDegrees` properties of `GlobeAwareDefaultPawn` / `DynamicPawn` may now be read and written from Blueprints. +- Added an option on `Cesium3DTileset` to ignore the `KHR_materials_unlit` extension entirely and use normal lighting and shadows. ##### Fixes :wrench: - Fixed unexpected reflection on tilesets with `KHR_materials_unlit` extension when the sun is close to the horizon. -- Added an option to ignore the `KHR_materials_unlit` extension entirely. ### v1.23.0 - 2023-03-01 From eb4e2809bdecee4f44d1346e570ff6b2fb365792 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Sat, 25 Mar 2023 22:04:47 -0400 Subject: [PATCH 73/80] add cesium request headers to http request --- .../Private/UnrealAssetAccessor.cpp | 45 ++++++++++++++++--- .../Public/UnrealAssetAccessor.h | 1 + 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp index e8b35bbe2..403384d66 100644 --- a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp +++ b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp @@ -105,6 +105,9 @@ UnrealAssetAccessor::UnrealAssetAccessor() : _userAgent() { version = pCesiumPlugin->GetDescriptor().VersionName; } + const TCHAR* projectName = FApp::GetProjectName(); + FString engine = FEngineVersion::Current().ToString(); + this->_userAgent = TEXT("Mozilla/5.0 ("); this->_userAgent += OsVersion; this->_userAgent += " "; @@ -112,10 +115,20 @@ UnrealAssetAccessor::UnrealAssetAccessor() : _userAgent() { this->_userAgent += TEXT(") Cesium For Unreal/"); this->_userAgent += version; this->_userAgent += TEXT(" (Project "); - this->_userAgent += FApp::GetProjectName(); + this->_userAgent += projectName; this->_userAgent += " Engine "; - this->_userAgent += FEngineVersion::Current().ToString(); + this->_userAgent += engine; this->_userAgent += TEXT(")"); + + this->_cesiumRequestHeaders.insert({"X-Cesium-Client", "Cesium For Unreal"}); + this->_cesiumRequestHeaders.insert( + {"X-Cesium-Client-Version", TCHAR_TO_UTF8(*version)}); + this->_cesiumRequestHeaders.insert( + {"X-Cesium-Client-Project", TCHAR_TO_UTF8(projectName)}); + this->_cesiumRequestHeaders.insert( + {"X-Cesium-Client-Engine", TCHAR_TO_UTF8(*engine)}); + this->_cesiumRequestHeaders.insert( + {"X-Cesium-Client-OS", TCHAR_TO_UTF8(*OsVersion)}); } CesiumAsync::Future> @@ -127,9 +140,11 @@ UnrealAssetAccessor::get( CESIUM_TRACE_BEGIN_IN_TRACK("requestAsset"); const FString& userAgent = this->_userAgent; + const CesiumAsync::HttpHeaders cesiumRequestHeaders = + this->_cesiumRequestHeaders; return asyncSystem.createFuture>( - [&url, &headers, &userAgent](const auto& promise) { + [&url, &headers, &userAgent, &cesiumRequestHeaders](const auto& promise) { FHttpModule& httpModule = FHttpModule::Get(); TSharedRef pRequest = httpModule.CreateRequest(); @@ -141,6 +156,13 @@ UnrealAssetAccessor::get( UTF8_TO_TCHAR(header.second.c_str())); } + for (const CesiumAsync::IAssetAccessor::THeader& header : + cesiumRequestHeaders) { + pRequest->SetHeader( + UTF8_TO_TCHAR(header.first.c_str()), + UTF8_TO_TCHAR(header.second.c_str())); + } + pRequest->AppendToHeader(TEXT("User-Agent"), userAgent); pRequest->OnProcessRequestComplete().BindLambda( @@ -177,10 +199,16 @@ UnrealAssetAccessor::request( const gsl::span& contentPayload) { const FString& userAgent = this->_userAgent; + const CesiumAsync::HttpHeaders cesiumRequestHeaders = + this->_cesiumRequestHeaders; return asyncSystem.createFuture>( - [&verb, &url, &headers, &userAgent, &contentPayload]( - const auto& promise) { + [&verb, + &url, + &headers, + &userAgent, + &cesiumRequestHeaders, + &contentPayload](const auto& promise) { FHttpModule& httpModule = FHttpModule::Get(); TSharedRef pRequest = httpModule.CreateRequest(); @@ -193,6 +221,13 @@ UnrealAssetAccessor::request( UTF8_TO_TCHAR(header.second.c_str())); } + for (const CesiumAsync::IAssetAccessor::THeader& header : + cesiumRequestHeaders) { + pRequest->SetHeader( + UTF8_TO_TCHAR(header.first.c_str()), + UTF8_TO_TCHAR(header.second.c_str())); + } + pRequest->AppendToHeader(TEXT("User-Agent"), userAgent); pRequest->SetContent(TArray( diff --git a/Source/CesiumRuntime/Public/UnrealAssetAccessor.h b/Source/CesiumRuntime/Public/UnrealAssetAccessor.h index c24314bdd..2b519d632 100644 --- a/Source/CesiumRuntime/Public/UnrealAssetAccessor.h +++ b/Source/CesiumRuntime/Public/UnrealAssetAccessor.h @@ -31,4 +31,5 @@ class CESIUMRUNTIME_API UnrealAssetAccessor private: FString _userAgent; + CesiumAsync::HttpHeaders _cesiumRequestHeaders; }; From 0c4240e1ba3201a85d5291455891ffe2bb3b5f7f Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Tue, 28 Mar 2023 20:14:29 +1100 Subject: [PATCH 74/80] Fix compilation on Linux. --- Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp index 403384d66..35a51dfb5 100644 --- a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp +++ b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp @@ -150,14 +150,13 @@ UnrealAssetAccessor::get( httpModule.CreateRequest(); pRequest->SetURL(UTF8_TO_TCHAR(url.c_str())); - for (const CesiumAsync::IAssetAccessor::THeader& header : headers) { + for (const auto& header : headers) { pRequest->SetHeader( UTF8_TO_TCHAR(header.first.c_str()), UTF8_TO_TCHAR(header.second.c_str())); } - for (const CesiumAsync::IAssetAccessor::THeader& header : - cesiumRequestHeaders) { + for (const auto& header : cesiumRequestHeaders) { pRequest->SetHeader( UTF8_TO_TCHAR(header.first.c_str()), UTF8_TO_TCHAR(header.second.c_str())); @@ -215,14 +214,13 @@ UnrealAssetAccessor::request( pRequest->SetVerb(UTF8_TO_TCHAR(verb.c_str())); pRequest->SetURL(UTF8_TO_TCHAR(url.c_str())); - for (const CesiumAsync::IAssetAccessor::THeader& header : headers) { + for (const auto& header : headers) { pRequest->SetHeader( UTF8_TO_TCHAR(header.first.c_str()), UTF8_TO_TCHAR(header.second.c_str())); } - for (const CesiumAsync::IAssetAccessor::THeader& header : - cesiumRequestHeaders) { + for (const auto& header : cesiumRequestHeaders) { pRequest->SetHeader( UTF8_TO_TCHAR(header.first.c_str()), UTF8_TO_TCHAR(header.second.c_str())); From 1e05eeeeb7f860702eb05155b207641955d11ab0 Mon Sep 17 00:00:00 2001 From: Joseph Kaile Date: Tue, 28 Mar 2023 15:58:33 -0400 Subject: [PATCH 75/80] switch from std::string to FString --- .../Private/UnrealAssetAccessor.cpp | 35 ++++++++----------- .../Public/UnrealAssetAccessor.h | 2 +- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp index 35a51dfb5..50592b578 100644 --- a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp +++ b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp @@ -95,6 +95,7 @@ class UnrealAssetRequest : public CesiumAsync::IAssetRequest { UnrealAssetAccessor::UnrealAssetAccessor() : _userAgent() { FString OsVersion, OsSubVersion; FPlatformMisc::GetOSVersions(OsVersion, OsSubVersion); + OsVersion += " " + FPlatformMisc::GetOSVersion(); IPluginManager& PluginManager = IPluginManager::Get(); TSharedPtr pCesiumPlugin = @@ -106,12 +107,10 @@ UnrealAssetAccessor::UnrealAssetAccessor() : _userAgent() { } const TCHAR* projectName = FApp::GetProjectName(); - FString engine = FEngineVersion::Current().ToString(); + FString engine = "Unreal Engine " + FEngineVersion::Current().ToString(); this->_userAgent = TEXT("Mozilla/5.0 ("); this->_userAgent += OsVersion; - this->_userAgent += " "; - this->_userAgent += FPlatformMisc::GetOSVersion(); this->_userAgent += TEXT(") Cesium For Unreal/"); this->_userAgent += version; this->_userAgent += TEXT(" (Project "); @@ -120,15 +119,15 @@ UnrealAssetAccessor::UnrealAssetAccessor() : _userAgent() { this->_userAgent += engine; this->_userAgent += TEXT(")"); - this->_cesiumRequestHeaders.insert({"X-Cesium-Client", "Cesium For Unreal"}); - this->_cesiumRequestHeaders.insert( - {"X-Cesium-Client-Version", TCHAR_TO_UTF8(*version)}); - this->_cesiumRequestHeaders.insert( - {"X-Cesium-Client-Project", TCHAR_TO_UTF8(projectName)}); - this->_cesiumRequestHeaders.insert( - {"X-Cesium-Client-Engine", TCHAR_TO_UTF8(*engine)}); - this->_cesiumRequestHeaders.insert( - {"X-Cesium-Client-OS", TCHAR_TO_UTF8(*OsVersion)}); + this->_cesiumRequestHeaders.Add("X-Cesium-Client", "Cesium For Unreal"); + this->_cesiumRequestHeaders.Add( + "X-Cesium-Client-Version", TCHAR_TO_UTF8(*version)); + this->_cesiumRequestHeaders.Add( + "X-Cesium-Client-Project", TCHAR_TO_UTF8(projectName)); + this->_cesiumRequestHeaders.Add( + "X-Cesium-Client-Engine", TCHAR_TO_UTF8(*engine)); + this->_cesiumRequestHeaders.Add( + "X-Cesium-Client-OS", TCHAR_TO_UTF8(*OsVersion)); } CesiumAsync::Future> @@ -140,7 +139,7 @@ UnrealAssetAccessor::get( CESIUM_TRACE_BEGIN_IN_TRACK("requestAsset"); const FString& userAgent = this->_userAgent; - const CesiumAsync::HttpHeaders cesiumRequestHeaders = + const TMap& cesiumRequestHeaders = this->_cesiumRequestHeaders; return asyncSystem.createFuture>( @@ -157,9 +156,7 @@ UnrealAssetAccessor::get( } for (const auto& header : cesiumRequestHeaders) { - pRequest->SetHeader( - UTF8_TO_TCHAR(header.first.c_str()), - UTF8_TO_TCHAR(header.second.c_str())); + pRequest->SetHeader(header.Key, header.Value); } pRequest->AppendToHeader(TEXT("User-Agent"), userAgent); @@ -198,7 +195,7 @@ UnrealAssetAccessor::request( const gsl::span& contentPayload) { const FString& userAgent = this->_userAgent; - const CesiumAsync::HttpHeaders cesiumRequestHeaders = + const TMap& cesiumRequestHeaders = this->_cesiumRequestHeaders; return asyncSystem.createFuture>( @@ -221,9 +218,7 @@ UnrealAssetAccessor::request( } for (const auto& header : cesiumRequestHeaders) { - pRequest->SetHeader( - UTF8_TO_TCHAR(header.first.c_str()), - UTF8_TO_TCHAR(header.second.c_str())); + pRequest->SetHeader(header.Key, header.Value); } pRequest->AppendToHeader(TEXT("User-Agent"), userAgent); diff --git a/Source/CesiumRuntime/Public/UnrealAssetAccessor.h b/Source/CesiumRuntime/Public/UnrealAssetAccessor.h index 2b519d632..2a5ef49f0 100644 --- a/Source/CesiumRuntime/Public/UnrealAssetAccessor.h +++ b/Source/CesiumRuntime/Public/UnrealAssetAccessor.h @@ -31,5 +31,5 @@ class CESIUMRUNTIME_API UnrealAssetAccessor private: FString _userAgent; - CesiumAsync::HttpHeaders _cesiumRequestHeaders; + TMap _cesiumRequestHeaders; }; From 341e4af62e1c8cbfddf65c850937bf1d77ced0ae Mon Sep 17 00:00:00 2001 From: Project PLATEAU <79615787+Project-PLATEAU@users.noreply.github.com> Date: Wed, 29 Mar 2023 18:41:25 +0900 Subject: [PATCH 76/80] Make the nav mesh generation a per-tileset option --- .../CesiumRuntime/Private/Cesium3DTileset.cpp | 12 ++++++++++- .../Private/CesiumGltfComponent.cpp | 14 ++++++------- .../Private/CesiumGltfComponent.h | 3 ++- Source/CesiumRuntime/Public/Cesium3DTileset.h | 21 +++++++++++++++++++ .../Public/CesiumRuntimeSettings.h | 9 -------- 5 files changed, 41 insertions(+), 18 deletions(-) diff --git a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp index 1ee993301..ec8607cdb 100644 --- a/Source/CesiumRuntime/Private/Cesium3DTileset.cpp +++ b/Source/CesiumRuntime/Private/Cesium3DTileset.cpp @@ -319,6 +319,13 @@ void ACesium3DTileset::SetCreatePhysicsMeshes(bool bCreatePhysicsMeshes) { } } +void ACesium3DTileset::SetCreateNavCollision(bool bCreateNavCollision) { + if (this->CreateNavCollision != bCreateNavCollision) { + this->CreateNavCollision = bCreateNavCollision; + this->DestroyTileset(); + } +} + void ACesium3DTileset::SetAlwaysIncludeTangents(bool bAlwaysIncludeTangents) { if (this->AlwaysIncludeTangents != bAlwaysIncludeTangents) { this->AlwaysIncludeTangents = bAlwaysIncludeTangents; @@ -679,7 +686,8 @@ class UnrealResourcePreparer this->_pActor->GetTranslucentMaterial(), this->_pActor->GetWaterMaterial(), this->_pActor->GetCustomDepthParameters(), - tile.getContentBoundingVolume().value_or(tile.getBoundingVolume())); + tile.getContentBoundingVolume().value_or(tile.getBoundingVolume()), + this->_pActor->GetCreateNavCollision()); } // UE_LOG(LogCesium, VeryVerbose, TEXT("No content for tile")); return nullptr; @@ -2029,6 +2037,8 @@ void ACesium3DTileset::PostEditChangeProperty( GET_MEMBER_NAME_CHECKED(ACesium3DTileset, IonAssetEndpointUrl) || PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, CreatePhysicsMeshes) || + PropName == + GET_MEMBER_NAME_CHECKED(ACesium3DTileset, CreateNavCollision) || PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, AlwaysIncludeTangents) || PropName == diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index ec5f0702a..979dcfbb9 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -26,7 +26,6 @@ #include "CesiumMaterialUserData.h" #include "CesiumRasterOverlays.h" #include "CesiumRuntime.h" -#include "CesiumRuntimeSettings.h" #include "CesiumTextureUtility.h" #include "CesiumTransforms.h" #include "CesiumUtility/Tracing.h" @@ -1882,7 +1881,8 @@ static void loadPrimitiveGameThreadPart( UCesiumGltfComponent* pGltf, LoadPrimitiveResult& loadResult, const glm::dmat4x4& cesiumToUnrealTransform, - const Cesium3DTilesSelection::BoundingVolume& boundingVolume) { + const Cesium3DTilesSelection::BoundingVolume& boundingVolume, + bool createNavCollision) { TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::LoadPrimitive) FName meshName = createSafeName(loadResult.name, ""); @@ -2105,9 +2105,7 @@ static void loadPrimitiveGameThreadPart( #endif pStaticMesh->CreateBodySetup(); - UCesiumRuntimeSettings* pSettings = - GetMutableDefault(); - if (pSettings && pSettings->EnableExperimentalCreateNavCollisionFeature) { + if (createNavCollision) { pStaticMesh->CreateNavCollision(true); } @@ -2157,7 +2155,8 @@ UCesiumGltfComponent::CreateOffGameThread( UMaterialInterface* pBaseTranslucentMaterial, UMaterialInterface* pBaseWaterMaterial, FCustomDepthParameters CustomDepthParameters, - const Cesium3DTilesSelection::BoundingVolume& boundingVolume) { + const Cesium3DTilesSelection::BoundingVolume& boundingVolume, + bool createNavCollision) { TRACE_CPUPROFILER_EVENT_SCOPE(Cesium::LoadModel) @@ -2201,7 +2200,8 @@ UCesiumGltfComponent::CreateOffGameThread( Gltf, primitive, cesiumToUnrealTransform, - boundingVolume); + boundingVolume, + createNavCollision); } } } diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.h b/Source/CesiumRuntime/Private/CesiumGltfComponent.h index df0a4c5af..6ce4f2637 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.h +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.h @@ -76,7 +76,8 @@ class UCesiumGltfComponent : public USceneComponent { UMaterialInterface* BaseTranslucentMaterial, UMaterialInterface* BaseWaterMaterial, FCustomDepthParameters CustomDepthParameters, - const Cesium3DTilesSelection::BoundingVolume& boundingVolume); + const Cesium3DTilesSelection::BoundingVolume& boundingVolume, + bool createNavCollision); UCesiumGltfComponent(); virtual ~UCesiumGltfComponent(); diff --git a/Source/CesiumRuntime/Public/Cesium3DTileset.h b/Source/CesiumRuntime/Public/Cesium3DTileset.h index 4381eacf2..9491a9cc5 100644 --- a/Source/CesiumRuntime/Public/Cesium3DTileset.h +++ b/Source/CesiumRuntime/Public/Cesium3DTileset.h @@ -703,6 +703,21 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor { Category = "Cesium|Physics") bool CreatePhysicsMeshes = true; + /** + * Whether to generate navigation collisions for this tileset. + * + * Enabling this option creates collisions for navigation when a 3D Tiles + * tileset is loaded. It is recommended to set "Runtime Generation" to + * "Static" in the navigation mesh settings in the project settings, as + * collision calculations become very slow. + */ + UPROPERTY( + EditAnywhere, + BlueprintGetter = GetCreateNavCollision, + BlueprintSetter = SetCreateNavCollision, + Category = "Cesium|Navigation") + bool CreateNavCollision = false; + /** * Whether to always generate a correct tangent space basis for tiles that * don't have them. @@ -881,6 +896,12 @@ class CESIUMRUNTIME_API ACesium3DTileset : public AActor { UFUNCTION(BlueprintSetter, Category = "Cesium|Physics") void SetCreatePhysicsMeshes(bool bCreatePhysicsMeshes); + UFUNCTION(BlueprintGetter, Category = "Cesium|Navigation") + bool GetCreateNavCollision() const { return CreateNavCollision; } + + UFUNCTION(BlueprintSetter, Category = "Cesium|Navigation") + void SetCreateNavCollision(bool bCreateNavCollision); + UFUNCTION(BlueprintGetter, Category = "Cesium|Rendering") bool GetAlwaysIncludeTangents() const { return AlwaysIncludeTangents; } diff --git a/Source/CesiumRuntime/Public/CesiumRuntimeSettings.h b/Source/CesiumRuntime/Public/CesiumRuntimeSettings.h index 0f898bc83..ecd190ace 100644 --- a/Source/CesiumRuntime/Public/CesiumRuntimeSettings.h +++ b/Source/CesiumRuntime/Public/CesiumRuntimeSettings.h @@ -52,13 +52,4 @@ class CESIUMRUNTIME_API UCesiumRuntimeSettings : public UDeveloperSettings { */ UPROPERTY(Config, EditAnywhere, Category = "Experimental Feature Flags") bool EnableExperimentalOcclusionCullingFeature = false; - - /** - * Creates collisions for navigation when a 3D Tiles tileset is loaded. - * It is recommended to set "Runtime Generation" to "Static" in the - * navigation mesh settings in the project settings, as collision - * calculations become very slow when enabled. - */ - UPROPERTY(Config, EditAnywhere, Category = "Experimental Feature Flags") - bool EnableExperimentalCreateNavCollisionFeature = false; }; From cc5488656763602a0b5e6d3f8c4c693be2c6a905 Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 30 Mar 2023 14:19:38 +1100 Subject: [PATCH 77/80] Clean up unicode handling. --- .../Private/UnrealAssetAccessor.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp index 50592b578..c62c00825 100644 --- a/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp +++ b/Source/CesiumRuntime/Private/UnrealAssetAccessor.cpp @@ -92,7 +92,8 @@ class UnrealAssetRequest : public CesiumAsync::IAssetRequest { CesiumAsync::HttpHeaders _headers; }; -UnrealAssetAccessor::UnrealAssetAccessor() : _userAgent() { +UnrealAssetAccessor::UnrealAssetAccessor() + : _userAgent(), _cesiumRequestHeaders() { FString OsVersion, OsSubVersion; FPlatformMisc::GetOSVersions(OsVersion, OsSubVersion); OsVersion += " " + FPlatformMisc::GetOSVersion(); @@ -119,15 +120,13 @@ UnrealAssetAccessor::UnrealAssetAccessor() : _userAgent() { this->_userAgent += engine; this->_userAgent += TEXT(")"); - this->_cesiumRequestHeaders.Add("X-Cesium-Client", "Cesium For Unreal"); this->_cesiumRequestHeaders.Add( - "X-Cesium-Client-Version", TCHAR_TO_UTF8(*version)); - this->_cesiumRequestHeaders.Add( - "X-Cesium-Client-Project", TCHAR_TO_UTF8(projectName)); - this->_cesiumRequestHeaders.Add( - "X-Cesium-Client-Engine", TCHAR_TO_UTF8(*engine)); - this->_cesiumRequestHeaders.Add( - "X-Cesium-Client-OS", TCHAR_TO_UTF8(*OsVersion)); + TEXT("X-Cesium-Client"), + TEXT("Cesium For Unreal")); + this->_cesiumRequestHeaders.Add(TEXT("X-Cesium-Client-Version"), version); + this->_cesiumRequestHeaders.Add(TEXT("X-Cesium-Client-Project"), projectName); + this->_cesiumRequestHeaders.Add(TEXT("X-Cesium-Client-Engine"), engine); + this->_cesiumRequestHeaders.Add(TEXT("X-Cesium-Client-OS"), OsVersion); } CesiumAsync::Future> From 424212b8245cb3c9408a10347aaa43248a7f88db Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 30 Mar 2023 14:25:39 +1100 Subject: [PATCH 78/80] Update CHANGES.md. --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index bdc9e17bf..3a93e8c36 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ - The `FlyToAltitudeProfileCurve`, `FlyToProgressCurve`, `FlyToMaximumAltitudeCurve`, `FlyToDuration`, and `FlyToGranularityDegrees` properties of `GlobeAwareDefaultPawn` / `DynamicPawn` may now be read and written from Blueprints. - Added an option on `Cesium3DTileset` to ignore the `KHR_materials_unlit` extension entirely and use normal lighting and shadows. +- Added `CreateNavCollision` property to `Cesium3DTileset`. When enabled, `CreateNavCollision` is called on the static meshes created for tiles. ##### Fixes :wrench: From 4736840ee32bf74fad89a07482a63ec560bbcb9f Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Thu, 30 Mar 2023 14:50:22 +1100 Subject: [PATCH 79/80] Formatting. --- Source/CesiumRuntime/Private/CesiumGltfComponent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp index 5bca896a4..f6bee0ee3 100644 --- a/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp +++ b/Source/CesiumRuntime/Private/CesiumGltfComponent.cpp @@ -2111,7 +2111,7 @@ static void loadPrimitiveGameThreadPart( pStaticMesh->GetRenderData()->ScreenSize[0].Default = 1.0f; #endif pStaticMesh->CreateBodySetup(); - + if (createNavCollision) { pStaticMesh->CreateNavCollision(true); } From e4724cfaef42edf3542467a00136f9f7c7811cba Mon Sep 17 00:00:00 2001 From: Kevin Ring Date: Mon, 3 Apr 2023 14:21:07 +1000 Subject: [PATCH 80/80] Bump version, update CHANGES.md. --- CHANGES.md | 8 ++++++-- CesiumForUnreal.uplugin | 4 ++-- extern/cesium-native | 2 +- package.json | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3a93e8c36..41bcbde32 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,8 @@ # Change Log -### ? - ? +### v1.24.0 - 2023-04-03 + +This will be the _last_ release that supports Unreal Engine v4.27. Future versions will require Unreal Engine v5.0+. ##### Additions :tada: @@ -12,6 +14,8 @@ - Fixed unexpected reflection on tilesets with `KHR_materials_unlit` extension when the sun is close to the horizon. +In addition to the above, this release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.22.0 to v0.23.0. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native. + ### v1.23.0 - 2023-03-01 ##### Additions :tada: @@ -24,7 +28,7 @@ - Vertex buffers created for 3D Tiles are now set to use full-precision UV coordinates, avoiding problems in particular with feature IDs. - Added some missing headers, to avoid compiler errors in non-unity builds. -In addition to the above, this release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.21.3 to v0.22.0. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native. +In addition to the above, this release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.21.3 to v0.22.1. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native. ### v1.22.0 - 2023-02-01 diff --git a/CesiumForUnreal.uplugin b/CesiumForUnreal.uplugin index b3f0fa61a..4b12e4145 100644 --- a/CesiumForUnreal.uplugin +++ b/CesiumForUnreal.uplugin @@ -1,7 +1,7 @@ { "FileVersion": 3, - "Version": 39, - "VersionName": "1.23.0", + "Version": 40, + "VersionName": "1.24.0", "FriendlyName": "Cesium for Unreal", "Description": "Unlock the 3D geospatial ecosystem in Unreal Engine with real-world 3D content and a high accuracy full-scale WGS84 globe.", "Category": "Geospatial", diff --git a/extern/cesium-native b/extern/cesium-native index f4b7b23af..4ae8d794b 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit f4b7b23afe0c07398c12b518b0151cac16097b1d +Subproject commit 4ae8d794bf3edd0d8a45edc712ce59e1fec9d040 diff --git a/package.json b/package.json index 9f57c8644..1cad90ed4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cesium-unreal", - "version": "1.23.0", + "version": "1.24.0", "description": "Cesium for Unreal", "main": "index.js", "directories": {