Commit Graph

237 Commits

Author SHA1 Message Date
cedric caillaud
fc4e0fdade geometry collection : fix cached geometry collection being set to dynamic too early
- Reverted back set simulate physics to not remove all anchors and instead updated higher level code to do so at the cost of a conditional cast

#rb michael.bao
#jira UE-172346
#preflight 639a3a1bc16855964d257ac6

[CL 23520692 by cedric caillaud in ue5-main branch]
2022-12-14 18:04:50 -05:00
michael bao
3d2d639cf0 geometry collection should return the root bone if bone name is specified as none.
#preflight 639a18d143330e63e5014272
[FYI] jack.oakman

[CL 23517925 by michael bao in ue5-main branch]
2022-12-14 15:51:16 -05:00
michael bao
cf0672e960 client geometry collections need to wait for its physics proxy to initialize prior to processing replication data
#preflight 639a0ecb8c64c74ac80c304e
[FYI] cedric.caillaud, todd.eckert

[CL 23517860 by michael bao in ue5-main branch]
2022-12-14 15:50:10 -05:00
cedric caillaud
c7fc9c517a geometry collection : only recreate asset simulation data when necessary ( only applies when in editor )
- avoid calling it over and over when components using the same asset are registered
- make creation of physics state faster
- make duplication of components faster

#rb brice.criswell
#preflight 63940c5fcf0e31f727516720

[CL 23499843 by cedric caillaud in ue5-main branch]
2022-12-13 18:16:59 -05:00
michael bao
0ee2354869 Expose the FPhysicsObject objects via the UPrimitiveComponent and specialize for USkeletalMeshComponent and UGeometryCollectionComponent
#rb cedric.caillaud
#preflight 6390c5631776b8c21c157b9b

[CL 23433946 by michael bao in ue5-main branch]
2022-12-07 15:41:26 -05:00
cedric caillaud
815f539676 Geometry collection : fix crash caused by a geometry collection made of meshes with different number of UV channels
#rb jimmy.andrews
#preflight 638e66730d013d47ef69e386

[CL 23401618 by cedric caillaud in ue5-main branch]
2022-12-05 18:38:18 -05:00
cedric caillaud
b960e1ce31 geometry collection : fixed material consolidation and make sure instanced mesh array is properly generated when building a GC in dataflow
- Improved InitializeMaterials to be able to handle material list only made of external materials
- Added CollectionInstancedMeshFacade and update code using the attribute directly to use the facade instead
- Added new input / output to Geometry Collection Terminal node ( InstancedMeshes )
- Simplified FindOrAddAutoInstanceMesh methods

[FYI] jimmy.andrews
#rb none
#preflight 6389699c0e4613faeded4210

[CL 23370012 by cedric caillaud in ue5-main branch]
2022-12-02 00:40:18 -05:00
cedric caillaud
460425d9d6 Geometry collection : optimize InitConstantData
On local testing, average performance of the function went from 27ms to 11ms
- Changed UVs data layout in FGeometryCollectionConstantData to be an array of UVChannels instead of an array of vertices containing each multiple channels, this reduces allocations quite a lot
- Avoid memcpy by passing array by reference to BuildMeshSections
- Use batched parallelFor for copying bone colors and UVChannels
- Rewrite indices remap to be O(N + M) instead of O(N * M)

Most of the remaining cost is in copying the arrays now
Future work could include making a copy per thread ( but may have to keep allocation on the calling thread )

#rb jimmy.andrews, brice.criswell, Bryan Sefcik
#preflight 6387971f3377450900d27163

[CL 23340834 by cedric caillaud in ue5-main branch]
2022-11-30 16:59:49 -05:00
cedric caillaud
0a631794df Add RemoveOnBreak facade
- Update code accessing the directa ttribute to use the facade
- Updated RemoveOnBreak dataflow node to use it too

#rb none
#preflight 637be8dae30d4388493b0d02

[CL 23229812 by cedric caillaud in ue5-main branch]
2022-11-21 18:58:53 -05:00
bill henderson
e50a6e6857 Modular Vehicle changes for networking
#preflight 637b508b8b12eb83a7609ca2
#rb Cedric.Caillaud
#preflight 637b508b8b12eb83a7609ca2

[CL 23219604 by bill henderson in ue5-main branch]
2022-11-21 07:56:36 -05:00
cedric caillaud
803bfaaa67 geometrycollection runtime optimization
- Optimize managed array collection NumElement to only fetch once from the group map
- Make sure to skip IncrementSleepTimer and ImcrementBreakTimer method is GC is not broken yet
- Early out in RefreshEmbeddedGeometry if no examplar is present
- Optimize BuildGeometry to reduce cache missed when running too small batch across large number of threads ( 2.5 time perf boost )

#rb benn.gallagher
#preflight 637531c6953c19d43519551b

[CL 23166264 by cedric caillaud in ue5-main branch]
2022-11-16 19:21:50 -05:00
cedric caillaud
89b7dcfcbd Improve set clustered function on geometry collection component
- Add a set clustered by transformed box
- Fix the set clustered functions to properly update the kinematic state of the parents
- Imporved the debug draw of connection graph to better see the node state when close

#rb none
#preflight 636dd14e953c19d435279592

[CL 23102242 by cedric caillaud in ue5-main branch]
2022-11-11 14:11:40 -05:00
henrik karlsson
b75f8273d9 Include removals
* GeometryCollectionComponent.h - Most files are related to the removal of includes in this file. Removed 7 headers
   - Moved GeometryCollectionDamagePropagationData in to its own file
   - Changed COPY_ON_WRITE_ATTRIBUTE to be set in a way so implementations can be placed in cpp file.
   - Moved some function implementations to cpp file
