Commit Graph

33 Commits

Author SHA1 Message Date
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
aurel cordonnier
a12d56ff31 Merge from Release-Engine-Staging @ 17791557 to Release-Engine-Test
This represents UE4/Main @17774255, Release-5.0 @17791557 and Dev-PerfTest @17789485

[CL 17794212 by aurel cordonnier in ue5-release-engine-test branch]
2021-10-12 21:21:22 -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
graham wihlidal
596b78798c Removed per instance Nanite imposter flag and changed code to fetch it from the primitive flags instead. Also removed partially implemented per instance cast shadow flag in favor of the correct one on primitive flags.
#rb rune.stubbe
[FYI] brian.karis
#preflight 6130430317a8610001a7d102

#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 17397605 via CL 17397964
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17397969 by graham wihlidal in ue5-release-engine-test branch]
2021-09-02 00:54:16 -04:00
brett miller
8efa2a42b0 FractureTool
-- implemented HideUnselected mode

#jira UE-121963
#rb brice.criswell
#preflight 6123317d9db7df0001e5e4ff
#p4v-cherrypick 17309979

#ROBOMERGE-SOURCE: CL 17359069 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v865-17346139)

[CL 17359084 by brett miller in ue5-release-engine-test branch]
2021-08-30 17:11:38 -04:00
graham wihlidal
70093e350c Instance data optimization - removed RenderBounds member, and refactored LocalBounds
#rb ola.olsson
[FYI] brian.karis, rune.stubbe, krzysztof.narkowicz

#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 16590738 via CL 16590845
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v828-16531559)

