Skip to content

Commit 3569b21

Browse files
author
Janine Liu
committed
Merge branch 'ue4-main' into point-attenuation
2 parents 324b80d + e4724cf commit 3569b21

26 files changed

+230
-76
lines changed

.travis.yml

+9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
install:
1818
- choco install 7zip.portable
1919
- choco install python --version 3.9.2
20+
- choco install nasm
2021
- python -m pip install --upgrade pip
2122
- pip3 install --upgrade pip
2223
- pip3 install awscli
@@ -53,6 +54,7 @@ jobs:
5354
- choco install python --version 3.9.2
5455
- choco install wget
5556
- choco install ninja
57+
- choco install nasm
5658
- python -m pip install --upgrade pip
5759
- pip3 install --upgrade pip
5860
- pip3 install awscli
@@ -90,6 +92,9 @@ jobs:
9092
- pip3 install --upgrade pip
9193
- pip3 install awscli
9294
- pip3 install httpie
95+
- wget https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz
96+
- tar -xzvf nasm-2.14.02.tar.xz
97+
- pushd nasm-2.14.02 && ./configure --prefix=/usr/local && make && sudo make install && popd
9398
- chmod +x "./travis/travis-get-ue-427.sh"
9499
- "./travis/travis-get-ue-427.sh &"
95100
before_script:
@@ -119,6 +124,9 @@ jobs:
119124
- pip3 install --upgrade pip
120125
- pip3 install awscli
121126
- pip3 install httpie
127+
- wget https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz
128+
- tar -xzvf nasm-2.14.02.tar.xz
129+
- pushd nasm-2.14.02 && ./configure --prefix=/usr/local && make && sudo make install && popd
122130
- chmod +x "./travis/travis-get-ue-427.sh"
123131
- "./travis/travis-get-ue-427.sh &"
124132
before_script:
@@ -153,6 +161,7 @@ jobs:
153161
- choco install python --version 3.9.2
154162
- choco install wget
155163
- choco install ninja
164+
- choco install nasm
156165
- python -m pip install --upgrade pip
157166
- pip3 install --upgrade pip
158167
- pip3 install awscli

CHANGES.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Change Log
22

3+
### v1.24.0 - 2023-04-03
4+
5+
This will be the _last_ release that supports Unreal Engine v4.27. Future versions will require Unreal Engine v5.0+.
6+
7+
##### Additions :tada:
8+
9+
- The `FlyToAltitudeProfileCurve`, `FlyToProgressCurve`, `FlyToMaximumAltitudeCurve`, `FlyToDuration`, and `FlyToGranularityDegrees` properties of `GlobeAwareDefaultPawn` / `DynamicPawn` may now be read and written from Blueprints.
10+
- Added an option on `Cesium3DTileset` to ignore the `KHR_materials_unlit` extension entirely and use normal lighting and shadows.
11+
- Added `CreateNavCollision` property to `Cesium3DTileset`. When enabled, `CreateNavCollision` is called on the static meshes created for tiles.
12+
13+
##### Fixes :wrench:
14+
15+
- Fixed unexpected reflection on tilesets with `KHR_materials_unlit` extension when the sun is close to the horizon.
16+
17+
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.
18+
319
### v1.23.0 - 2023-03-01
420

521
##### Additions :tada:
@@ -10,8 +26,9 @@
1026

1127
- Fixed bug that caused a crash when changing the project default token with tilesets active in the level.
1228
- Vertex buffers created for 3D Tiles are now set to use full-precision UV coordinates, avoiding problems in particular with feature IDs.
29+
- Added some missing headers, to avoid compiler errors in non-unity builds.
1330

14-
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.
31+
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.
1532

1633
### v1.22.0 - 2023-02-01
1734

CesiumForUnreal.uplugin

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"FileVersion": 3,
3-
"Version": 39,
4-
"VersionName": "1.23.0",
3+
"Version": 40,
4+
"VersionName": "1.24.0",
55
"FriendlyName": "Cesium for Unreal",
66
"Description": "Unlock the 3D geospatial ecosystem in Unreal Engine with real-world 3D content and a high accuracy full-scale WGS84 globe.",
77
"Category": "Geospatial",

Documentation/developer-setup-linux.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Detailed instructions for setting up a Cesium for Unreal development environment
33
# Prerequisities
44

