Commit Graph

443 Commits

Author SHA1 Message Date
markus boberg
67a7803832 Server crash on GC update RepData accessing uninitialized world.
#rb michael.bao, cedric.caillaud

[CL 29033457 by markus boberg in ue5-main branch]
2023-10-24 02:55:35 -04:00
emanuel masciarelli
6d073fde45 Adding the ability for Geometry Collections to specify the use of the collision geometry from the source Static Meshes on the game thread instead of the combined GC collision, as the GC collision can be more coarse for improved physics simulation performance.
The cvar p.GeometryCollection.ForceOverrideGCCollisionSetupForTraces can be set to 1 to force GC collision on everything if anything goes sideways.

#tests PIE
#rb cedric.caillaud

[CL 28973051 by emanuel masciarelli in ue5-main branch]
2023-10-20 14:00:50 -04:00
cedric caillaud
64081c4b6d Geometry collection optimization : tick geometry collection only when there's at least a piece decaying
- Tracks broken and decayed states in an internal structure
- Simplifies the FullDecay check
- Removal function remain mostly intact but are open for optimization after this change since we can now query the broken state directly instead of inferring it from other more expensive state checks

#rb benn.gallagher, michael.bao, vincent.robert

[CL 28934664 by cedric caillaud in ue5-main branch]
2023-10-19 17:24:23 -04:00
chris caulfield
efaf435dfe Chaos - GeometryCollections now use InitialOverlapDepenetrationVelocity from their BodyInstance during initialization
#rb michael.bao, cedric.caillaud

[CL 28924319 by chris caulfield in ue5-main branch]
2023-10-19 13:11:48 -04:00
cedric caillaud
2af9eb98aa Geometry collection optimization : add missing change from 28889155
#rb benn.gallagher, vincent.robert, michael.lentine

[CL 28895666 by cedric caillaud in ue5-main branch]
2023-10-18 18:44:31 -04:00
vincent robert
82cd7138bb Lazy initializer for Dynamic removals attributes
#rb cedric.caillaud

[CL 28876234 by vincent robert in ue5-main branch]
2023-10-18 10:07:37 -04:00
cedric caillaud
f1642e667c ClusterUnion: Fix rendering of GC when in a cluster union
Also fix an uninitialized variable

#rb michael.bao, michael.lentine, jon.sourbeer

[CL 28865263 by cedric caillaud in ue5-main branch]
2023-10-17 21:07:50 -04:00
cedric caillaud
eb82e13ba7 Geometry collection optimization : improve reuse of cached component space bounds
- changed ComponentSpaceBounds to be an Fbox
- CalcBounds now do not check for dynamic collection but when the dynamic collection is modified the component space bounds are invalidated
- invalidation happens in OnPostPhysicsState and when rest transforms are updated
- Cached IsRootBroken state

#rb benn.gallagher, vincent.robert, brice.criswell

[CL 28846696 by cedric caillaud in ue5-main branch]
2023-10-17 14:28:19 -04:00
cedric caillaud
0959ee791b Geometry collection : optimize computation of bounds when GC is unbroken
Also fix an issue with dynamic collection being always dirty after it was once
- Cache root space bounds
- Remove old LocalBounds member as it is a duplicate of the ComponentSpaceBounds
- Remove cvar option to use cached bounds ( now always using them )
- Set the dynamic collection clean when syncing from PT to GT ( and dirty it if any thing changed )

#rb benn.gallagher, michael.bao

[CL 28814378 by cedric caillaud in ue5-main branch]
2023-10-16 15:50:05 -04:00
guillaume patry
d870c70a46 Fix non leaves transform calculation in UGeometryCollectionComponent::SetLocalRestTransforms when bOnlyLeaves = true
[REVIEW] [at]*cedric.caillaud

[CL 28808663 by guillaume patry in ue5-main branch]
2023-10-16 14:10:58 -04:00
vincent robert
94d8c3b195 Convert GC ComponentSpaceTransform in single precision
#rb cedric.caillaud, jeremy.moore

[CL 28801896 by vincent robert in ue5-main branch]
2023-10-16 12:20:18 -04:00
sergio gardeazabal
6ec50602c4 [Chaos] Adding a way for Geometry collection components to not permanently change the net dormancy of their owners.
This CL introduces two modes:

- ForceDormancyAwake : This is the current behavior, as soon we attempt to update replicated data we set the owner dormancy to awake
- FlushNetDormancy : Before updating replicated data, we flush the dormancy of our owner

The modes can be changed with the cvar p.Chaos.GC.NetAwakeningMode (0-1)

This change also makes UClusterUnionReplicatedProxyComponent flush its owner dormancy before updating its replicated data.

This can be disabled with the cvar p.Chaos.CU.UseFlushNetDormancy set to false

#rb cedric.caillaud , ryan.gerleve

