Commit Graph

42 Commits

Author SHA1 Message Date
Rune Stubbe
bcb274c90e Got rid of VectorReciprocalSqrtAccurate in the Nanite builder to get consistent results between Intel and AMD
Converted SIMD calculations from double back to float
#rb brian.karis
#preflight 625f5478dd47b4ad214ff78b

[CL 19824539 by Rune Stubbe in ue5-main branch]
2022-04-19 21:16:13 -04:00
Rune Stubbe
3bf4f5080e Updated ParallelFors in NaniteEncode with more descriptive names and better default values for MinBatchSize.
#rb jamie.hayes
#fyi graham.wihlidal
#preflight 625eceaf034d8924cdcaea20

[CL 19809685 by Rune Stubbe in ue5-main branch]
2022-04-19 11:39:30 -04:00
Brian Karis
dba24ab6be FDynamicBVH now supports a forest with a spatial hash at the highest level to support LWC without the need for doubles for bounding boxes.
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]
2022-02-23 21:17:53 -05:00
charles bloom
67ef10a399 mark up most of the ParallelFors used in cook with named scopes for Insights
#rb arne.schober
#preflight none

[CL 18966875 by charles bloom in ue5-main branch]
2022-02-11 19:32:06 -05:00
brian karis
de6db094d8 Added KeepTrianglePercent and TrimRelativeError properties to Nanite static mesh settings.
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]
2022-02-02 21:14:51 -05:00
graham wihlidal
bac2a2b090 Moved all Nanite defines shared between C++ and shaders into a common header file, removing all the "keep this define in sync with this file" cases all over the code, and make the code a lot more maintainable. Common definitions now have a NANITE_ prefix to disambiguate global symbols
#rb rune.stubbe
#preflight 61f94f9ea6632a34f372dc39
[FYI] brian.karis, ola.olsson, jamie.hayes, andrew.lauritzen

#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 18808945 in //UE5/Release-5.0/... via CL 18809413 via CL 18822535
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v908-18788545)

[CL 18823295 by graham wihlidal in ue5-main branch]
2022-02-02 05:33:52 -05:00
rune stubbe
294b946a99 Fixed NaN in console output when there are no Nanite streaming pages
#rb trivial
[FYI] graham.wihlidal
#preflight 61eaa6c25f04f4cdf1b77419

#ROBOMERGE-AUTHOR: rune.stubbe
#ROBOMERGE-SOURCE: CL 18688249 in //UE5/Release-5.0/... via CL 18688258 via CL 18688269
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472)

[CL 18688278 by rune stubbe in ue5-main branch]
2022-01-21 07:34:28 -05:00
rune stubbe
d00ab3ed8f Moved GGlobalResources (and a few other things) from the Nanite public headers to the private folder
#preflight 61e2051c4b4bd12cbeea5f77
#rb Graham.Wihlidal

#ROBOMERGE-AUTHOR: rune.stubbe
#ROBOMERGE-SOURCE: CL 18628531 in //UE5/Release-5.0/... via CL 18628539 via CL 18628543
#ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v899-18417669)

[CL 18628546 by rune stubbe in ue5-main branch]
2022-01-15 13:38:12 -05:00
brian karis
e838341c86 External edges now handle non-manifold meshes, ie multiple adjacency
Added Moore-Penrose pseudo inverse for solving singular quadrics. Disabled for now.

#rb rune.stubbe

#ROBOMERGE-AUTHOR: brian.karis
#ROBOMERGE-SOURCE: CL 18415437 in //UE5/Release-5.0/... via CL 18415438
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v897-18405271)

[CL 18415441 by brian karis in ue5-release-engine-test branch]
2021-12-08 20:32:07 -05:00
rune stubbe
7379341b35 Fix for EditorLinux compile error
#rb ola.olsson
#lockdown michal.valient
#preflight 61641d68fe114f0001c241c9

#ROBOMERGE-AUTHOR: rune.stubbe
#ROBOMERGE-SOURCE: CL 17771151 via CL 17986041 via CL 18368158 via CL 18368232
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368268 by rune stubbe in ue5-release-engine-test branch]
2021-12-03 10:05:03 -05:00
jon nabozny
b27dcfb385 Support for multiple root pages per Nanite resource
Added UI for changing minimum residency
Decoupled imposter data allocation from root page allocation
Removed convoluted logic around a page's dependencies including itself for legacy reasons
Made streaming of imposter data optional (r.Nanite.Streaming.Imposters)
#rb andrew.lauritzen, ola.olsson
#preflight 6163f8f8eaa06c0001e409ee
#lockdown michal.valient

#ROBOMERGE-OWNER: jon.nabozny
#ROBOMERGE-AUTHOR: rune.stubbe
#ROBOMERGE-SOURCE: CL 17770690 via CL 17986013 via CL 18368123 via CL 18368152
#ROBOMERGE-BOT: STARSHIP (Release-Engine-Staging -> Release-Engine-Test) (v895-18170469)

