Skip to content

Commit

Permalink
Merge branch 'main' into terrain-query-test
Browse files Browse the repository at this point in the history
  • Loading branch information
csciguy8 committed Jul 8, 2024
2 parents 77693e1 + 0c619da commit 9e5fa97
Show file tree
Hide file tree
Showing 64 changed files with 1,985 additions and 728 deletions.
84 changes: 56 additions & 28 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Cesium for Unreal
on: [push]
on: [push, workflow_dispatch]
jobs:
QuickChecks:
name: "Quick Checks"
Expand All @@ -11,6 +11,25 @@ jobs:
run: |
npm install
npm run format -- --dry-run -Werror
Documentation:
runs-on: ubuntu-latest
steps:
- name: Install Doxygen
run: |
sudo apt install -y doxygen
- name: Check out repository code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Generate Documentation
run: |
doxygen ./Documentation/Doxyfile
- name: Publish Documentation Artifact
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ReferenceDocumentation
path: Documentation/Reference
Windows52:
uses: ./.github/workflows/buildWindows.yml
secrets: inherit
Expand Down Expand Up @@ -86,9 +105,11 @@ jobs:
run: |
export CESIUM_UNREAL_VERSION=$GITHUB_REF_NAME
export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-52-${CESIUM_UNREAL_VERSION}"
export BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME="CesiumForUnreal-52-SourceOnly-${CESIUM_UNREAL_VERSION}"
# Make these available to subsequent steps
echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME" >> $GITHUB_ENV
- name: Download iOS build
uses: actions/download-artifact@v4
with:
Expand All @@ -114,21 +135,22 @@ jobs:
with:
name: CesiumForUnreal-52-windows-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Unreal Marketplace Workaround
run: |
# The UE Marketplace deletes our Intermediates directory and fails to produces new
# intermediates for the Linux platform. The Marketplace team has suggested we copy
# them to the LinuxIntermediate directory instead, as a workaround. Users still have
# to move these files to the correct place manually, though, in order for Linux builds
# to succeed.
mkdir -p combine/CesiumForUnreal/LinuxIntermediate/Build/Linux
cp -r combine/CesiumForUnreal/Intermediate/Build/Linux/* combine/CesiumForUnreal/LinuxIntermediate/Build/Linux
- name: Publish combined package artifact
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}}
path: combine
- name: Publish combined package artifact for the Unreal Marketplace
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME}}
path: |
combine
# These are built by Epic, and including them seems to confuse their process.
!combine/CesiumForUnreal/Binaries/**/*
!combine/CesiumForUnreal/Intermediate/**/*
TestPackage52:
needs: [Combine52]
uses: ./.github/workflows/testPackageOnWindows.yml
Expand Down Expand Up @@ -216,9 +238,11 @@ jobs:
run: |
export CESIUM_UNREAL_VERSION=$GITHUB_REF_NAME
export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-53-${CESIUM_UNREAL_VERSION}"
export BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME="CesiumForUnreal-53-SourceOnly-${CESIUM_UNREAL_VERSION}"
# Make these available to subsequent steps
echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME" >> $GITHUB_ENV
- name: Download iOS build
uses: actions/download-artifact@v4
with:
Expand All @@ -244,21 +268,22 @@ jobs:
with:
name: CesiumForUnreal-53-windows-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Unreal Marketplace Workaround
run: |
# The UE Marketplace deletes our Intermediates directory and fails to produces new
# intermediates for the Linux platform. The Marketplace team has suggested we copy
# them to the LinuxIntermediate directory instead, as a workaround. Users still have
# to move these files to the correct place manually, though, in order for Linux builds
# to succeed.
mkdir -p combine/CesiumForUnreal/LinuxIntermediate/Build/Linux
cp -r combine/CesiumForUnreal/Intermediate/Build/Linux/* combine/CesiumForUnreal/LinuxIntermediate/Build/Linux
- name: Publish combined package artifact
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}}
path: combine
- name: Publish combined package artifact for the Unreal Marketplace
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME}}
path: |
combine
# These are built by Epic, and including them seems to confuse their process.
!combine/CesiumForUnreal/Binaries/**/*
!combine/CesiumForUnreal/Intermediate/**/*
TestPackage53:
needs: [Combine53]
uses: ./.github/workflows/testPackageOnWindows.yml
Expand Down Expand Up @@ -346,9 +371,11 @@ jobs:
run: |
export CESIUM_UNREAL_VERSION=$GITHUB_REF_NAME
export BUILD_CESIUM_UNREAL_PACKAGE_NAME="CesiumForUnreal-54-${CESIUM_UNREAL_VERSION}"
export BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME="CesiumForUnreal-54-SourceOnly-${CESIUM_UNREAL_VERSION}"
# Make these available to subsequent steps
echo "CESIUM_UNREAL_VERSION=$CESIUM_UNREAL_VERSION" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_PACKAGE_NAME" >> $GITHUB_ENV
echo "BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME=$BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME" >> $GITHUB_ENV
- name: Download iOS build
uses: actions/download-artifact@v4
with:
Expand All @@ -374,21 +401,22 @@ jobs:
with:
name: CesiumForUnreal-54-windows-${{ env.CESIUM_UNREAL_VERSION}}
path: combine
- name: Unreal Marketplace Workaround
run: |
# The UE Marketplace deletes our Intermediates directory and fails to produces new
# intermediates for the Linux platform. The Marketplace team has suggested we copy
# them to the LinuxIntermediate directory instead, as a workaround. Users still have
# to move these files to the correct place manually, though, in order for Linux builds
# to succeed.
mkdir -p combine/CesiumForUnreal/LinuxIntermediate/Build/Linux
cp -r combine/CesiumForUnreal/Intermediate/Build/Linux/* combine/CesiumForUnreal/LinuxIntermediate/Build/Linux
- name: Publish combined package artifact
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_CESIUM_UNREAL_PACKAGE_NAME}}
path: combine
- name: Publish combined package artifact for the Unreal Marketplace
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_CESIUM_UNREAL_SOURCE_ONLY_PACKAGE_NAME}}
path: |
combine
# These are built by Epic, and including them seems to confuse their process.
!combine/CesiumForUnreal/Binaries/**/*
!combine/CesiumForUnreal/Intermediate/**/*
TestPackage54:
needs: [Combine54]
uses: ./.github/workflows/testPackageOnWindows.yml
Expand Down
20 changes: 19 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