[CL 16590853 by graham wihlidal in ue5-release-engine-test branch]
2021-06-08 15:19:37 -04:00
graham wihlidal
67923137a7 More instance data memory and CPU optimizations, and general refactoring.
* Moved Nanite resource ID and hierarchy offset back to primitive data (indirection cost is largely noise these days, and memory savings is more important - GetInstanceData() fetches this data and stores in the pre-existing registers so all the callsites don't have to worry about it).
* Removed FNaniteInfo from FPrimitiveInfo (and the type itself) in favor of just having a 32bit per-instance hierarchy root offset. Hierarchy offset and runtime resource ID just sourced from primitive.
* Removed PrimitiveID from CPU instance data (GPU still needs it). This value was redundantly stored per-instance, and now the GPU Scene upload just blits it over from primitive when the instance data is uploaded.
* Added new virtual GetNaniteResourceInfo on FPrimitiveSceneProxy that retrieves the Nanite resource ID and hierarchy offset stored on a given primitive (needed now that FPrimitiveInstance doesn't cache a copy). The non-virtual FPrimitiveSceneProxy::IsNaniteMesh() helper is used to avoid this virtual function call for non-Nanite proxies.
* Removed deprecated and no longer referenced Nanite::FResources array on FNaniteGeometryCollectionSceneProxy
* Removed expensive per-instance checks() in a few spots
* Stubbed out upcoming per instance payload allocator offset
* Removed deprecated and never referenced non-GPUScene GetInstanceData uniform buffer path
* Significantly cleaned up and optimized a lot of ISM instance data retrieval, including avoiding unnecessary FRenderTransform <-> FMatrix conversions.
* Removed GetInstanceShaderValues API, it was inefficient and annoying to require retrieval of all parameters when often only one or two of them were ever used. In some cases even the origin was unused but .w was needed because of the per-instance random packing.
* Implemented explicit GetInstanceRandomID() accessor to fetch (under current packing) Origin.W without exposing this to the callsites
* Implemented public API for GetInstanceLightMapData(), since the internal version was only accessible by GetInstanceShaderValues()
* Renamed GetInstanceShaderCustomDataValues() -> GetInstanceCustomDataValues() for API consistency

#rb jason.nadro, krzysztof.narkowicz
[FYI] rune.stubbe, brian.karis


#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 16583156
#ROBOMERGE-BOT: (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

[CL 16583193 by graham wihlidal in ue5-main branch]
2021-06-07 23:55:28 -04:00
jimmy andrews
8a78138782 Add option to use full precision UVs on geometry collection scene proxy
#rb brett.miller, tyson.brochu, david.hill
#preflight 60b6645c5719ca0001388544

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

[CL 16518431 by jimmy andrews in ue5-main branch]
2021-06-01 14:20:47 -04:00
peter knepley
adf949236d GeometryCollection
-- Support for Nanite to GeometryCollection conversion
-- Support for multiple UV sets

#jira UE-114992
#rb jimmy.andrews
[FYI] brice.criswell

#ROBOMERGE-OWNER: peter.knepley
#ROBOMERGE-AUTHOR: brett.miller
#ROBOMERGE-SOURCE: CL 16363667 in //UE5/Private-Frosty/... via CL 16370251
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16370359 by peter knepley in ue5-release-engine-test branch]
2021-05-18 13:08:46 -04:00
peter knepley
e07885e125 GeometryCollection
-- Support for Nanite to GeometryCollection conversion
-- Support for multiple UV sets

#jira UE-114992
#rb jimmy.andrews
[FYI] brice.criswell

#ROBOMERGE-OWNER: peter.knepley
#ROBOMERGE-AUTHOR: brett.miller
#ROBOMERGE-SOURCE: CL 16363667 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v804-16311228)
#ROBOMERGE-CONFLICT from-shelf

[CL 16370251 by peter knepley in ue5-main branch]
2021-05-18 13:03:42 -04:00
cedric caillaud
e86f084fe7 Fix rendering of GeometryCollection with LWC on
- change matrix types for dynamic data to be explicitly using float
- wrapped update of vertex buffer to ensure type check
- When LWC mode is on, convert double based matrices to they float equivalent ( sub-optimal, but necessary for now until we have a better way )

#jira UE-115570
[FYI] brice.criswell, brett.miller

#ROBOMERGE-SOURCE: CL 16333456 in //UE5/Main/...
#ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v804-16311228)

[CL 16333461 by cedric caillaud in ue5-release-engine-test branch]
2021-05-14 15:26:55 -04:00
cedric caillaud
591b22bf99 Fix rendering of GeometryCollection with LWC on
- change matrix types for dynamic data to be explicitly using float
- wrapped update of vertex buffer to ensure type check
- When LWC mode is on, convert double based matrices to they float equivalent ( sub-optimal, but necessary for now until we have a better way )

#jira UE-115570
#fyi brice.criswell, brett.miller

[CL 16333456 by cedric caillaud in ue5-main branch]
2021-05-14 15:26:37 -04:00
graham wihlidal
32e893af72 Fix for race condition where GCs might reach the call to RequestGPUSceneUpdate() on initial proxy creation before the primitive scene info has a valid index (entry in GPU Scene bookkeeping), causing the updates to silently skip. Normally this problem doesn't affect the majority of GCs, since most GCs have identify transforms in rest pose, except some GCs authored in external DCC tools could use non-identify transforms that wouldn't be correctly uploaded to GPUScene until simulation would start. Also took the time to remove the virtual function calls on IsNaniteMesh() and IsAlwaysVisible() since these are called super heavily in frustum culling and init views on the CPU.
#rb brett.miller
[FYI] brice.criswell, nick.whiting, brian.karis
#jira UE-115088

#ROBOMERGE-SOURCE: CL 16261925 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v799-16237190)

[CL 16264515 by graham wihlidal in ue5-main branch]
2021-05-11 01:18:05 -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
graham wihlidal
254c5dedc9 Corrected OnMotionBegin/OnMotionEnd to run on the render thread, and refactored the previous in motion logic to use the new events.
#jira UETOP-1595
#rb brett.miller
#lockdown nick.whiting
[FYI] brice.criswell

#ROBOMERGE-SOURCE: CL 16178780 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v792-16166999)

[CL 16178783 by graham wihlidal in ue5-main branch]
2021-05-01 21:33:36 -04:00
brett miller
3e4e8bd152 GeometryCollectionComponent
-- Added state machine logic and scene proxy callbacks for triggering when motion begins and ends.

#jira UETOP-1546
#rb graham.wihlidal
#lockdown nick.whiting

#ROBOMERGE-SOURCE: CL 16178376 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v792-16166999)

[CL 16178381 by brett miller in ue5-main branch]
2021-05-01 17:51:29 -04:00
graham wihlidal
28742c1787 Fixed locked previous GC transforms (locked motion blur) by detecting dynamic->static transition and resetting previous transforms to current.
#rb brice.criswell
[FYI] brett.miller
#lockdown nick.whiting

#ROBOMERGE-SOURCE: CL 16150932 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)

[CL 16150970 by graham wihlidal in ue5-main branch]
2021-04-28 19:53:28 -04:00
graham wihlidal
0fa361fa13 Fixed Nanite geometry collection velocity vectors, and optimizing transform updates for dummy GPU scene instance culling placeholders. Scene proxies can now fully own the concatenation of transform updates and avoid doing incorrect or redundant work during GPU Scene updates.
#jira UETOP-1352
#rb brandon.dawson
[FYI] ola.olsson, brian.karis, brice.criswell, brett.miller, michal.valient
#lockdown nick.whiting

#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 16141209 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)
#ROBOMERGE-CONFLICT from-shelf

[CL 16141875 by graham wihlidal in ue5-main branch]
2021-04-28 05:36:47 -04:00
graham wihlidal
ba3a7bf41e Rewrite of UGeometryCollection::InitDynamicData()
* Implemented thread safe object pool / free list allocator (FGeometryCollectionDynamicDataPool)
 * Added Chaos stats for total transforms and changed transforms
 * Removed TransformsAreEqual mechanism that caused full transform updates to occur unnecessarily for 2 subsequent frames, as the state wasn't stable until the previous 3 frames were stable. This was incredibly innefficient for GPUScene, etc..
 * InitDynamicData now returns the data allocation (which can be null if not dynamic or if no transforms have changed), users of this now check if it's available, and either skip or fall back to the static/rest path otherwise
 * Cleaned up some code paths by combining them with similar passes
 * Removed tons of allocations, including heavy allocations/memcopies of transform data, even on stable frames (which were immediately deallocated right after allocation and setup of the dynamic data)
 * Saves ~0.5 to 1.0ms of CPU time in heavy scenes
 * Saves ~0.5ms of GPU time doing far less GPUScene updates
 * Main optimization around this refactor is forthcoming in a followup CL (avoid calling MarkRenderTransformDirty in TickComponent).

#rb brett.miller, brice.criswell
#lockdown nick.whiting
[FYI] brian.karis, rune.stubbe
#jira UETOP-1088

#ROBOMERGE-SOURCE: CL 16059409 in //UE5/Release-5.0-EarlyAccess/...
#ROBOMERGE-BOT: STARSHIP (Release-5.0-EarlyAccess -> Main) (v789-15992632)

[CL 16061411 by graham wihlidal in ue5-main branch]
2021-04-20 10:45:04 -04:00
Yuriy ODonnell
5f9a58c3c0 Move Nanite::FSceneProxy into a separate header. Avoids rebuilding as much code while iterating.
#robomerge Release-5.0-EarlyAccess
#fyi Brian.Karis

[CL 15539560 by Yuriy ODonnell in ue5-main branch]
2021-02-26 06:30:51 -04:00
Emil Persson
4516b985df Name all resources and make naming mandatory
#rb yuriy.odonnel, kenzo.terelst

[CL 15416919 by Emil Persson in ue5-main branch]
2021-02-16 08:37:39 -04:00
Marc Audy
68150e0be7 Merge UE5/Release-Engine-Staging to UE5/Main @ 14611496
This represents UE4/Main @ 14594913

[CL 14612291 by Marc Audy in ue5-main branch]
2020-10-29 13:38:15 -04:00
graham wihlidal
6e9a656633 Initial support for dynamic GPU scene transform updates for Nanite destruction simulation. Many rough edges to file down, but this is fairly promising.
#rb michael.lentine
#fyi benn.gallagher, brian.karis

[CL 13868550 by graham wihlidal in ue5-main branch]
2020-07-15 19:46:08 -04:00
graham wihlidal
be384a7ef5 Added initial custom render scene proxy for geometry collections driven by Nanite.
#rb none
#fyi michael.lentine, benn.gallagher, brian.karis

[CL 13861289 by graham wihlidal in ue5-main branch]
2020-07-15 03:39:13 -04:00