Commit Graph

467 Commits

Author SHA1 Message Date
vincent robert
fb68621191 [Backout] - CL30213133
[FYI] vincent.robert
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL30211300
[FYI] vincent.robert
Original CL Desc
-----------------------------------------------------------------
Reduce array size to store only required particles.
Several array in the Geometry Collection are used to store particle. According to the max simulation level, not all particle are created.
Now array have their own size, the particle size and the transform size in the proxy is now distinguished.
This change save 55% of memory in initialization.
It also avoid to process all transforms, we now iterate only through particles which should be way faster.
#rb cedric.caillaud

[CL 30221091 by vincent robert in ue5-main branch]
2023-12-08 17:44:59 -05:00
vincent robert
3a8a8e02b7 [Backout] - CL30211300
[FYI] vincent.robert
Original CL Desc
-----------------------------------------------------------------
Reduce array size to store only required particles.
Several array in the Geometry Collection are used to store particle. According to the max simulation level, not all particle are created.
Now array have their own size, the particle size and the transform size in the proxy is now distinguished.
This change save 55% of memory in initialization.
It also avoid to process all transforms, we now iterate only through particles which should be way faster.
#rb cedric.caillaud

[CL 30213295 by vincent robert in ue5-main branch]
2023-12-08 12:11:16 -05:00
vincent robert
9df21ce019 Reduce array size to store only required particles.
Several array in the Geometry Collection are used to store particle. According to the max simulation level, not all particle are created.
Now array have their own size, the particle size and the transform size in the proxy is now distinguished.
This change save 55% of memory in initialization.
It also avoid to process all transforms, we now iterate only through particles which should be way faster.
#rb cedric.caillaud

[CL 30211315 by vincent robert in ue5-main branch]
2023-12-08 10:57:31 -05:00
markus boberg
2b8dbad6d8 Small coding standard fix that failed to merge down after being cherry picked to parent stream and altered there.
#rb jeanfrancois.stamour

[CL 30010964 by markus boberg in ue5-main branch]
2023-11-30 04:34:32 -05:00
marc audy
01e7381e04 Fix C4702 warnings
#rnx

[CL 29975801 by marc audy in ue5-main branch]
2023-11-28 19:03:48 -05:00
markus boberg
c5d4883efb Server crash on executing async physics command.
Check that the cached lambda function is callable before calling it.
Null check logic in the source function enqueing the lambda.
Use locally cached async physics command struct instead of accessing array each time.

#rb Michael.Forot

[CL 29711242 by markus boberg in ue5-main branch]
2023-11-14 08:57:39 -05:00
michael bao
12eb342dcd revert previous change to call RegisterForEvents every time we change a notify global event flag - only set the flag directly on the PT directly for breaks
#rb cedric.caillaud

[CL 29677753 by michael bao in ue5-main branch]
2023-11-12 17:45:44 -05:00
michael bao
c74837a2fa geometry collection should track its previously set world transform external so the GT can compute the difference between the two if needed (e.g. if it needs to query the difference prior to the PT->GT sync)
#rb cedric.caillaud

[CL 29673947 by michael bao in ue5-main branch]
2023-11-11 16:24:45 -05:00
michael bao
6daadceddd geometry collection needs to turn on break events at the solver level if either notify breakings or notify global breakings is set to true - also made sure the flag gets set properly for removals and collisions
#rb cedric.caillaud, vincent.robert

[CL 29629911 by michael bao in ue5-main branch]
2023-11-09 22:54:29 -05:00
cedric caillaud
4b029f888c Fix rendering offsets with cluster unions
- This is caused by the  transform not being properly defined when receiving a ComponentAdded event
- Override ChildToParentUpdated method to update the rendering transform

#rb michael.bao, chris.caulfield, michael.lentine

[CL 29615742 by cedric caillaud in ue5-main branch]
2023-11-09 18:50:49 -05:00
titouan deslandes
2a57b8f063 Deprecated COPY_ON_WRITE_ATTRIBUTE and Indirect TManagedArray, removed CopyOnWriteAttributeList saving 200 bytes per GC.
Use the RestCollection to access those attributes instead.

#rb cedric.caillaud

[CL 29289224 by titouan deslandes in ue5-main branch]
2023-10-31 16:28:26 -04:00
michael forot
21de6da55b Call FlushNetDormancy only when some replicated property are changing to avoid replicating all GCs and preventing the repmovement to be replicated
#rb michael.bao

[CL 29272717 by michael forot in ue5-main branch]
2023-10-31 09:32:18 -04:00
chris caulfield
d0cb9a55f4 Geometry Collection - add OneWayInteractionLevel rather than IsOneWayInteraction to get more control over which particles behave like debris
#rb cedric.caillaud, michael.bao

[CL 29257116 by chris caulfield in ue5-main branch]
2023-10-30 19:23:20 -04:00
michael lentine
d3ed2bc54f Undo //Fortnite/Release-28.00/Engine/Source/Runtime/Experimental/GeometryCollectionEngine/... changelist 29242678
#rb none

[CL 29256090 by michael lentine in ue5-main branch]
2023-10-30 18:49:35 -04:00
titouan deslandes
bad8f30386 Deprecated COPY_ON_WRITE_ATTRIBUTE and Indirect TManagedArray, removed CopyOnWriteAttributeList saving 200 bytes per GC.
Use the RestCollection to access those attributes instead.

#rb cedric.caillaud, vincent.robert, Benn.Gallagher

[CL 29246315 by titouan deslandes in ue5-main branch]
2023-10-30 15:57:51 -04:00
cedric caillaud
1bc32b81dd Geometry collection component : make sure physics material can be set while physics state has been created
#rb michael.bao, todd.eckert, jon.sourbeer

[CL 29238554 by cedric caillaud in ue5-main branch]
2023-10-30 13:14:08 -04:00
benn gallagher
83be2df6a6 Stop geometry collection components from spending time updating their body instance inherited from primitive component when updating transforms. The geometry collection component controls its own physics transforms internally and doesn't require the body instance.
#rb Michael.Bao

[CL 29224722 by benn gallagher in ue5-main branch]
2023-10-29 15:50:12 -04:00
todd eckert
59ac23d5d7 Fixed an issue where prefab's were using the wrong physical material
see https://jira.it.epicgames.com/browse/PLAY-19518 and https://jira.it.epicgames.com/browse/PLAY-16871

#juno
#rnx

[CL 29166273 by todd eckert in ue5-main branch]
2023-10-26 22:17:13 -04:00
cedric caillaud
1e3697780d Remove ensure about Nans iwhen getting the root transform until the proxy race condition is properly fixed
#rb sergio.gardeazabal, michael.lentine

[CL 29165791 by cedric caillaud in ue5-main branch]
2023-10-26 22:10:43 -04:00
cedric caillaud
903f61073b Add partial destruction decay system for moving buildings
When the building is moving , check at regular interval if any partially destroyed geometry collection has been broken for certain amount of time since the building is moving
If so, then release it
- Cache the dynamic state in the cluster union component to avoid calling IsSimulatingPhysics()
- Added a virtual function called whenever the physics state of the cluster union is set

#rb benn.gallagher, michael.lentinne, michael.bao, chris.caulfield

[CL 29121109 by cedric caillaud in ue5-main branch]
2023-10-26 00:18:08 -04:00
sergio gardeazabal
6e5f317e4a UClusterUnionComponent::SyncClusterUnionFromProxy optimizations
- Removed the need of maintain two sets to cache FExternalSpatialAccelerationPayload structures as components are added/removed
- Added a new constructor to FExternalSpatialAccelerationPayload so we can directly pass a TObjectKey and the chaos UniqueIdx, so we don't have to build them from scratch (which requires lock the scene to get the Particle idx and access the Global objects array to build the WeakObjtPtr).
- Wrapped TObjectKey in a wrapper we can use to store other elements we will use later, so we don't have to go back and forth between converting between ObjectKey and Raw ptr which requires access to the global objects array and is not cheap.
- Removed TSet the need to do TSet differences
- Added a new native event that when broadcasted in addition to the new bone ids that were added, it also passes an array of bone IDs removed. (So listeners don't have to calculate it on their own again).
- Splitted UGeometryCollectionComponent::SetPerParticleCollisionProfileName so its components can be called independently. There are cases where we need to call it with different profile name witching the same scope, so part of the method doesn't need to be executed again. To ensure all parts are executed as desired, a new transaction object was created that need to be passed to the new UGeometryCollectionComponent::SetParticleCollisionProfileName

#rb cedric.caillaud, michael.bao

[CL 29119882 by sergio gardeazabal in ue5-main branch]
2023-10-25 23:28:31 -04:00
emanuel masciarelli
f38272b967 Removing the usage of Engine headers inside of Chaos
#jira UE-198896
#rb benn.gallagher
#tests PIE, built HeadlessChaos

[CL 29095415 by emanuel masciarelli in ue5-main branch]
2023-10-25 14:00:37 -04:00
zach bethel
3c28e650c4 Removed scene render command pipe.
- Existing implementation has too many vectors for race conditions; will need a more targeted approach to optimize scene commands.
 - Cable component manually initializes resources on the Cable pipe instead of using CreateRenderThreadResources.
 - Removed async path for scene proxy render resource creation.

[CL 29090823 by zach bethel in ue5-main branch]
2023-10-25 11:46:51 -04:00
jeremy moore
f0e9080c6e Don't create render state for geometry collections using custom renderers
[CL 29072485 by jeremy moore in ue5-main branch]
2023-10-25 01:56:13 -04:00
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