[CL 28770731 by sergio gardeazabal in ue5-main branch]
2023-10-13 16:37:20 -04:00
jeremy moore
17c701613f ISMPool: Per instance removal is a setting on the mesh group instead of a cvar.
[CL 28738306 by jeremy moore in ue5-main branch]
2023-10-12 20:59:48 -04:00
michael bao
c663add852 the check for OnRootMovedEvent in UGeometryCollectionComponent::OnPostPhysicsSync needs to store PreviousRootTransform as a value so the next call to RequestRootTransform doesn't make the prev value the same as the new value
[CL 28726713 by michael bao in ue5-main branch]
2023-10-12 16:20:16 -04:00
vincent robert
5bf06ad1ea Convert RestCollection in single precision
- This change won't have much impact on memory when building in game, but the impact will be when loading. Also it harmonize the Dynamic Collection and the Rest Collection. And so it optimizes the access, and conversion to transforms.
- DynamicCollection has a function set back transforms to its RestCollection, and free memory
- Remove function from ManageArrayCollection makes sure to free memory now.
#rb cedric.caillaud

[CL 28721098 by vincent robert in ue5-main branch]
2023-10-12 14:40:24 -04:00
chris caulfield
025e90afe6 Chaos - wire up OneWayIntertaction flag to geometry collection and cluster union debris
#rb michael.bao

[CL 28687812 by chris caulfield in ue5-main branch]
2023-10-11 18:29:54 -04:00
michael bao
209c3d34b4 additions to the geometry collection component API
- ShouldUpdateComponentTransformToRootBone to expose a getter for bUpdateComponentTransformToRootBone
- New FOnGeometryCollectionRootMovedEvent event to know when the root bone moved

#rb cedric.caillaud

[CL 28683342 by michael bao in ue5-main branch]
2023-10-11 17:10:34 -04:00
cedric caillaud
828857cdf0 Geometry collection replication : when client release particles that are no longer active on the server , make sure they are disabled right away
#rb trivial

[CL 28553717 by cedric caillaud in ue5-main branch]
2023-10-06 15:35:22 -04:00
cedric caillaud
8183271b46 Add the possibility to reset the overriden rest transform on a geometry collection
#rb  vincent.robert

[CL 28520110 by cedric caillaud in ue5-main branch]
2023-10-05 17:54:54 -04:00
vincent robert
9589be99ad Decrease memory consumption when creating a building. Now the transforms are not copied in dynamic collections. It will used the rest collection as long the dynamic collection is not modified. Lazy initializer on transforms.
#rb cedric.caillaud

[CL 28509263 by vincent robert in ue5-main branch]
2023-10-05 14:40:16 -04:00
vincent robert
7db7fbbd2d Clean up : Remove friendship from Dynamic Collection with Geometry Collection Component and Geometry Collection Component Physics Proxy
[CL 28494182 by vincent robert in ue5-main branch]
2023-10-05 08:12:19 -04:00
cedric caillaud
4a5b1af75d Add the possibility for a geometry component to stop sending update to the custom renderer if any set
- Also make sure the ISM Pool sub components are properly attached to the root component

#rb michael.bao, jeremy.moore, benn.gallagher

[CL 28483114 by cedric caillaud in ue5-main branch]
2023-10-04 19:42:49 -04:00
vincent robert
1844be19d3 Reduce memory usage in Dynamic Collection :
- Removed Implicits
- Removed Particles
- Compressed Dynamic State
#rb cedric.caillaud, benn.gallagher

[CL 28427877 by vincent robert in ue5-main branch]
2023-10-03 15:47:01 -04:00
michael bao
9bf9f50d3a make geometry collections opt out of being controlled by physics replication
#rb markus.boberg

[CL 28403870 by michael bao in ue5-main branch]
2023-10-02 21:53:35 -04:00
ola olsson
e5f34a1d9c ISM Renderer Data refactor, phase 1.
- Removed old vertex-attribute centered buffers & useless translation code & replace with GPU-scene centric data
 - Made the instance data persistent over scene proxy re-creates.
 - Tracks per-instance data changes in the ISM & implement delta updates, remove need to call "MarkRenderStateDirty" for most instance updates
 - Added preliminary ID-based interface for ISM such that users can forego needing to match the internals (e.g., remove swap, required when using indices).
 - Unified the instance data use in the renderer (removed mix of old & new buffers and processing sites) - all code now sees orthogonalized transforms, the same as is in GPU-Scene.
 - Added FInstanceSceneDataBuffers and moved instance data buffer arrays to that from the Primitive proxy
 - Added FISMInstanceDataManager, which is responsible for tracking changes & dispatching updates. The ISMC owns one of these.
 - Instance data update tasks are async and waits are only done when needed, e.g., for GPU-scene update moving this off RT and later in the frame.
 - Added FInstanceDataSceneProxy, which is the owner of the scene data buffers and is updated by the manager by way if a shared reference with the primitive proxy.
 - Removed FPerInstanceRenderData, ISMC::PerInstanceRenderData
 - Removed FInstanceUpdateCmdBuffer
 - Lumen, GPUScene, SceneCulling, RT, DF all now retrieve data from FInstanceSceneDataBuffers rather than a mix of previous buffers. All now use the primitive-relative space.
 - Geometry Collection & Spline Mesh now manage FInstanceSceneDataBuffers, since they manipulate instance data in one way or another.
 - Mass: contained re-implementations of significant internals of ISMC, converted to ID-based interface
 - PCG: minor changes to avoid touching ISM internals.

#jira UE-191955,PLAY-11918
#rb jamie.hayes,jeremy.moore,jonathan.bard,krzysztof.narkowicz,mieszko.zielinski,julien.lheureux,zach.bethel,aleksander.netzel,yuriy.odonnell

[CL 28371398 by ola olsson in ue5-main branch]
2023-10-02 05:22:58 -04:00