### ? - ?

##### Additions :tada:
- Cesium for Unreal now supports using non-WGS84 ellipsoids.
- An `UCesiumEllipsoid` asset should be specified on the `Ellipsoid` field of an `ACesiumGeoreference`.
- To create a `UCesiumEllipsoid` asset, right-click in the Content Drawer and select "Data Asset" under "Miscellaneous." Choose "Cesium Ellipsoid" from the menu that appears.

##### Fixes :wrench:

- Removed unnecessary alpha check when selecting translucent base materials.
- Fixed a crash caused by `CesiumSunSky` when no viewport is activated in the Editor.
- Fixed build issues in Unreal 5.4.2 relating to `UStaticMesh` and `glm::toMat4`.

### v2.6.0 - 2024-06-03

##### Breaking Changes :mega:

- Renamed the following properties on `CesiumWebMapTileServiceRasterOverlay`:
Expand All @@ -14,15 +27,20 @@

##### Additions :tada:

- Added support for Instanced 3D Meshes (I3DM) and the glTF `EXT_mesh_gpu_instancing` extension.
- Improved DynamicPawn movement by interpolating to its intended speed. This provides smoother movement over areas with large height variation, e.g., when flying over buildings in a city.
- Improve DynamicPawn movement by adding deceleration. This lets the camera slowly come to a stop after moving, rather than immediately.
- Added `TileWidth` and `TileHeight` properties to `CesiumWebMapTileServiceRasterOverlay`.

##### Fixes :wrench:

