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

Get the plugin working in UE 5.5 Preview. #1539

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open

Get the plugin working in UE 5.5 Preview. #1539

wants to merge 33 commits into from

Conversation

kring
Copy link
Member

@kring kring commented Nov 6, 2024

Depends on CesiumGS/cesium-native#977.

Right now, this most likely won't work in any other UE version. But it does work (at least on Windows) in the UE 5.5 Preview that is currently available from the Epic Launcher. It works in all versions now.

This is a bit dodgy, because our modified Abseil is now pretending to be
the real deal. But I haven't worked out how to fix that without
introducing linker errors yet.
Because GitHub [rolled out / is rolling out] an update to the macos-14
image that removes 14.3.1.

I have to admit I'm a little fuzzy on the implications of switching to
15.4 with regard to OS support and the changes of successful linking with binaries
produced by older versions.
@kring kring marked this pull request as ready for review November 12, 2024 04:09
Because it doesn't seem to be picked up from the original spot anymore
in UE 5.5.
It seems to have changed from `~/.config/Unreal\
Engine/UnrealBuildTool/BuildConfiguration.xml` to `~/Documents/Unreal\
Engine/UnrealBuildTool/BuildConfiguration.xml`, even though this isn't
mentioned in the release notes. I had to step through UnrealBuildTool in
the debugger on a Mac to determine this.
@kring kring added this to the December 2024 Release milestone Nov 14, 2024
In UE 5.5, `GetCameras` does not find any cameras when running the tests
headless. As a result, we were never calling `updateView`, and so the
height samples never completed.
@kring
Copy link
Member Author

kring commented Nov 15, 2024

I fixed the UE 5.5 test failure. The problem was that, when running the tests headless on CI, the Cesium3DTileset::GetCameras was not finding any cameras. And as a result, we were never calling Tileset::updateView. That meant that sampleHeightMostDetailed requests never completed, and eventually the tests would time out. In previous versions of UE, there was a camera of some sort available, even when headless.

I fixed this by calling updateView even if there are no cameras. Tileset tolerates this well enough. I'm a little worried this could impact tile selection, though, leading to some kind of artifact in the Editor. For example, when the Editor loses focus or is minimized, and so none of the Editor viewports are valid, what happens to existing tiles? Well, I tried it, and couldn't see any problems. I'm mentioning it just in case whoever reviews this PR wants to try some additional tests in this areas.

Fix UE 5.5 crash with hardware ray tracing enabled
Copy link
Contributor

@j9liu j9liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kring ! I'm going to test this locally before I merge, but from a glance there don't appear to be any surprises.

Just a few questions / comments.

.github/workflows/build.yml Show resolved Hide resolved
extern/vcpkg-overlays/abseil/portfile.cmake Show resolved Hide resolved
Shaders/Private/CesiumPointAttenuationVertexFactory.ush Outdated Show resolved Hide resolved
@j9liu
Copy link
Contributor

j9liu commented Nov 21, 2024

TODO for me: Check out the point cloud vertex factory file for potential updates with the new bool parameter

@j9liu
Copy link
Contributor

j9liu commented Nov 22, 2024

@kring I'm not sure why, but updating cesium-native to the latest commit on main is resulting in build errors. It looks like it's a bunch of linker errors with s2?