[CL 18368223 by jon nabozny in ue5-release-engine-test branch]
2021-12-03 10:01:28 -05:00
Marc Audy
0c3be2b6ad Merge Release-Engine-Staging to Test @ CL# 18240298
[CL 18241953 by Marc Audy in ue5-release-engine-test branch]
2021-11-18 14:37:34 -05:00
johan torp
d8b1cf4d6b Math constant constexprification and outlining to reduce massive code bloat
#ROBOMERGE-AUTHOR: johan.torp
#ROBOMERGE-SOURCE: CL 17679918 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v875-17642767)

[CL 17679955 by johan torp in ue5-release-engine-test branch]
2021-09-30 13:03:15 -04:00
andrew davidson
57beb335f2 Merging //UE5/Dev-LargeWorldCoordinates [at] 17581892 to //UE5/Main
#ROBOMERGE-AUTHOR: andrew.davidson
#ROBOMERGE-SOURCE: CL 17595295 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v871-17566257)

[CL 17595306 by andrew davidson in ue5-release-engine-test branch]
2021-09-22 10:01:48 -04:00
rune stubbe
9a6f24b028 Added missing const qualifier to BVH_SortNodes
#rb trivial
#8356
#preflight 612f51a0b6b29c00012d3b16

#ROBOMERGE-SOURCE: CL 17384784 via CL 17387140
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17387217 by rune stubbe in ue5-release-engine-test branch]
2021-09-01 11:21:21 -04:00
rune stubbe
adf8f7d4fa Added Nanite streamer support for separate sizes for streaming pages and root pages
Reduced root page size from 128kb to 32kb
Page allocation size is no longer rounded up when using fixed sized allocation (r.Nanite.Streaming.DynamicRootPages=0)
Removed the ClusterPageHeaders resource and embedded its data directly into pages
Renamed SOAStrides to PageConstants
#preflight 61041cd35b2fb800011aa2c2

#ROBOMERGE-SOURCE: CL 17007430 via CL 17007443
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v838-16927207)

[CL 17007446 by rune stubbe in ue5-release-engine-test branch]
2021-07-30 12:31:09 -04:00
jeanfrancois dube
c144a30900 Avoid a temporary memory allocation in Nanite FStripifier::BuildTables, at the expense of using 288K on the stack.
#rb rune.stubbe

#ROBOMERGE-SOURCE: CL 16718417 via CL 16718423
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v835-16672529)

[CL 16718425 by jeanfrancois dube in ue5-release-engine-test branch]
2021-06-18 11:04:54 -04:00
rune stubbe
01254db311 Fixed Nanite builder crash caused by broken fastmath rounding.
Nanite DDC key not bumped as successfully built meshes are still valid.
#rb none
[FYI] graham.wihlidal, brian.karis

#ROBOMERGE-SOURCE: CL 16652302 via CL 16659235
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v834-16658389)

[CL 16659407 by rune stubbe in ue5-release-engine-test branch]
2021-06-14 12:02:17 -04:00
rune stubbe
c25049a041 Progress on Nanite compression. ~19% on AncientGame.
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]
2021-06-10 08:09:50 -04:00
rune stubbe
a01d67df9b Fixed undefined behavior in BuildHierarchyTopDown that was causing a Linux-only Nanite builder crash.
#jira UE-116057
#rb trivial
[FYI] graham.wihlidal, brian.karis

#ROBOMERGE-SOURCE: CL 16535138 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v828-16531559)

[CL 16535154 by rune stubbe in ue5-main branch]
2021-06-02 11:40:48 -04:00
graham wihlidal
77a987b0a2 [Nanite DDC Bump] Cleanup Nanite resource flag logic to use explicit flags, and avoid possible bitfield serialization differences between msvc and clang.
#rb jason.nadro
[FYI] rune.stubbe

#ROBOMERGE-SOURCE: CL 16503408 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v826-16501804)

[CL 16503411 by graham wihlidal in ue5-main branch]
2021-05-28 16:30:52 -04:00
graham wihlidal
14a0c66615 [Nanite DDC Bump] Implemented correct Nanite triangle count and vertex count metrics in SM editor (and other tools).
#rb brian.karis
[FYI] rune.stubbe

#ROBOMERGE-SOURCE: CL 16498196 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v823-16466674)

[CL 16498206 by graham wihlidal in ue5-main branch]
2021-05-28 00:29:59 -04:00
rune stubbe
8a9f900ed4 Converted most of Nanite back to float when running with LWC. Fixes various data corruption issues resulting in Nanite crashing with LWC.
#JIRA UE-115577
#rb ola.olsson
[FYI] graham.wihlidal, brian.karis

#ROBOMERGE-SOURCE: CL 16385988 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v804-16311228)

[CL 16386070 by rune stubbe in ue5-main branch]
2021-05-19 10:55:06 -04:00
Andrew Davidson
3ddc3a4da3 Merge up from //UE5/Dev-LargeWorldCoordinates
#rb none

[CL 16211417 by Andrew Davidson in ue5-main branch]
2021-05-05 15:07:25 -04:00
Rune Stubbe
02afe50726 Reenabled variable length UV encoding for Nanite meshes to save disk space
#[robomerge] ignore
#lockdown graham.wihlidal
#[fyi] nick.whiting

#ushell-cherrypick of 16120952 by Rune.Stubbe

[CL 16155632 by Rune Stubbe in ue5-main branch]
2021-04-29 05:43:20 -04:00