- Fixed an issue with pixel dithering artifacts that could appear on tilesets.
- Fixed an issue where DynamicPawn could get stuck after interrupting a flight from `UCesiumFlyToComponent`.
- Fixed a bug where `CesiumTileMapServiceRasterOverlay`, `CesiumWebMapServiceRasterOverlay`, and `CesiumWebMapTileServiceRasterOverlay` would attempt to load empty URLs.
- Fixed a bug that caused some textures shared between multiple glTF primitives to be missing entirely.
- Fixed a bug that caused tilesets to fail to load with the "Experimental Occlusion Culling Feature" enabled.
- Fixed a problem that could cause linker errors when packaging a game using both Cesium for Unreal and the Pixel Streaming plugin in Unreal Engine 5.4.

In addition to the above, this release updates [cesium-native](https://github.com/CesiumGS/cesium-native) from v0.35.0 to v0.36.0. See the [changelog](https://github.com/CesiumGS/cesium-native/blob/main/CHANGES.md) for a complete list of changes in cesium-native.

### v2.5.0 - 2024-05-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": 59,
"VersionName": "2.5.0",
"Version": 60,
"VersionName": "2.6.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
13 changes: 1 addition & 12 deletions Config/FilterPlugin.ini
Original file line number Diff line number Diff line change
@@ -1,20 +1,9 @@
[FilterPlugin]
/Config/FilterPlugin.ini
/Config/Engine.ini
/Config/Editor.ini
/LICENSE
/README.md
/ThirdParty.json
/CHANGES.md
/Shaders/*
/Intermediate/Build/Linux/*
/Binaries/Linux/*
/LinuxIntermediate/Build/Linux/UnrealEditor/Inc/CesiumEditor/UHT/*
/LinuxIntermediate/Build/Linux/UnrealEditor/Inc/CesiumRuntime/UHT/*
/LinuxIntermediate/Build/Linux/UnrealGame/Development/CesiumRuntime/*
/LinuxIntermediate/Build/Linux/UnrealGame/Inc/CesiumRuntime/UHT/*
/LinuxIntermediate/Build/Linux/UnrealGame/Shipping/CesiumRuntime/*
/LinuxIntermediate/Build/Linux/x64/UnrealGame/Development/CesiumRuntime/*
/LinuxIntermediate/Build/Linux/x64/UnrealGame/Shipping/CesiumRuntime/*
/LinuxIntermediate/Build/Linux/B4D820EA/UnrealGame/Development/CesiumRuntime/*
/LinuxIntermediate/Build/Linux/B4D820EA/UnrealGame/Inc/CesiumRuntime/UHT/*
/LinuxIntermediate/Build/Linux/B4D820EA/UnrealGame/Shipping/CesiumRuntime/*
Binary file modified Content/DynamicPawn.uasset
Binary file not shown.
Binary file modified Content/Materials/M_CesiumBaseMaterial.uasset
Binary file not shown.
Binary file added Content/WGS84.uasset
Binary file not shown.
2 changes: 1 addition & 1 deletion Documentation/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PROJECT_BRIEF = "Unlock the 3D geospatial ecosystem in Unreal Engine wi
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.

PROJECT_LOGO = ../Content/Cesium-128x128.png
PROJECT_LOGO = ./Content/Cesium-128x128.png

# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is
Expand Down
103 changes: 70 additions & 33 deletions Source/CesiumEditor/Private/CesiumGlobeAnchorCustomization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "DetailCategoryBuilder.h"
#include "DetailLayoutBuilder.h"
#include "IDetailGroup.h"
#include "Widgets/SToolTip.h"

FName FCesiumGlobeAnchorCustomization::RegisteredLayoutName;

Expand Down Expand Up @@ -201,32 +202,63 @@ void UCesiumGlobeAnchorDerivedProperties::PostEditChangeProperty(
this->GlobeAnchor->Modify();
this->GlobeAnchor->MoveToEarthCenteredEarthFixedPosition(
FVector(this->X, this->Y, this->Z));
} else if (
propertyName == GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Longitude) ||
propertyName == GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Latitude) ||
propertyName == GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Height)) {
this->GlobeAnchor->Modify();
this->GlobeAnchor->MoveToLongitudeLatitudeHeight(
FVector(this->Longitude, this->Latitude, this->Height));
} else if (
propertyName ==
GET_MEMBER_NAME_CHECKED(UCesiumGlobeAnchorDerivedProperties, Pitch) ||
propertyName ==
GET_MEMBER_NAME_CHECKED(UCesiumGlobeAnchorDerivedProperties, Yaw) ||
propertyName ==
GET_MEMBER_NAME_CHECKED(UCesiumGlobeAnchorDerivedProperties, Roll)) {
this->GlobeAnchor->Modify();
this->GlobeAnchor->SetEastSouthUpRotation(
FRotator(this->Pitch, this->Yaw, this->Roll).Quaternion());
} else if (true) {
if (propertyName == GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Longitude) ||
propertyName == GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Latitude) ||
propertyName == GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Height)) {
this->GlobeAnchor->Modify();
this->GlobeAnchor->MoveToLongitudeLatitudeHeight(
FVector(this->Longitude, this->Latitude, this->Height));
} else if (
propertyName == GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Pitch) ||
propertyName ==
GET_MEMBER_NAME_CHECKED(UCesiumGlobeAnchorDerivedProperties, Yaw) ||
propertyName == GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Roll)) {
this->GlobeAnchor->Modify();
this->GlobeAnchor->SetEastSouthUpRotation(
FRotator(this->Pitch, this->Yaw, this->Roll).Quaternion());
}
}
}

bool UCesiumGlobeAnchorDerivedProperties::CanEditChange(
const FProperty* InProperty) const {
const FName Name = InProperty->GetFName();

// Valid georeference, nothing to disable
if (IsValid(this->GlobeAnchor->ResolveGeoreference())) {
return true;
}

return Name != GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Longitude) &&
Name != GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Latitude) &&
Name != GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Height) &&
Name != GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Pitch) &&
Name != GET_MEMBER_NAME_CHECKED(
UCesiumGlobeAnchorDerivedProperties,
Yaw) &&
Name !=
GET_MEMBER_NAME_CHECKED(UCesiumGlobeAnchorDerivedProperties, Roll);
}

void UCesiumGlobeAnchorDerivedProperties::Initialize(
UCesiumGlobeAnchorComponent* GlobeAnchorComponent) {
this->GlobeAnchor = GlobeAnchorComponent;
Expand All @@ -240,16 +272,21 @@ void UCesiumGlobeAnchorDerivedProperties::Tick(float DeltaTime) {
this->Y = position.Y;
this->Z = position.Z;

FVector llh = this->GlobeAnchor->GetLongitudeLatitudeHeight();
this->Longitude = llh.X;
this->Latitude = llh.Y;
this->Height = llh.Z;

FQuat rotation = this->GlobeAnchor->GetEastSouthUpRotation();
FRotator rotator = rotation.Rotator();
this->Roll = rotator.Roll;
this->Pitch = rotator.Pitch;
this->Yaw = rotator.Yaw;
// We can't transform the GlobeAnchor's ECEF coordinates back to
// cartographic & rotation without a valid georeference to know what
// ellipsoid to use.
if (IsValid(this->GlobeAnchor->ResolveGeoreference())) {
FVector llh = this->GlobeAnchor->GetLongitudeLatitudeHeight();
this->Longitude = llh.X;
this->Latitude = llh.Y;
this->Height = llh.Z;

FQuat rotation = this->GlobeAnchor->GetEastSouthUpRotation();
FRotator rotator = rotation.Rotator();
this->Roll = rotator.Roll;
this->Pitch = rotator.Pitch;
this->Yaw = rotator.Yaw;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ class UCesiumGlobeAnchorDerivedProperties : public UObject,

virtual void PostEditChangeProperty(
struct FPropertyChangedEvent& PropertyChangedEvent) override;
virtual bool CanEditChange(const FProperty* InProperty) const override;

void Initialize(UCesiumGlobeAnchorComponent* GlobeAnchor);

Expand Down
Loading

0 comments on commit 9e5fa97

Please sign in to comment.