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]
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]
Pages can now refererence data from the parent page.
Page transcoding is now batched based on page dependencies.
Removed Nanite's LZ container for platforms that don't have hardware LZ. Rely on iostore compression instead. ~4% disk saving. 32mb system memory saving from temp buffer.
Better integer-based UV quantization code similar to new position quantization.
Got rid of remaining old position quantization code.
Reduced float4s per cluster from 8 to 6. ~2% memory density.
Added BitStreamReader support for reading from UAV. Needed to reference parent data.
#rb graham.wihlidal
[FYI] brian.karis
#ROBOMERGE-SOURCE: CL 16621364 via CL 16621388
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v830-16605563)
[CL 16621402 by rune stubbe in ue5-release-engine-test branch]
UV mirror seams are now considered an attribute discontinuity. This is handled through a cheap trick of changing the tops bits of the material index per triangle.
This should not strictly be necessary because the QEM could account for the difference but to get it to properly catch issues in practice required increasing the UV error weight high enough that it impacts all meshes including ones that didn't have noticable issues. Targeting the mirror case specifically was better even though it shouldn't be special theoretically.
This fixes Nanite UV bugs in Frosty.
#jira UE-113150
#ROBOMERGE-SOURCE: CL 16411470 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v804-16311228)
[CL 16412628 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]
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]
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]