55
- Install CMake (version 3.15 or newer) from https://cmake.org/install/
6+
- 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.
67
- Build Unreal Engine for Linux by following the [Linux Quickstart](https://docs.unrealengine.com/en-US/SharingAndReleasing/Linux/BeginnerLinuxDeveloper/SettingUpAnUnrealWorkflow/index.html)
78

89
After compiling Unreal Engine, set the following environment variables in your `.bashrc`.

Documentation/developer-setup-osx.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Detailed instructions for setting up a Cesium for Unreal development environment
44

55
- Install CMake (version 3.15 or newer) from https://cmake.org/install/
66
- Install Xcode 11.3 from https://developer.apple.com/xcode/resources/
7+
- 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.
78
- Install the Unreal Engine (version 4.26 or newer) from https://www.unrealengine.com/en-US/download
89

910
# Cloning the git repos

Documentation/developer-setup-windows.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Detailed instructions for setting up a Cesium for Unreal development environment
44

55
- Install CMake (version 3.15 or newer) from https://cmake.org/install/
66
- Install Visual Studio 2017 v15.6+ or Visual Studio 2019 v16.5+.
7+
- 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.
78
- Install the Unreal Engine (version 4.26 or newer) from https://www.unrealengine.com/en-US/download
89

910
## For Cross Compiling Android on Windows

Source/CesiumRuntime/CesiumRuntime.Build.cs

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target)
9191
"spdlog",
9292
"sqlite3",
9393
"tinyxml2",
94+
"turbojpeg",
9495
"uriparser",
9596
"webpdecoder",
9697
"ktx_read",

Source/CesiumRuntime/Private/Cesium3DTileset.cpp

+37-16
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "CesiumCustomVersion.h"
2121
#include "CesiumGeospatial/Cartographic.h"
2222
#include "CesiumGeospatial/Ellipsoid.h"
23-
#include "CesiumGeospatial/Transforms.h"
2423
#include "CesiumGltf/ImageCesium.h"
2524
#include "CesiumGltf/Ktx2TranscodeTargets.h"
2625
#include "CesiumGltfComponent.h"
@@ -77,9 +76,8 @@ ACesium3DTileset::ACesium3DTileset()
7776
_pTileset(nullptr),
7877

7978
_lastTilesRendered(0),
80-
_lastTilesLoadingLowPriority(0),
81-
_lastTilesLoadingMediumPriority(0),
82-
_lastTilesLoadingHighPriority(0),
79+
_lastWorkerThreadTileLoadQueueLength(0),
80+
_lastMainThreadTileLoadQueueLength(0),
8381

8482
_lastTilesVisited(0),
8583
_lastTilesCulled(0),
@@ -319,6 +317,13 @@ void ACesium3DTileset::SetCreatePhysicsMeshes(bool bCreatePhysicsMeshes) {
319317
}
320318
}
321319

320+
void ACesium3DTileset::SetCreateNavCollision(bool bCreateNavCollision) {
321+
if (this->CreateNavCollision != bCreateNavCollision) {
322+
this->CreateNavCollision = bCreateNavCollision;
323+
this->DestroyTileset();
324+
}
325+
}
326+
322327
void ACesium3DTileset::SetAlwaysIncludeTangents(bool bAlwaysIncludeTangents) {
323328
if (this->AlwaysIncludeTangents != bAlwaysIncludeTangents) {
324329
this->AlwaysIncludeTangents = bAlwaysIncludeTangents;
@@ -340,6 +345,14 @@ void ACesium3DTileset::SetEnableWaterMask(bool bEnableMask) {
340345
}
341346
}
342347

348+
void ACesium3DTileset::SetIgnoreKhrMaterialsUnlit(
349+
bool bIgnoreKhrMaterialsUnlit) {
350+
if (this->IgnoreKhrMaterialsUnlit != bIgnoreKhrMaterialsUnlit) {
351+
this->IgnoreKhrMaterialsUnlit = bIgnoreKhrMaterialsUnlit;
352+
this->DestroyTileset();
353+
}
354+
}
355+
343356
void ACesium3DTileset::SetMaterial(UMaterialInterface* InMaterial) {
344357
if (this->Material != InMaterial) {
345358
this->Material = InMaterial;
@@ -649,6 +662,9 @@ class UnrealResourcePreparer
649662
options.pPhysXCookingModule = this->_pPhysXCookingModule;
650663
#endif
651664

665+
options.ignoreKhrMaterialsUnlit =
666+
this->_pActor->GetIgnoreKhrMaterialsUnlit();
667+
652668
options.pEncodedMetadataDescription =
653669
&this->_pActor->_encodedMetadataDescription;
654670

@@ -679,7 +695,8 @@ class UnrealResourcePreparer
679695
this->_pActor->GetTranslucentMaterial(),
680696
this->_pActor->GetWaterMaterial(),
681697
this->_pActor->GetCustomDepthParameters(),
682-
tile.getContentBoundingVolume().value_or(tile.getBoundingVolume()));
698+
tile.getContentBoundingVolume().value_or(tile.getBoundingVolume()),
699+
this->_pActor->GetCreateNavCollision());
683700
}
684701
// UE_LOG(LogCesium, VeryVerbose, TEXT("No content for tile"));
685702
return nullptr;
@@ -1732,10 +1749,10 @@ void ACesium3DTileset::updateLastViewUpdateResultState(
17321749
}
17331750