6>   Creating object C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Binaries\Win64\UnrealEditor-CesiumRuntime.exp
6>s2.lib(s2cell_id.cc.obj) : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl absl::lts_20240722::str_format_internal::FormatPack(class absl::lts_20240722::str_format_internal::UntypedFormatSpecImpl,class absl::lts_20240722::Span<class absl::lts_20240722::str_format_internal::FormatArgImpl const >)" (?FormatPack@str_format_internal@lts_20240722@absl@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VUntypedFormatSpecImpl@123@V?$Span@$$CBVFormatArgImpl@str_format_internal@lts_20240722@absl@@@23@@Z) referenced in function "public: void __cdecl S2Error::Init<>(enum S2Error::Code,class absl::lts_20240722::str_format_internal::FormatSpecTemplate<> const &)" (??$Init@$$V@S2Error@@QEAAXW4Code@0@AEBV?$FormatSpecTemplate@$S@str_format_internal@lts_20240722@absl@@@Z)
6>s2.lib(s2latlng.cc.obj) : error LNK2001: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl absl::lts_20240722::str_format_internal::FormatPack(class absl::lts_20240722::str_format_internal::UntypedFormatSpecImpl,class absl::lts_20240722::Span<class absl::lts_20240722::str_format_internal::FormatArgImpl const >)" (?FormatPack@str_format_internal@lts_20240722@absl@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@VUntypedFormatSpecImpl@123@V?$Span@$$CBVFormatArgImpl@str_format_internal@lts_20240722@absl@@@23@@Z)
6>s2.lib(s2cell_id.cc.obj) : error LNK2019: unresolved external symbol "unsigned int __cdecl absl::lts_20240722::base_internal::SpinLockWait(struct std::atomic<unsigned int> *,int,struct absl::lts_20240722::base_internal::SpinLockWaitTransition const * const,enum absl::lts_20240722::base_internal::SchedulingMode)" (?SpinLockWait@base_internal@lts_20240722@absl@@YAIPEAU?$atomic@I@std@@HQEBUSpinLockWaitTransition@123@W4SchedulingMode@123@@Z) referenced in function "void __cdecl absl::lts_20240722::base_internal::CallOnceImpl<class <lambda_79ba321403081603635db02b57b3fb8e> >(struct std::atomic<unsigned int> *,enum absl::lts_20240722::base_internal::SchedulingMode,class <lambda_79ba321403081603635db02b57b3fb8e> &&)" (??$CallOnceImpl@V<lambda_79ba321403081603635db02b57b3fb8e>@@$$V@base_internal@lts_20240722@absl@@YAXPEAU?$atomic@I@std@@W4SchedulingMode@012@$$QEAV<lambda_79ba321403081603635db02b57b3fb8e>@@@Z)
6>s2.lib(s2cell_id.cc.obj) : error LNK2019: unresolved external symbol AbslInternalSpinLockWake_lts_20240722 referenced in function "void __cdecl absl::lts_20240722::base_internal::CallOnceImpl<class <lambda_79ba321403081603635db02b57b3fb8e> >(struct std::atomic<unsigned int> *,enum absl::lts_20240722::base_internal::SchedulingMode,class <lambda_79ba321403081603635db02b57b3fb8e> &&)" (??$CallOnceImpl@V<lambda_79ba321403081603635db02b57b3fb8e>@@$$V@base_internal@lts_20240722@absl@@YAXPEAU?$atomic@I@std@@W4SchedulingMode@012@$$QEAV<lambda_79ba321403081603635db02b57b3fb8e>@@@Z)
6>s2.lib(s2cell_id.cc.obj) : error LNK2019: unresolved external symbol "public: void __cdecl absl::lts_20240722::strings_internal::StringifySink::Append(class absl::lts_20240722::string_view)" (?Append@StringifySink@strings_internal@lts_20240722@absl@@QEAAXVstring_view@34@@Z) referenced in function "void __cdecl absl::lts_20240722::AbslStringify<class absl::lts_20240722::strings_internal::StringifySink>(class absl::lts_20240722::strings_internal::StringifySink &,struct absl::lts_20240722::Hex)" (??$AbslStringify@VStringifySink@strings_internal@lts_20240722@absl@@@lts_20240722@absl@@YAXAEAVStringifySink@strings_internal@01@UHex@01@@Z)
6>s2.lib(s2cell_id.cc.obj) : error LNK2019: unresolved external symbol "char * __cdecl absl::lts_20240722::numbers_internal::FastIntToBuffer(int,char *)" (?FastIntToBuffer@numbers_internal@lts_20240722@absl@@YAPEADHPEAD@Z) referenced in function "public: __cdecl absl::lts_20240722::AlphaNum::AlphaNum(int)" (??0AlphaNum@lts_20240722@absl@@QEAA@H@Z)
6>s2.lib(s2cell_id.cc.obj) : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl absl::lts_20240722::StrCat(class absl::lts_20240722::AlphaNum const &,class absl::lts_20240722::AlphaNum const &)" (?StrCat@lts_20240722@absl@@YA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBVAlphaNum@12@0@Z) referenced in function "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl S2CellId::ToString(void)const " (?ToString@S2CellId@@QEBA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@XZ)
6>s2.lib(s2cell_id.cc.obj) : error LNK2001: unresolved external symbol "char const * const absl::lts_20240722::numbers_internal::kHexTable" (?kHexTable@numbers_internal@lts_20240722@absl@@3QBDB)
6>s2.lib(s2latlng.cc.obj) : error LNK2019: unresolved external symbol "public: __cdecl absl::lts_20240722::log_internal::LogMessage::OstreamView::OstreamView(struct absl::lts_20240722::log_internal::LogMessage::LogMessageData &)" (??0OstreamView@LogMessage@log_internal@lts_20240722@absl@@QEAA@AEAULogMessageData@1234@@Z) referenced in function "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<class S2LatLng,0>(class S2LatLng const &)" (??$?6VS2LatLng@@$0A@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEBVS2LatLng@@@Z)
6>s2.lib(s2latlng.cc.obj) : error LNK2019: unresolved external symbol "public: virtual __cdecl absl::lts_20240722::log_internal::LogMessage::OstreamView::~OstreamView(void)" (??1OstreamView@LogMessage@log_internal@lts_20240722@absl@@UEAA@XZ) referenced in function "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<class S2LatLng,0>(class S2LatLng const &)" (??$?6VS2LatLng@@$0A@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEBVS2LatLng@@@Z)
6>s2.lib(s2latlng.cc.obj) : error LNK2019: unresolved external symbol "public: class std::basic_ostream<char,struct std::char_traits<char> > & __cdecl absl::lts_20240722::log_internal::LogMessage::OstreamView::stream(void)" (?stream@OstreamView@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV?$basic_ostream@DU?$char_traits@D@std@@@std@@XZ) referenced in function "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<class S2LatLng,0>(class S2LatLng const &)" (??$?6VS2LatLng@@$0A@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEBVS2LatLng@@@Z)
6>s2.lib(s2latlng.cc.obj) : error LNK2019: unresolved external symbol "private: void __cdecl absl::lts_20240722::log_internal::LogMessage::CopyToEncodedBuffer<0>(class absl::lts_20240722::string_view)" (??$CopyToEncodedBuffer@$0A@@LogMessage@log_internal@lts_20240722@absl@@AEAAXVstring_view@23@@Z) referenced in function "public: class absl::lts_20240722::log_internal::LogMessage & __cdecl absl::lts_20240722::log_internal::LogMessage::operator<<<34>(char const (&)[34])" (??$?6$0CC@@LogMessage@log_internal@lts_20240722@absl@@QEAAAEAV0123@AEAY0CC@$$CBD@Z)
6>s2.lib(s2latlng.cc.obj) : error LNK2019: unresolved external symbol "private: static bool __cdecl absl::lts_20240722::str_format_internal::FormatArgImpl::Dispatch<double>(union absl::lts_20240722::str_format_internal::FormatArgImpl::Data,class absl::lts_20240722::str_format_internal::FormatConversionSpecImpl,void *)" (??$Dispatch@N@FormatArgImpl@str_format_internal@lts_20240722@absl@@CA_NTData@0123@VFormatConversionSpecImpl@123@PEAX@Z) referenced in function "public: __cdecl absl::lts_20240722::str_format_internal::FormatArgImpl::FormatArgImpl<double>(double const &)" (??$?0N@FormatArgImpl@str_format_internal@lts_20240722@absl@@QEAA@AEBN@Z)
6>s2.lib(coder.cc.obj) : error LNK2019: unresolved external symbol "public: __cdecl absl::lts_20240722::log_internal::LogMessageFatal::LogMessageFatal(char const *,int,class absl::lts_20240722::string_view)" (??0LogMessageFatal@log_internal@lts_20240722@absl@@QEAA@PEBDHVstring_view@23@@Z) referenced in function "public: __cdecl Encoder::~Encoder(void)" (??1Encoder@@QEAA@XZ)
6>s2.lib(coder.cc.obj) : error LNK2019: unresolved external symbol "public: __cdecl absl::lts_20240722::log_internal::LogMessageFatal::~LogMessageFatal(void)" (??1LogMessageFatal@log_internal@lts_20240722@absl@@QEAA@XZ) referenced in function "public: __cdecl Encoder::~Encoder(void)" (??1Encoder@@QEAA@XZ)
6>s2.lib(coder.cc.obj) : error LNK2019: unresolved external symbol "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > * __cdecl absl::lts_20240722::log_internal::MakeCheckOpString<unsigned char const *,unsigned char const *>(unsigned char const *,unsigned char const *,char const *)" (??$MakeCheckOpString@PEBEPEBE@log_internal@lts_20240722@absl@@YAPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBE0PEBD@Z) referenced in function "class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > * __cdecl absl::lts_20240722::log_internal::Check_LEImpl<unsigned char *,unsigned char *>(unsigned char * const &,unsigned char * const &,char const *)" (??$Check_LEImpl@PEAEPEAE@log_internal@lts_20240722@absl@@YAPEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBQEAE0PEBD@Z)
6>C:\Dev\cesium-unreal-samples\Plugins\cesium-unreal\Binaries\Win64\UnrealEditor-CesiumRuntime.dll : fatal error LNK1120: 15 unresolved externals

I made sure to delete the existing build folder in extern, as well as Source/ThirdParty. But seems like this is happening consistently

@lilleyse
Copy link
Contributor

lilleyse commented Nov 22, 2024

I'm getting similar linker errors when building cesium-native by itself with gcc 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants