Commit Graph

422 Commits

Author SHA1 Message Date
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
cedric caillaud
c617387f30 Enable geometry collection replication optimized code path
#rb trivial

[CL 28061456 by cedric caillaud in ue5-main branch]
2023-09-20 18:26:37 -04:00
cedric caillaud
fc9959bb9d GC Replication improvement
- This is behind a cvar (p.Chaos.GC.UseReplicationV2) ( off for now )
- Split replicated data in two : state and dynamic
     - State data contains a bitArray of what's broken and an array of recently released pieces with matching breaking velocities
     - Dynamic data contains tracked ( XR and VW ) dynamic pieces
- Reduced the precision for quantized breaking velocities
- Store rotation as euler to allow for quantized rotation in dynamic data
- Breaking velocities are removed as particles become disabled to save bandwidth for players joining later or coming into relevancy
- Tried to share as much code as possible between the old and new replication code paths

#rb markus.boberg, michael.bao, benn.gallagher

[CL 28059803 by cedric caillaud in ue5-main branch]
2023-09-20 18:00:34 -04:00
vincent robert
839bda5113 Reduce memory usage in Geometry Collection
Relative Transform in Dynamic Collection are now in single precision. This change implicates an API change. The Managed Array of transforms being in public, and being changed make some backward compatibility breakage. This array shouldn't have be used much.
#rb cedric.caillaud

[CL 27942269 by vincent robert in ue5-main branch]
2023-09-15 22:05:02 -04:00
cedric caillaud
9fb429c837 geometry collection : make the following properties to be editable at runtime ( even if the phsyics state is already created )
- DamageModel
- DamagePropagationdata
- UseMaterialDamageModifiers
- MaterialOverrideMassScaleMultiplier
- GravityGroupIndex

#rb michael.bao

[CL 27941104 by cedric caillaud in ue5-main branch]
2023-09-15 21:02:56 -04:00
cedric caillaud
fd0824abbe Add Cvar to allow creation of physics state in non-PIE editor mode
[FYI] michael.bao, phil.cole

[CL 27931391 by cedric caillaud in ue5-main branch]
2023-09-15 16:11:24 -04:00
michael bao
6aac4ee6c5 accidental pragma optimize removal
[CL 27918383 by michael bao in ue5-main branch]
2023-09-15 12:00:48 -04:00
michael bao
9d4ad54ad0 geometry collection fully decayed event needs to actually wait for particles to decay
[FYI] jack.oakman

[CL 27918156 by michael bao in ue5-main branch]
2023-09-15 11:58:27 -04:00
cedric caillaud
81dcd73543 Geometry collection : fix rest transform not properly reflected in the viewport when set in a construction script
#rb trivial

[CL 27908068 by cedric caillaud in ue5-main branch]
2023-09-15 02:52:13 -04:00
cedric caillaud
196ad15df9 Geometry collection : Fix few crashes resulsting from recent changes
#rb trivial

[CL 27904988 by cedric caillaud in ue5-main branch]
2023-09-14 21:49:51 -04:00
cedric caillaud
8b6bc26d90 Attempt to fix Arm64 build ( from CL 27902529)
#rb trivial

[CL 27902945 by cedric caillaud in ue5-main branch]
2023-09-14 20:12:47 -04:00
cedric caillaud
46a8973fe8 Make Component Space transform to be computed on demand
- Hide the array beghind an API that expose root transform and all transform tracking a dirty state

#rb benn.gallagher

[CL 27902559 by cedric caillaud in ue5-main branch]
2023-09-14 19:55:19 -04:00