Commit Graph

255 Commits

Author SHA1 Message Date
steven barnett
412a81e4b5 Use velocity-matching to replicate geometry collection clusters.
- Disable with `p.bGeometryCollectionRepUseClusterVelocityMatch 0`
- Debug draw with `p.Chaos.DebugDraw.GeometryCollectionReplication 1`

#swarm https://p4-swarm.epicgames.net/reviews/23918942
#rb benn.gallagher, cedric.caillaud, michael.bao
#preflight 23876783

[CL 23984069 by steven barnett in ue5-main branch]
2023-02-02 18:43:25 -05:00
michael bao
dbb40daacf potentially fix an issue where the geometry collection async physics tick was being called in the editor on PostLoad incorrectly
#preflight 63d950348505ea6b1fa2e3fa
[FYI] rhys.harwell

[CL 23938829 by michael bao in ue5-main branch]
2023-01-31 17:05:12 -05:00
cedric caillaud
dab0969263 Geometry collection : Add ISM pool subsystem to allow auto assignment of ISMPool
- ISMPool subsystem creates the ISMPool actor and return it when asked for
- Fix root proxy mesh not being properly loaded before sent to the ISM Pool
- Fix visiblity of the geometry component being overriden if ISMPool is not being used

#rb benn.gallagher
#preflight 63d8cb6367116074a84abdd2

[CL 23934984 by cedric caillaud in ue5-main branch]
2023-01-31 14:46:14 -05:00
cedric caillaud
7d0c8a2c5d Geometry collection : add ability to set the gravity group index
#rb none
#preflight  63d47f565d0c0164ccc0bf14

[CL 23897652 by cedric caillaud in ue5-main branch]
2023-01-27 23:12:49 -05:00
michael bao
473e92eda7 abandon after level on the geometry collection should make sure collision is removed from the server. add an option to make sure collision is removed from the client as well.
#preflight 63d0e060ef20a5272d7d7db0
#rb cedric.caillaud

[CL 23864808 by michael bao in ue5-main branch]
2023-01-26 02:26:52 -05:00
jimmy andrews
829a30210c rework how UVs are accessed in geometry collection: make each UV layer a separate attribute, so it is impossible to have an inconsistent number of UVs per vertex, and we do not allocate so many small arrays. Provide a variety of helper functions to make the transition as easy as possible.
#rb cedric.caillaud
#rb brice.criswell
#preflight 63d074be976daa618cdcd957

[CL 23844522 by jimmy andrews in ue5-main branch]
2023-01-25 01:36:28 -05:00
cedric caillaud
ffe4fbdea7 Geometry collection : fix crash when blueprint set notification settings on a geo metryc collection that cause a unresolved callback to be evaluated after the proxy has been destroyed
- move setting of notification and other parameters to properly be set on the PT when GT to PT happens opn the proxy

#rb michael.bao
#preflight 63d0537594644f3e8e433164

[CL 23844500 by cedric caillaud in ue5-main branch]
2023-01-25 01:35:47 -05:00
vincent robert
b390dd5ed0 Clustering optimization
#rb cedric.caillaud
#preflight 63d039ba574ab9cae440e6df

[CL 23843574 by vincent robert in ue5-main branch]
2023-01-24 21:45:14 -05:00
frederic doll
f2dac08df1 Make sure CollisionChannel change is propagated to the PhysicProxy in GeometryCollectionComponent
#rb cedrix.caillaud
#preflight 63cae090fa290562c1b9c4a4

[CL 23815882 by frederic doll in ue5-main branch]
2023-01-23 12:48:24 -05:00
michael bao
27a33ddf60 make the geometry collection go net dormant if there are no clusters to update
#rb cedric.caillaud
#preflight 63c9dc61093a9da16d202629

[CL 23815864 by michael bao in ue5-main branch]
2023-01-23 12:47:44 -05:00
cedric caillaud
fef66c9a85 Geometry collection : Do not create render state when ISMPool is in use and not in Editor
#rb benn.gallagher, michael.bao
#preflight 63c84292ac35a0e9da0b589a

[CL 23804386 by cedric caillaud in ue5-main branch]
2023-01-21 19:00:44 -05:00
michael bao
31ca957aa6 add option to enable/disable adding strain to geometry collection clusters upon collisions
- also fixed issue where changing the SetNotifyX (break, crumbling, etc) on a geometry collection component wouldn't set the simulation parameter on the physics proxy.

#preflight 63c82b8f0225f00e142761e0
#rb cedric.caillaud

[CL 23804265 by michael bao in ue5-main branch]
2023-01-21 18:25:47 -05:00
cedric caillaud
8a4fa3f1b3 GeometryCollection runtime optimizations
- make sure we do properly reset the dirty flag on the dynamic collection when scene proxy is not set
- fix condition that could lead to run part of the Tick function too many time when the collection is not dirty

#rb benn.gallagher, vincent.robert
#preflight 63c77c7902024f93d89aa3fb

[CL 23757059 by cedric caillaud in ue5-main branch]
2023-01-18 11:28:41 -05:00
cedric caillaud
c03e14a00b Geometry collection : Added max level support to anchoring by box BP functions
#rb none
#preflight 63c74ec87763631ba16f2987

[CL 23751616 by cedric caillaud in ue5-main branch]
2023-01-17 22:29:08 -05:00
frederic doll
265c956172 Add option in GeometryCollectionComponent to skip UpdateNavigation in Tick and return simplifed collision for navigation data
#rb cedric.caillaud
#preflight 63c748790d3880eb5b907102

[CL 23751605 by frederic doll in ue5-main branch]
2023-01-17 22:28:58 -05:00
cedric caillaud
fccef7ce77 GeometryCollection : add extra parameters to SetNotofyCrumblings
#rb none
#preflight 63c71f91540f8e1937702783

[CL 23748344 by cedric caillaud in ue5-main branch]
2023-01-17 18:48:18 -05:00
michael bao
ead067551e geometry collections should immediately add itself to the external acceleration structure
For large scenes, it may take multiple seconds (if not longer) for a geometry collection to show up in the external acceleration structure causing it to be ignored by movement sweep checks (and others). This is because the geometry collection relies on the internal -> external acceleration structure copy which may take awhile to complete. The single particle physics proxy (i.e. static meshes) will add itself manually to the external acceleration structure in FInitBodiesHelperBase::InitBodies via FChaosScene::AddActorsToScene_AssumesLocked.

#preflight 63bdbdadc45a2c81e01b5813
#rb vincent.robert

[CL 23634458 by michael bao in ue5-main branch]
2023-01-10 17:13:41 -05:00
cedric caillaud
066eaccac2 Chaos : fix geometry collection replication failing because the client side component has a authority local role when physics state is being created
#rb brice.criswell
#preflight 639cc77f43330e63e5dbf448
#jira UE-168755

#p4v-cherrypick 22823592

[CL 23542689 by cedric caillaud in ue5-main branch]
2022-12-16 17:59:26 -05:00
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