Commit Graph

250 Commits

Author SHA1 Message Date
brett miller
885accf838 GeometryCollectionSceneProxy
-- check for existence of PerBoneHitProxy before accessing it

#jira UE-112900
#rb none

[CL 16778237 by brett miller in ue5-main branch]
2021-06-24 16:38:31 -04:00
brett miller
d58733419f Chaos Caching
-- Removed GeometryCollectionComponent dereferencing from PhysicsThread code
-- Uses PhysicsProxy simulation parameters to determine if events are recorded/played

#rb benn.gallagher
[FYI] brice.criswell


#ROBOMERGE-SOURCE: CL 16709692
#ROBOMERGE-BOT: (v835-16672529)

[CL 16709703 by brett miller in ue5-main branch]
2021-06-17 15:46:02 -04:00
graham wihlidal
66009050b8 De-interleaved dynamic/material/uncommon data from FPrimitiveInstance into separate data streams to reduce CPU memory footprint, and an upcoming change will also de-interleave this data on the GPU, dramatically saving GPU memory/performance, and also optimizing GPU Scene uploads. This is a mid-refactor change with some crufty temporary code in places since the GPU memory is still interleaved, but it should be removed soon.
#rb brian.karis
[FYI] krzysztof.narkowicz, michal.valient, ola.olsson
#preflight 60ca8449634cd100013c3673


#ROBOMERGE-SOURCE: CL 16699435
#ROBOMERGE-BOT: (v835-16672529)

[CL 16699447 by graham wihlidal in ue5-main branch]
2021-06-16 20:43:32 -04:00
brett miller
af48a5573d ChaosCaching
-- Removed per observed controls for StartMode, CacheMode and moved to a single set of controls on the cache manager.
-- Cache takes name from observed component.
-- Placed CacheCollection automatically set to Kinematic, non-placed are Record
-- Random access start frame
-- Consistenty record all transforms in Actor space
-- Compatible with Sequencer control
-- Created Playback only CacheManager subclass
-- GeometryCollection recording abides component flags to record/playback breaking/collision/trailing events

#rb benn.gallagher
[FYI] brice.criswell


#ROBOMERGE-SOURCE: CL 16684501
#ROBOMERGE-BOT: (v835-16672529)

[CL 16684502 by brett miller in ue5-main branch]
2021-06-16 01:29:21 -04:00
brett miller
d0523f95e5 Fracture Mode Editor
-- correct behavior for shift and ctrl selection
-- Select Inverse abides ViewLevel

[FYI] brice.criswell


#ROBOMERGE-SOURCE: CL 16669650
#ROBOMERGE-BOT: (v834-16658389)

[CL 16669654 by brett miller in ue5-main branch]
2021-06-15 00:47:01 -04:00
graham wihlidal
1b2976b0c9 Big cleanup/refactor of InstanceData* (renamed to InstanceSceneData* to match many other places already calling it that, and to disambiguate upcoming changes that add another instance data buffer to GPU Scene for arbitrary data payloads). This change also removes the virtuals on FPrimitiveSceneProxy for the instance list along with lots of copy paste code for all the derived types, and instead makes it a built-in feature of the base proxy (since nearly everything supports GPU Scene instancing now).
#rb ola.olsson
[FYI] brian.karis
#preflight 60c4d5c586ce760001377f2a


#ROBOMERGE-OWNER: graham.wihlidal
#ROBOMERGE-AUTHOR: graham.wihlidal
#ROBOMERGE-SOURCE: CL 16660135
#ROBOMERGE-BOT: (v834-16658389)
#ROBOMERGE-CONFLICT from-shelf

[CL 16660883 by graham wihlidal in ue5-main branch]
2021-06-14 13:42:46 -04:00
ola olsson
5560667259 Tracking GPU-Scene dirty state and specialize Primitive Id only updates to avoid redundant uploads.
- Added instance data validation
- Added general load balancer for instance processing on GPU (will move to own files later)
- Added initial GPU-side write access API for GPU scene.
- Addded specialized kernel to update primitive IDs in instances when that is the only change.

#rb graham.wihlidal
#jira UE-116671
#preflight 60c25d7b1264df0001aab80b


#ROBOMERGE-SOURCE: CL 16628528
#ROBOMERGE-BOT: (v831-16623017)

[CL 16628539 by ola olsson in ue5-main branch]
2021-06-10 15:46:35 -04:00
rune stubbe
6b332a6ab5 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
#ROBOMERGE-BOT: (v830-16605563)

[CL 16621388 by rune stubbe in ue5-main branch]
2021-06-10 08:09:23 -04:00
graham wihlidal
4ec3fc585b Removed LocalToWorld and PrevLocalToWorld from FPrimitiveInstance (instead the concatenating of instance and primitive transforms happens during SoA construction right before GPU Scene upload). In the future we'll also have a custom GPU Scene upload kernel that can do things like the concatentation (among other derivations) right on the GPU, but not affect the hot path of stuff like GetInstanceData(). This change also renames (Prev)InstanceToLocal to (Prev)LocalToPrimitive to make a lot more sense than the previous naming.
#rb ola.olsson, krzysztof.narkowicz, rune.stubbe
[FYI] brian.karis, jason.nadro


#ROBOMERGE-SOURCE: CL 16614552
#ROBOMERGE-BOT: (v828-16531559)

[CL 16614986 by graham wihlidal in ue5-main branch]
2021-06-09 19:08:26 -04:00
graham wihlidal
0d916441a5 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
#ROBOMERGE-BOT: (v828-16531559)
#ROBOMERGE-CONFLICT from-shelf

[CL 16590845 by graham wihlidal in ue5-main branch]
2021-06-08 15:18:30 -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