17341751
if (result.tilesToRenderThisFrame.size() != this->_lastTilesRendered ||
1735-
result.tilesLoadingLowPriority != this->_lastTilesLoadingLowPriority ||
1736-
result.tilesLoadingMediumPriority !=
1737-
this->_lastTilesLoadingMediumPriority ||
1738-
result.tilesLoadingHighPriority != this->_lastTilesLoadingHighPriority ||
1752+
result.workerThreadTileLoadQueueLength !=
1753+
this->_lastWorkerThreadTileLoadQueueLength ||
1754+
result.mainThreadTileLoadQueueLength !=
1755+
this->_lastMainThreadTileLoadQueueLength ||
17391756
result.tilesVisited != this->_lastTilesVisited ||
17401757
result.culledTilesVisited != this->_lastCulledTilesVisited ||
17411758
result.tilesCulled != this->_lastTilesCulled ||
@@ -1745,9 +1762,10 @@ void ACesium3DTileset::updateLastViewUpdateResultState(
17451762
result.maxDepthVisited != this->_lastMaxDepthVisited) {
17461763

17471764
this->_lastTilesRendered = result.tilesToRenderThisFrame.size();
1748-
this->_lastTilesLoadingLowPriority = result.tilesLoadingLowPriority;
1749-
this->_lastTilesLoadingMediumPriority = result.tilesLoadingMediumPriority;
1750-
this->_lastTilesLoadingHighPriority = result.tilesLoadingHighPriority;
1765+
this->_lastWorkerThreadTileLoadQueueLength =
1766+
result.workerThreadTileLoadQueueLength;
1767+
this->_lastMainThreadTileLoadQueueLength =
1768+
result.mainThreadTileLoadQueueLength;
17511769

17521770
this->_lastTilesVisited = result.tilesVisited;
17531771
this->_lastCulledTilesVisited = result.culledTilesVisited;
@@ -1761,7 +1779,7 @@ void ACesium3DTileset::updateLastViewUpdateResultState(
17611779
LogCesium,
17621780
Display,
17631781
TEXT(
1764-
"%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%%"),
1782+
"%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%%"),
17651783
*this->GetName(),
17661784
(std::chrono::high_resolution_clock::now() - this->_startTime).count() /
17671785
1000000,
@@ -1772,9 +1790,8 @@ void ACesium3DTileset::updateLastViewUpdateResultState(
17721790
result.tilesOccluded,
17731791
result.tilesWaitingForOcclusionResults,
17741792
result.maxDepthVisited,
1775-
result.tilesLoadingLowPriority,
1776-
result.tilesLoadingMediumPriority,
1777-
result.tilesLoadingHighPriority,
1793+
result.workerThreadTileLoadQueueLength,
1794+
result.mainThreadTileLoadQueueLength,
17781795
this->LoadProgress);
17791796
}
17801797
}
@@ -2029,11 +2046,15 @@ void ACesium3DTileset::PostEditChangeProperty(
20292046
GET_MEMBER_NAME_CHECKED(ACesium3DTileset, IonAssetEndpointUrl) ||
20302047
PropName ==
20312048
GET_MEMBER_NAME_CHECKED(ACesium3DTileset, CreatePhysicsMeshes) ||
2049+
PropName ==
2050+
GET_MEMBER_NAME_CHECKED(ACesium3DTileset, CreateNavCollision) ||
20322051
PropName ==
20332052
GET_MEMBER_NAME_CHECKED(ACesium3DTileset, AlwaysIncludeTangents) ||
20342053
PropName ==
20352054
GET_MEMBER_NAME_CHECKED(ACesium3DTileset, GenerateSmoothNormals) ||
20362055
PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, EnableWaterMask) ||
2056+
PropName ==
2057+
GET_MEMBER_NAME_CHECKED(ACesium3DTileset, IgnoreKhrMaterialsUnlit) ||
20372058
PropName == GET_MEMBER_NAME_CHECKED(ACesium3DTileset, Material) ||
20382059
PropName ==
20392060
GET_MEMBER_NAME_CHECKED(ACesium3DTileset, TranslucentMaterial) ||

Source/CesiumRuntime/Private/CesiumGeoreference.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include "Camera/PlayerCameraManager.h"
55
#include "CesiumActors.h"
66
#include "CesiumCommon.h"
7-
#include "CesiumGeospatial/Transforms.h"
87
#include "CesiumRuntime.h"
98
#include "CesiumTransforms.h"
109
#include "CesiumUtility/Math.h"

0 commit comments

Comments
 (0)