* Removed include in FieldSystemActor.h
* Removed include in FieldSystem.h
* Removed include in CommonUISettings.h


#preflight 636b325c376a9cd6a8818aae
#rb cedric.caillaud (for the actual changes, not additional includes and a couple include removals outside GeometryCollection)

[CL 23069399 by henrik karlsson in ue5-main branch]
2022-11-09 20:53:21 -05:00
cedric caillaud
17a5140e40 Geometrty collection - add multiple blueprint functions
- GetLocalBoudns
- GetDebugInfo : to get detailed info about the various collection and their arrays ( including estimated memory usage )
- SetAnchoredByIndex / SetAnchoredBybox now has a bAnchored boolean

#rb brice.criswell
#preflight

[CL 22958587 by cedric caillaud in ue5-main branch]
2022-11-03 13:56:42 -04:00
cedric caillaud
243f3b1b4e Chaos : add method to dynamically set Geometry collection fragment to be anchored ( by index or by box )
#rb brice.criswell
#preflight 636182f91608da6ba139f700

[CL 22918006 by cedric caillaud in ue5-main branch]
2022-11-02 11:47:15 -04:00
cedric caillaud
fb3e9ff339 Chaos : enable support for root proxy mesh for geometry collection ( work only with ISM at the moment )
#rb brice.criswell, michael.bao
#preflight 6359d21b5d49a96f7b127ffa

[CL 22850795 by cedric caillaud in ue5-main branch]
2022-10-29 03:00:57 -04:00
cedric caillaud
45169b4d63 Chaos : fix geometry collection replication failing because the client side component has a authority local role when physics state is being created
#rb none
#preflight 635adaea944463bad46f163f

[CL 22823592 by cedric caillaud in ue5-main branch]
2022-10-28 00:33:43 -04:00
henrik karlsson
b5b86c796c This change is a strategical submit for a coming change that removes lots of includes in headers that are included by many files. This change contains adding of includes in files that previously got those includes transitively from other inclkudes
#preflight 6355d4940313c24974b2107b
#rb none

[CL 22783162 by henrik karlsson in ue5-main branch]
2022-10-26 12:57:32 -04:00
Jimmy Andrews
e648a4cb5e Improved user control and visibility into proximity and connection graph generation for fracture:
- Added a Proximity tool to Fracture Mode to visualize and change generation settings for GeometryCollection bone proximity.
 - Added more user controls for how proximity is generated, including a "Convex Hull distance" method for deciding contact, which should help include connections that were missed by the default proximity detection method.
 - Made proximity settings live on the GeometryCollection as (non-cooked) attributes, so proximity re-generates with the desired method after further fracturing/clustering.
 - Added an option to automatically convert the proximity graph to a pre-computed connection graph used by simulation.
 - Reduce redundant proximity calculations: Be more consistent in relying on FGeometryCollectionEdit to update proximity as needed, and call 'RequireProximity' instead of 'UpdateProximity' in cases where we expect a valid proximity may already be present.

#rb cedric.caillaud
#preflight 6356d21b0313c24974eea2f8

[CL 22735429 by Jimmy Andrews in ue5-main branch]
2022-10-24 16:24:39 -04:00
cedric caillaud
5b28136c0a Chaos : fix potential crash with replication when physics state is destroyed
#rb brice.criswell.michael.forot
#jira UE-167938
#preflight 6352d8b63a547c3da385dcf3

[CL 22712152 by cedric caillaud in ue5-main branch]
2022-10-22 15:35:03 -04:00
cedric caillaud
a59a81e2b9 Geometry collection : added support for ISMPools, it only works if an ISMPool actor is assigned to the GC instance
Limitations : Currently this requires the GC to be reset to recompute the list of instanciable meshes and their corresponding indices
Mitigation : this can be turned off using the following cvar : p.Chaos.GC.UseISMPool

#rb brice.criswell, Krzysztof.Narkowicz
#preflight 63519a8af92c325024c32137

[CL 22705192 by cedric caillaud in ue5-main branch]
2022-10-21 19:51:57 -04:00
cedric caillaud
97f3d8c718 Chaos : fix potential geometry collection replication crash
- Make sure CLustersToRep is reset when the physics state is destroyed
- Initialize the Physics proxy ReplicationMode when we create the proxy instead of during InitializeComponent ( because Destroy/Create physics state can be called after it )

#rb brice.criswell, michael.forot
#preflight 6350d4f82337adbf42b08788

[CL 22670734 by cedric caillaud in ue5-main branch]
2022-10-20 16:47:18 -04:00
cedric caillaud
f77439fae4 Chaos : remove the need to pass a parent for GC when adding particle to the island graph
This fixes crashes related  to GC replication where an island index inherited from a parent would remain set after the island has been removed

#rb chris.caulfield, brice.criswell, michael.forot
#preflight 6350824b8449f85a477815e4

[CL 22647574 by cedric caillaud in ue5-main branch]
2022-10-19 22:03:57 -04:00
cedric caillaud
7a43f6187a Chaos : temp fix for replication crash
- comment the disable of particles beyond the abandon level  on the server

#rb trivial
#jira
#preflight none

[CL 22647208 by cedric caillaud in ue5-main branch]
2022-10-19 21:51:21 -04:00
rob mclaughlin
09e5fd7ab6 Checks to avoid access to an empty InitialLevels array in GeometryCollectionComponent
Submitting on behalf of Enrique due to preflight not submitting

[FYI] cedric.caillaud, peter.knepley, andrew.firth, enrique.garciaamezcu
#preflight https://horde.devtools.epicgames.com/job/6340545a62762f4a1baa3d9f
Preflight fail due to unrelated WorldPartition issue

[CL 22412822 by rob mclaughlin in ue5-main branch]
2022-10-07 19:45:55 -04:00