Commit Graph

241 Commits

Author SHA1 Message Date
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
Brice Criswell
c5d95a94cf Chaos : Geometry Collection Object
- Dont force a rebuild on load for the size specific default changes.
#rb Benn.Gallagher
#preflight 60ba326487fd8e0001524686

[CL 16559790 by Brice Criswell in ue5-main branch]
2021-06-04 12:42:50 -04:00
graham wihlidal
c850a02c69 Implemented a new WIP type called FRenderTransform that (for now) represents instance transforms as a float 4x3 matrix - in the future we expect a much tighter per-instance encoding (for example: 12bytes for position, 4bytes for rotation, 6bytes for scale), so this type can be optimized in that direction. Other than saving hundreds of MB in *heavy* instance scenes, faster updates/uploads, etc.. this type could be used to represent a transform that stays 32bit w/ a rebase offset. Passing around ambiguous FVector and FMatrix data is bound to get us into trouble, whereas a concrete type we can reason about for transforms in render-only code makes a good deal of sense.
This change is another basis for more instance data and GPUScene improvements coming down the pipe.

#rb jason.nadro, krzysztof.narkowicz, zach.bethel, zak.middleton, rune.stubbe, ben.woodhouse
[FYI] brian.karis, ola.olsson
#preflight 60b9608d0249c300016598de


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

[CL 16555914 by graham wihlidal in ue5-main branch]
2021-06-03 21:10:11 -04:00
brice criswell
8beda23d97 Chaos: Geometry Collection Asset
- Allow empty collisions array in the size specific data.
#jira UE-116973
#rb Brett.Milller
#preflight 60b94a4c884c630001f7f531


#ROBOMERGE-OWNER: brice.criswell
#ROBOMERGE-AUTHOR: brice.criswell
#ROBOMERGE-SOURCE: CL 16555435
#ROBOMERGE-BOT: (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

[CL 16555840 by brice criswell in ue5-main branch]
2021-06-03 21:03:44 -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
brett miller
272e3f018e FGeometryCollectionSceneProxy
-- dtor releases DynamicData instead of deleting it.

#jira UE-115064
[FYI] benn.gallagher

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

[CL 16511488 by brett miller in ue5-main branch]
2021-05-31 22:01:58 -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
michael forot
2ddb3187d2 Reactivate the geocollection initialization fields
#ROBOMERGE-SOURCE: CL 16491352 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v823-16466674)

[CL 16491365 by michael forot in ue5-main branch]
2021-05-27 16:31:32 -04:00
aurel cordonnier
43fa62fcd8 Merge from Release-Engine-Test @ 16487383 to UE5/Main
This represents UE4/Main @ 16445039 and Dev-PerfTest @ 16444526

[CL 16488106 by aurel cordonnier in ue5-main branch]
2021-05-27 13:40:37 -04:00
Brice Criswell
e79975ad6f Chaos : GeoemtryCollection (Integ from Main CL:16450371)
- Force Size Specific data to always have a single element.
#jira none
#rb Benn.Gallagher
#preflight 60aeaeebb44aa20001a82ea5

[CL 16476610 by Brice Criswell in ue5-main branch]
2021-05-26 17:46:30 -04:00
brett miller
9c13522d2c GeometryCollection
-- implemented deferred initialization using the existing SimulatePhysics property and SetSimulatePhysics blueprint function.
-- Cleaned out old caching code

#jira FROST-1065
#rb brice.criswell

#ROBOMERGE-SOURCE: CL 16461543 in //UE5/Private-Frosty/...
#ROBOMERGE-BOT: STARSHIP (Private-Frosty -> Main) (v818-16446889)

[CL 16461679 by brett miller in ue5-main branch]
2021-05-25 22:01:05 -04:00
Brice Criswell
dd608a6141 Chaos : GeoemtryCollection (Integ from Main CL:16450371)
- Transfer defaults to size specific data
#jira UE-116415
#rb None
#fyi Benn.Gallagher
#preflight 60ad5700bb30900001cac176

