Commit Graph

433 Commits

Author SHA1 Message Date
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
vincent robert
1c066d8b2e Reduce memory usage in Dynamic Collection
Remove Initial Level array from Dynamic Collection, it is now using the Rest Collection which is the same.
#rb cedric.caillaud

[CL 28355044 by vincent robert in ue5-main branch]
2023-09-29 16:40:16 -04:00
michael bao
b5ae00a61b geometry collection should return false for CanEditSimulatePhysics if no rest collection is set
#rb cedric.caillaud

[CL 28333213 by michael bao in ue5-main branch]
2023-09-28 20:31:47 -04:00
vincent robert
16568b2f49 Reduce memory usage in Dynamic Collection
Remove children array of set from Dynamic Collection, it is now using the bit array from its parent.
#rb cedric.caillaud

[CL 28331755 by vincent robert in ue5-main branch]
2023-09-28 18:44:03 -04:00
vincent robert
f2f162ac2d Reduce memory usage in Dynamic Collection
Remove parent array from Dynamic Collection, it is now replaced by a bit array
#rb cedric.caillaud

[CL 28285924 by vincent robert in ue5-main branch]
2023-09-27 15:03:55 -04:00
cedric caillaud
03cee15295 Geometry collection : fix new replication to set the velocity after the break is forced
#rb chris.caulfiled, michael.bao

[CL 28213461 by cedric caillaud in ue5-main branch]
2023-09-25 20:25:01 -04:00
zach bethel
41011faffa Fixed geometry collection to run on the scene pipe and defer dynamic data until the proxy is fully created.
[CL 28209499 by zach bethel in ue5-main branch]
2023-09-25 18:27:54 -04:00
cedric caillaud
a460e0231f Add option to make a GC component to follow it's root bone ( when dynamic )
- this does not work for kinematically moved GC in a cluster union but this should provide a good support for all the other cases

#rb michael.bao, jon.sourbeer

[CL 28169721 by cedric caillaud in ue5-main branch]
2023-09-22 22:55:32 -04:00
michael bao
adab4c241d reverting change to checking when to fire geometry collection OnFullyDecayed events since it instead prevented OnFullyDecayed from ever being fired
[FYI] jack.oakman

[CL 28149118 by michael bao in ue5-main branch]
2023-09-22 14:55:48 -04:00
trapper mcferron
17840ac155 Adds CVAR to apply debug coloring to broken primitives
Adds CVAR to force a # amount of primitives to be broken

#rb jeremy.moore cedric.caillaud

[CL 28112032 by trapper mcferron in ue5-main branch]
2023-09-21 18:36:53 -04:00
vincent robert
9286d328d8 Reduce memory in Dynamic Collection
#rb cedric.caillaud

[CL 28102631 by vincent robert in ue5-main branch]
2023-09-21 16:12:12 -04:00