Locality links are now only added between elements with the same material
#rb brian.karis
#preflight 6290cee5dd2be751aeda4a71
[CL 20392408 by Rune Stubbe in ue5-main branch]
Because of assumptions in the DDC system about cooking being deterministic, we could under various circumstances end up in a situations where StaticMesh and the associated Nanite streaming data was coming from two different cooks.
This could easily cause a crash as the StaticMesh chunk contains explicit page and offset references into the streaming data.
Determinism fixes:
-Added sorting step during initial clustering in the case where an edge is shared by more than 2 triangles.
-Added sorting step to sort parent clusters after they have been generated.
-Changed cluster GUID from 32bit to 64bit. When cooking CitySample there was one case where two clusters that were compared ended up with the same GUID, resulting in undefined order.
-Initialized GUID in the cluster constructor that takes a list of clusters to merge. Before it would just be 0.
-Added missing initialization of vertex color on fallback meshes that don't use vertex color.
#jira UE-146347
#rb brian.karis, michal.valient
#preflight 6238817789625f06129f616f
#ushell-cherrypick of 19458684 by Rune.Stubbe
#lockdown Marc.Audy
#ROBOMERGE-AUTHOR: rune.stubbe
#ROBOMERGE-SOURCE: CL 19467008 in //UE5/Release-Engine-Staging/...
#ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v935-19464907)
[CL 19468567 by rune stubbe in ue5-main branch]
Switched FDynamicBVH to use greedy insertion because branch and bound perf significantly degrades with heavily overlapped leaves.
Added closest point queries using branch and bound.
FBounds is now templated as TBounds.
#rb graham.wihlidal
#robomerge FNNC
#preflight 6216dbf9104496cff8abfc36
[CL 19107993 by Brian Karis in ue5-main branch]
These both trim detail from the Nanite data that is stored to disk and can be used to optimize disk size after import. Should be a super useful tool late in production.
#rb rune.stubbe
#lockdown michal.valient
#preflight 61fb25e6033a864b77e11ed6
#ROBOMERGE-AUTHOR: brian.karis
#ROBOMERGE-SOURCE: CL 18838594 in //UE5/Release-5.0/... via CL 18838602 via CL 18838937
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18838962 by brian karis in ue5-main branch]
Changed fallback settings to be largely error based with new property FallbackRelativeError.
Nanite builder will now provide the LOD fallbacks for all autogenerated LOD levels which is far faster than generating them from scratch.
#rb graham.wihlidal
#preflight 61f9e1fe9e4d23cd93b8d556
#ROBOMERGE-AUTHOR: brian.karis
#ROBOMERGE-SOURCE: CL 18820056 in //UE5/Release-5.0/... via CL 18820070 via CL 18822916
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v910-18824042)
[CL 18825066 by brian karis in ue5-main branch]
Now finds DAG cut with minimal error to hit target NumTris.
Fixed bad UVs affecting simplification. Not sure why this code was removed.
#rb rune.stubbe
[CL 15138015 by Brian Karis in ue5-main branch]
Nanite builder:
-Parameterized hierarchy builder to support different fanouts
-Changed fanout from 64 to 8
-Removed old K-Means hierarchy builder and replaced it with a top-down splitting approach
-Changed hierarchy node bounds from spheres to AABBs
-Added some GraphViz debugging code to visualize the tree
Persistent culling shader:
-MPMC queue support for multiple inputs per wave
-Node culling now consumes multiple nodes
-Merged node culling and cluster culling shaders
Misc:
-Moved culling specific functions to Culling.ush
-Merged arrays for candidate clusters and nodes into one array to get under 8UAV limit. They already had same lifetime.
#rb brian.karis
#fyi graham.wihlidal
[CL 15032528 by Rune Stubbe in ue5-main branch]
The Nanite builder now accepts a set of meshes that will be built into a single resource with a hierarchy root for each input mesh.
Updated runtime code to use this feature for Geometry collection.
Each GC now takes up just a single root page.
Changed geometry collection serialization so Nanite data is now transient similar to how it is transient in RenderData for StaticMesh.
Added bogus serialization functions for parsing and throwing away the old Nanite data, so we don't crash when parsing old files.
#rb brian.karis, graham.wihlidal
[CL 14828108 by Rune Stubbe in ue5-main branch]
- This dramatically improves editor framerate under high load
Cleanup all the hacks that are not needed anymore
#rb Andriy.Tylychko
[CL 14676999 by danny couture in ue5-main branch]
Used for Nanite instances smaller than 6 pixels. Drawn directly from the instance culling pass. Significantly faster than sending down the normal cluster rasterization pipe.
#rb rune.stubbe
#fyi graham.wihlidal
[CL 14650618 by Brian Karis in ue5-main branch]
- Reduce game-thread stalls by scheduling worker thread's work on background threads to avoid interference.
- Reduce peak memory usage duration when using coarse mesh representation by clearing the original mesh sooner.
- Allow nanite mesh to be built from any thread
#rb Graham.Wihlidal, Brian.Karis
[CL 14608438 by danny couture in ue5-main branch]