Commit Graph

225 Commits

Author SHA1 Message Date
vincent robert
f5a2caa9c3 Swap events double buffer on the game thread.
#rb cedric.caillaud

[CL 26445279 by vincent robert in ue5-main branch]
2023-07-18 16:11:02 -04:00
vincent robert
162b18e29a Fix missing event bug
Physics Thread is swapping the event double buffer every step, but the Game Thread has not necessarily read the data from the buffer. So the Game Thread was missing some events.
[FYI] cedric.caillaud

[CL 26361431 by vincent robert in ue5-main branch]
2023-06-30 21:47:40 -04:00
henrik karlsson
5db685f97d [Engine]
* Moved dllexport from type to methods/staticvar in all Engine runtime code. This improves compile times, memory and performance in dll builds

[CL 26082269 by henrik karlsson in ue5-main branch]
2023-06-17 18:13:06 -04:00
henrik karlsson
541c9938bd [Engine]
* Moved dll export from type to methods/static variables. This is changelist is produced by a script and contains 900+ files.

#rb none

[CL 25898513 by henrik karlsson in ue5-main branch]
2023-06-09 13:36:39 -04:00
marc audy
9c6637c501 introduce new external context safe payload that can be used for chaos acceleration structures - revamp SQ interfaces a bit to be able to accept additional types of SQ overrides
- cluster union acceleration structure is now safe even when a child physics state is destroyed

#rb jaco.vandyk, vincent.robert, benn.gallagher
#preflight 646be970b82cb3fe678098cc

[CL 25645285 by marc audy in ue5-main branch]
2023-05-26 12:18:38 -04:00
michael bao
232859631d add cvar (ClusterUnion.UseAccelerationStructure, default false for now) to add an acceleration structure to the cluster union component that'll be used for component level sweeps/raycasts/overlaps
- Modified all the low-level overlap/raycast/sweep functions to take in an optional acceleration structure override pointer.
- Converted GeomSweepSingle into a template function similar to GeomSweepMulti and GeomOverlapMulti.
- Added template specializations to take in FPhysicsGeometry for GeomSweepSingle, GeomSweepMulti, and GeomOverlapMulti.
- Added override for FChaosEngineInterface::GetGeometryCollection to take in a FPhysicsGeometry.
- Also changed the cluster union to remove the primitive component from it if the primitive component's physics state is destroyed

#rb benn.gallagher, cedric.caillaud, jaco.vandyk
#preflight 64653a88c34c2e1212aff4c0

[CL 25518722 by michael bao in ue5-main branch]
2023-05-17 19:11:33 -04:00
kirill zorin
de8db5ff76 Converting ARO-facing raw pointers to TObjectPtr ahead of raw pointer ARO API deprecation.
#rb zousar.shaker
#rb markus.breyer
#rb robert.manuszewski

#preflight 646391406b1406b54ab15460

[CL 25489627 by kirill zorin in ue5-main branch]
2023-05-16 10:52:49 -04:00
benn gallagher
0f1b41d09a Chaos: Add stat ID to async callbacks to better identify which callbacks are running and for how long during callback application pre-simulate
#rb cedric.caillaud
#preflight 645d4fab8e01daf0e53715a5

[CL 25445694 by benn gallagher in ue5-main branch]
2023-05-12 07:41:52 -04:00
jaco vandyk
accf305256 Chaos Physics Update/Add preparation for future work.
No functional changes as of yet.
Acceleration structure command buffers will now include Add/Update/Delete instead of just Update and Add to prevent accidental updates of deleted objects causing dangling references.
Update and Add commands will be handled identically for the time being until everything that uses this API is audited to use the correct commands.

#rb Vincent.Robert
#[fyi] Benn.Gallagher, Chris.Caulfield
#preflight 644b937109453df548006e31

[CL 25238825 by jaco vandyk in ue5-main branch]
2023-04-28 15:58:10 -04:00
cedric caillaud
893a5ea0f1 Chaos : add strength to chaos physics material and wire it to the high level engine physics material
#rb steven.barnett, chris caulfield
#preflight 644ae1f3401d328ad9d171b1

[CL 25238017 by cedric caillaud in ue5-main branch]
2023-04-28 15:34:17 -04:00
danny chapman
2726796297 Support kinematics with async physics by adding a UpdateKinematicFromSimulation flag to BodyInstance. Defaults to false, so no change in default behaviour, unless using PhysicsControlComponent
#rb chris.caulfield
#jira UE-167442
#preflight 644aabea09453df5486f14d3

[CL 25218769 by danny chapman in ue5-main branch]
2023-04-27 13:26:51 -04:00
Steve Robb
74fef9e644 Fixed mismatched copy constructor/assignment operator in FPhysicsShapeReference_Chaos.
#rb none
#jira none
#preflight none

[CL 25177751 by Steve Robb in ue5-main branch]
2023-04-25 06:10:54 -04:00
michael bao
5bb6024196 [Backout] - CL25109123
[FYI] jaco.vandyk
Original CL Desc
-----------------------------------------------------------------
Chaos Physics crash fix: Distinguish between updating and adding thing in the acceleration structures

#rb Vincent.Robert
#[fyi] Benn.Gallagher, Chris.Caulfield

[CL 25149450 by michael bao in ue5-main branch]
2023-04-21 14:02:31 -04:00
jaco vandyk
f699fa132e Chaos Physics: Distinguish between updating and adding thing in the acceleration structures
#preflight 643ff84b8d0bcde49c488910

[CL 25109978 by jaco vandyk in ue5-main branch]
2023-04-19 13:05:19 -04:00
sergio gardeazabal
d907da5d37 [Chaos VD] Implemented Recording using Trace
- Created a set of macros to trace data about Solver Frames, Solver Steps, and Solver Particles on Rigid Solvers and RBAN solvers
- Added a way to have the context between CVDTrace calls to know which solver started the call on a determined solver step or particle without having to copy that information to every object

#rb benn.gallagher
#jira UE-181330
#preflight 643d9d4c0a5a4b944e348487

[CL 25077633 by sergio gardeazabal in ue5-main branch]
2023-04-17 18:20:36 -04:00
michael bao
17a2c641dc utilize the FaceNormal in the sweep even when we hit implicit objects without a face index
#rb chris.caulfield, benn.gallagher
#preflight 6410bc825819afacafbe06f2

[CL 24646646 by michael bao in ue5-main branch]
2023-03-14 18:59:03 -04:00
cedric caillaud
1186387da9 Chaos Physics : add material strength to the physical material
- also deprecate the DestructibleDamageThresholdScale porperty as it is not used anymore

#rb steven.barnett
#preflight 640fbf380e1f02786b0b2f55

[CL 24645246 by cedric caillaud in ue5-main branch]
2023-03-14 17:35:39 -04:00
michael bao
db4158ae25 make the physics object interface usable with const handles
[FYI] steven.barnett
#preflight 640a80a328026468d9011101

[CL 24587565 by michael bao in ue5-main branch]
2023-03-09 22:25:31 -05:00
michael bao
3456f5564e move ChaosSQTypes from PhysicsCore to Chaos
#rb chris.caulfield
#preflight 64097c6d6d06d9a14299b17b

[CL 24583916 by michael bao in ue5-main branch]
2023-03-09 17:33:48 -05:00
michael forot
564045d020 [Backout] - CL24489307
[FYI] nat.parkinson
Original CL Desc
-----------------------------------------------------------------
[Backout] - CL24480805 to resolve compile error
[FYI] Michael.Forot
Original CL Desc
-----------------------------------------------------------------
Network physics for vehicles

#rb bill.henderson
#preflight 63ff6e32f43e53f68127e521

[CL 24499687 by michael forot in ue5-main branch]
2023-03-03 11:22:01 -05:00
nat parkinson
98d04ec328 [Backout] - CL24480805 to resolve compile error
[FYI] Michael.Forot
Original CL Desc
-----------------------------------------------------------------
Network physics for vehicles

#rb bill.henderson
#preflight 63ff6e32f43e53f68127e521

[CL 24493661 by nat parkinson in ue5-main branch]
2023-03-02 20:26:46 -05:00
michael forot
0fa9892ced Network physics for vehicles
#rb bill.henderson
#preflight 63ff6e32f43e53f68127e521

[CL 24484224 by michael forot in ue5-main branch]
2023-03-02 12:12:37 -05:00
michael bao
dbef836cd6 add the cluster union physics proxy to properly marshal data for them between the game thread and physics thread as well as the game thread actor/component to make cluster unions server authoritative
- Modified the FPhysicsSolverBase::PullPhysicsStateForEachDirtyProxy_External to take in a struct that can be used to statically dispatch the appropriate action per proxy type instead of needing to add a new lambda for each new proxy type.

#preflight 63fcfda5437ce3e7f33acd55
#rb todd.eckert, chris.caulfield

[CL 24432721 by michael bao in ue5-main branch]
2023-02-27 16:43:09 -05:00
jaco vandyk
77eeff782a Move the QueryOnly Physics objects into its own acceleration structure
Make sure that it does not get included in the physics thread.

#rb Vincent.Robert
#preflight 63f719d19b26c4957efd4f39

[CL 24377687 by jaco vandyk in ue5-main branch]
2023-02-23 05:05:35 -05:00
joe kirchoff
d5a5a356b9 Remove unnecessary Public and Private entries for the current module being added to PublicIncludePaths or PrivateIncludePaths
#rnx
#jira UE-177808
#preflight 63f3fb8c90198dffba00cc27

[CL 24331758 by joe kirchoff in ue5-main branch]
2023-02-20 20:22:44 -05:00