[CL 16456707 by Brice Criswell in ue5-main branch]
2021-05-25 17:13:53 -04:00
Brice Criswell
2438be7678 Chaos : GeoemtryCollection
- Fix for serialization crash.
#jira UE-116415
#rb None
#fyi Benn.Gallagher

[CL 16450371 by Brice Criswell in ue5-main branch]
2021-05-25 11:59:44 -04:00
Ola Olsson
df492855e0 Removed GPUCULL_TODO define (fixed in on-state)
#preflight 60acc49b58f02e0001a0a996
#rb graham.wihlidal,Arciel.Rekman,Brandon.Schaefer,will.damon

[CL 16446355 by Ola Olsson in ue5-main branch]
2021-05-25 08:15:14 -04:00
Brice Criswell
05504fb252 Chaos : Geometry Collection : (Review Update)
Collision Attribute Restructuring.
-	Updated the size specific data to be the primary container for collision settings within the geometry collection.
-	Removed non size specific default parameters from the asset.
-	Added support for Capsule collisions.
#jira none
#rb Benn.Gallagher
#fyi Brett.Miller, Cedric.Caillaud
#okforgithup, public, internal
#preflight 60abfa1c88460e0001fbae77

[CL 16439958 by Brice Criswell in ue5-main branch]
2021-05-24 16:21:06 -04:00
Brice Criswell
139a4bed28 Chaos : Geometry Collection
Collision Attribute Restructuring.
-	Updated the size specific data to be the primary container for collision settings within the geometry collection.
-	Removed non size specific default parameters from the asset.
-	Added support for Capsule collisions.
#jira none
#rb Benn.Gallagher
#fyi Brett.Miller, Cedric.Caillaud
#okforgithup, public, internal
#preflight 60a91c321d78490001621e41

[CL 16429701 by Brice Criswell in ue5-main branch]
2021-05-22 12:07:31 -04:00
brett miller
41ab113ba1 Chaos Event Manager
-- Removed particle handle pointers from event payloads, as these are unsafe on the GT where they are often utilized.
-- Test proxy pointers when used on the game thread in case the proxy is pending destruction and is no longer valid.
-- Moved transform of particle handle -> transform group index for geometry collection event to PT where it is safe to reference the particle handle.

#jira UE-115834
#rb brice.criswell

[CL 16409919 by brett miller in ue5-main branch]
2021-05-20 16:50:29 -04:00
Jimmy Andrews
f4edf0c0a9 fix crash w/ gc->sm->gc path creating out-of-bounds material IDs
#rb brett.miller
#rnx
#preflight 60a5a958b7ccb00001959fea

[CL 16396136 by Jimmy Andrews in ue5-main branch]
2021-05-19 21:03:35 -04:00
brett miller
da31181852 GeometryCollectionComponent
-- Corrected merge issue that prevented build

#jira none
#rb none

[CL 16389506 by brett miller in ue5-main branch]
2021-05-19 13:46:19 -04:00
brett miller
bb16c8f650 GeometryCollectionComponent
-- Removed comment in code preventing kinematic fields from expressing.

#jira none
#rb none

[CL 16388810 by brett miller in ue5-main branch]
2021-05-19 13:11:46 -04:00
julien marchand
b4484ee0d0 Fix to allow accessing the specific BodyInstance when the InstancedStaticMeshComponent has an array of BodyInstance instead of retrieving the default one in the primitive component base class.
[at]jaco.vandyk
#jira Frost-2381
#rnx

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

[CL 16372550 by julien marchand in ue5-main branch]
2021-05-18 14:32:57 -04:00
brett miller
d603e260ae GeometryCollection
-- Fixed namespace collision

#jira none
#rb none

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

[CL 16370331 by brett miller in ue5-main branch]
2021-05-18 13:07:36 -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