Commit Graph

232 Commits

Author SHA1 Message Date
danny chapman
b848218903 Clarify/fix handling of kinematics with the write-back from simulation, in particular when using the cvar SyncKinematicOnGameThread
#rb chris.caulfield

[CL 27873397 by danny chapman in ue5-main branch]
2023-09-14 06:07:30 -04:00
steve robb
da9f5a828a Replaced TChooseClass with std::conditional_t.
#rb none
#jira UE-195271

[CL 27816205 by steve robb in ue5-main branch]
2023-09-12 19:55:55 -04:00
steven barnett
ba608ec265 Add density to FPhysicsMaterial and use it for buoyancy
[CL 26926802 by steven barnett in ue5-main branch]
2023-08-08 15:22:55 -04:00
cedric caillaud
61000b99b1 Add damage modifier to physics material and an option in Geometry Collection asset to opt for it
#rb steven.barnett

[CL 26918152 by cedric caillaud in ue5-main branch]
2023-08-08 11:31:47 -04:00
jaco vandyk
f7cfdab382 UE-191196
- Zero length sweeps will now return correct normals and hit positions
- Overlaps can now return hit positions, and the normals will be in global space for all shape types

#rb Benn.Gallagher
[FYI] Tom.waterson
#jira UE-191196
[REVIEW] [at]Benn.Gallagher

[CL 26811848 by jaco vandyk in ue5-main branch]
2023-08-03 11:16:11 -04:00
steven barnett
944979e508 Add metric density to unit conversions. Use g/cm3 for physical material density.
#rb cedric.caillaud

[CL 26727986 by steven barnett in ue5-main branch]
2023-07-31 20:36:48 -04:00
michael forot
6e4094da3e Chaos implicit object ref counted ptr + union simple shapes (WIP)
#rb chris.caulfield

[CL 26722951 by michael forot in ue5-main branch]
2023-07-31 17:46:47 -04:00
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