Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge CesiumGS/cesium-unreal ue4-main branch #4

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
891ec44
Create navigation collision
Project-PLATEAU-Admin Feb 23, 2023
58570c6
wait until the new token is resolved, delete tileset if necessary out…
Feb 23, 2023
234d15d
Switch back to panel promise/future.
kring Feb 28, 2023
13c89af
Merge pull request #1047 from CesiumGS/fix-token-switch
kring Feb 28, 2023
418784e
Update CHANGES.md, bump version to v1.23.0.
kring Feb 28, 2023
5cfa967
Update CHANGES.md.
kring Feb 28, 2023
e3f2197
Update for breaking changes in cesium-native.
kring Mar 1, 2023
11b3a04
Add missing headers for non-unity build.
kring Mar 1, 2023
d7f5940
Update CHANGES.md.
kring Mar 1, 2023
00ca7a0
Merge pull request #1050 from CesiumGS/update-native
kring Mar 1, 2023
685f697
add nasm to ci
Mar 5, 2023
fd3c784
add turbojpeg to list of libraries to load
Mar 5, 2023
57fb534
use libturbojpeg branch of cesium-native
Mar 5, 2023
ce47558
fix getting toolchain file path
Mar 5, 2023
07e6ea1
find another way to get nasm on macos
Mar 5, 2023
2643de3
update cesium-native
Mar 5, 2023
c5dbaab
download and install nasm on osx
Mar 5, 2023
0445bcd
fix macos/ios build
Mar 5, 2023
b880940
add insecure flag to curl
Mar 5, 2023
2d3e98d
build nasm from source
Mar 5, 2023
ba34ec2
use older version of nasm
Mar 5, 2023
ac1dd4f
use older version of nasm
Mar 5, 2023
0aa7f12
use different install prefix as not to replace other nasm
Mar 5, 2023
85aa1c1
download nasm from another source
Mar 5, 2023
7dcd117
use newer version of xcode
Mar 6, 2023
ba06598
use newer xcode version for ios
Mar 6, 2023
dcb0928
Revert "use newer version of xcode"
Mar 6, 2023
e60907c
Revert "use newer xcode version for ios"
Mar 6, 2023
4bc8888
update cesium-native
Mar 6, 2023
05bb851
only test compile as static library
Mar 6, 2023
1d91699
update ios toolchain file
Mar 6, 2023
8c10969
update cesium-native
Mar 8, 2023
7d75608
use newer xcode version to fix ios build
Mar 8, 2023
d99e335
use newer version of xcode
Mar 8, 2023
59cce70
fix macosx build
Mar 8, 2023
c7b06be
build using toolchain file which passed ci
Mar 9, 2023
e339151
dont shadow toolchain variables with empty params from command line
Mar 9, 2023
9ad06da
undo rearanging order of cmake args
Mar 9, 2023
9ae7d00
test whether empty strings in the configure command is breaking every…
Mar 9, 2023
b5e9160
test whether variables set in toolchain are ignored
Mar 9, 2023
ad506e2
test whether setting CMAKE_SYSTEM_PROCESSOR makes a difference
Mar 9, 2023
8533da9
revert to something to an error i can fix
Mar 9, 2023
2e47523
use newer version of cmake for ios build
Mar 9, 2023
51425fe
update brew
Mar 9, 2023
fe192e6
use newer xcode
Mar 9, 2023
da4b26b
use xcode 12.3
Mar 9, 2023
cb6c746
try newer version of xcode
Mar 9, 2023
5d4a103
abandon trying to install component
Mar 9, 2023
e22c74c
fix travis file
Mar 9, 2023
d4726f6
pass system name
Mar 9, 2023
6b2108e
revert to cmake list that worked
Mar 9, 2023
bdb513b
fix library name
Mar 9, 2023
43ca86c
Add a note about nasm.
kring Mar 13, 2023
4d2a06a
Add nasm prereq for macOS, too.
kring Mar 13, 2023
7c1a295
Add nasm to Linux instructions.
kring Mar 13, 2023
27db075
Put navigation collision generation behind a feature flag
Project-PLATEAU-Admin Mar 14, 2023
2ae9dd0
adds the BlueprintReadWrite property specifier to GlobeAwareDefaultPa…
gvindiol Mar 14, 2023
cb547e3
Update CHANGES.md
kring Mar 14, 2023
2eaa532
Merge pull request #1059 from gvindiol/GlobeAwareDefaultPawn-Blueprin…
kring Mar 14, 2023
e0794a7
Formatting.
kring Mar 14, 2023
2684beb
Fix errors caused by blueprint-accessible doubles.
kring Mar 14, 2023
60a3627
Merge pull request #1060 from CesiumGS/blueprint-doubles
kring Mar 14, 2023
9f5c4b6
set metallic to 0 if using khr materials, add option to ignore khr ma…
Mar 14, 2023
e673a6b
Merge branch 'ue4-main' into khr-unlit-remove-metallic
Mar 14, 2023
247e690
run clang format
Mar 14, 2023
9f8585f
switch to add_subdirectory
Mar 15, 2023
0731dd6
go back to external project
Mar 16, 2023
47b0240
revert to checkmark
Mar 16, 2023
4b44f48
revert cmakelist
Mar 16, 2023
e0acf84
Merge pull request #1058 from CesiumGS/libjpeg-turbo
kring Mar 17, 2023
17734e6
add option 'isUnlit' to primitive load result
Mar 20, 2023
8289ab8
update changes, run format
Mar 20, 2023
4e7ec4c
Use no-priority-inversion branch of cesium-native.
kring Mar 21, 2023
a7579a8
Update native, add probably unnecessary init.
kring Mar 22, 2023
69f7077
Merge pull request #1066 from CesiumGS/no-priority-inversion
joseph-kaile Mar 22, 2023
394fb8b
Merge remote-tracking branch 'origin/ue4-main' into khr-unlit-remove-…
kring Mar 24, 2023
f58a942
Improve doc and display name of new property.
kring Mar 24, 2023
4489266
Update CHANGES.md
kring Mar 24, 2023
56326ef
Remove duplicate changelog entries.
kring Mar 24, 2023
dae22dc
Update CHANGES.md
kring Mar 24, 2023
ab48c98
Merge pull request #1061 from CesiumGS/khr-unlit-remove-metallic
kring Mar 24, 2023
eb4e280
add cesium request headers to http request
Mar 26, 2023
0c4240e
Fix compilation on Linux.
kring Mar 28, 2023
1e05eee
switch from std::string to FString
Mar 28, 2023
341e4af
Make the nav mesh generation a per-tileset option
Project-PLATEAU-Admin Mar 29, 2023
cc54886
Clean up unicode handling.
kring Mar 30, 2023
5f998ec
Merge remote-tracking branch 'origin/ue4-main' into create-nav-collision
kring Mar 30, 2023
424212b
Update CHANGES.md.
kring Mar 30, 2023
4736840
Formatting.
kring Mar 30, 2023
1da5efd
Merge pull request #1067 from CesiumGS/cesium-request-headers
kring Mar 30, 2023
cd68081
Merge remote-tracking branch 'origin/create-nav-collision' into ue4-main
kring Mar 30, 2023
e4724cf
Bump version, update CHANGES.md.
kring Apr 3, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -90,6 +92,9 @@ jobs:
- pip3 install --upgrade pip
- pip3 install awscli
- pip3 install httpie
- 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:
Expand Down Expand Up @@ -119,6 +124,9 @@ jobs:
- pip3 install --upgrade pip
- pip3 install awscli
- pip3 install httpie
- 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:
Expand Down Expand Up @@ -153,6 +161,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
Expand Down
28 changes: 27 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
# 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:

- 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:

- 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

- Added support for rendering point clouds (`pnts`).
##### Additions :tada:

- Added support for rendering 3D Tiles point clouds (`pnts`).

##### 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.
- 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.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

Expand Down
4 changes: 2 additions & 2 deletions CesiumForUnreal.uplugin
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 38,
"VersionName": "1.22.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",
Expand Down
1 change: 1 addition & 0 deletions Documentation/developer-setup-linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
1 change: 1 addition & 0 deletions Documentation/developer-setup-osx.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Documentation/developer-setup-windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 6 additions & 1 deletion Source/CesiumEditor/Private/SelectCesiumIonToken.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void SelectCesiumIonToken::createRadioButton(
}

FReply SelectCesiumIonToken::UseOrCreate() {
if (!this->_promise) {
if (!this->_promise || !this->_future) {
return FReply::Handled();
}

Expand Down Expand Up @@ -497,6 +497,11 @@ FReply SelectCesiumIonToken::UseOrCreate() {
pPanel->RequestDestroyWindow();
});

while (!this->_future->isReady()) {
FCesiumEditorModule::ion().getAssetAccessor()->tick();
FCesiumEditorModule::ion().getAsyncSystem().dispatchMainThreadTasks();
}

return FReply::Handled();
}

Expand Down
1 change: 1 addition & 0 deletions Source/CesiumRuntime/CesiumRuntime.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ public CesiumRuntime(ReadOnlyTargetRules Target) : base(Target)
"spdlog",
"sqlite3",
"tinyxml2",
"turbojpeg",
"uriparser",
"webpdecoder",
"ktx_read",
Expand Down
53 changes: 37 additions & 16 deletions Source/CesiumRuntime/Private/Cesium3DTileset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -77,9 +76,8 @@ ACesium3DTileset::ACesium3DTileset()
_pTileset(nullptr),

_lastTilesRendered(0),
_lastTilesLoadingLowPriority(0),
_lastTilesLoadingMediumPriority(0),
_lastTilesLoadingHighPriority(0),
_lastWorkerThreadTileLoadQueueLength(0),
_lastMainThreadTileLoadQueueLength(0),

_lastTilesVisited(0),
_lastTilesCulled(0),
Expand Down Expand Up @@ -319,6 +317,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;
Expand All @@ -340,6 +345,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;
Expand Down Expand Up @@ -649,6 +662,9 @@ class UnrealResourcePreparer
options.pPhysXCookingModule = this->_pPhysXCookingModule;
#endif

options.ignoreKhrMaterialsUnlit =
this->_pActor->GetIgnoreKhrMaterialsUnlit();

options.pEncodedMetadataDescription =
&this->_pActor->_encodedMetadataDescription;

Expand Down Expand Up @@ -679,7 +695,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;
Expand Down Expand Up @@ -1732,10 +1749,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 ||
Expand All @@ -1745,9 +1762,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;
Expand All @@ -1761,7 +1779,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,
Expand All @@ -1772,9 +1790,8 @@ void ACesium3DTileset::updateLastViewUpdateResultState(
result.tilesOccluded,
result.tilesWaitingForOcclusionResults,
result.maxDepthVisited,
result.tilesLoadingLowPriority,
result.tilesLoadingMediumPriority,
result.tilesLoadingHighPriority,
result.workerThreadTileLoadQueueLength,
result.mainThreadTileLoadQueueLength,
this->LoadProgress);
}
}
Expand Down Expand Up @@ -2029,11 +2046,15 @@ 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 ==
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) ||
Expand Down
1 change: 0 additions & 1 deletion Source/CesiumRuntime/Private/CesiumGeoreference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading