Commit Graph

251 Commits

Author SHA1 Message Date
arciel rekman
4c3e0b8db3 Fix inability to cook spline meshes by a cooked cooker (resubmit after backout in CL 30847866).
Cooked cooker is a relatively new platform in Unreal that allows producing a cooked editor build and using it to cook new assets (e.g. DLC for the base game). Such cooked cooker build is faster to load than the original editor build that would cook from the source assets, and it can also be more easily deployed to cloud environments.

The problem this fix is solving is as follows:

1) Spline mesh needs collision data from the static mesh it deforms. This collision data is usually derived from its render data.
2) Cooked cooker target platform (see TCookedCookerTargetPlatform) is basically a server build, assets cooked for this platform do not store render data.
3) If a new (uncooked) spline mesh is referencing a static mesh from the base build, it fails to get its collision data because the render data was stripped when producing the cooked version of the base build.

The solution is

- to introduce a new target platform feature that allows to distinguish cooked cooker target platform from other platforms that strip audio-visual data.
- when cooking static meshes for a "cooked cooker" target get a separate copy of the asset's collision data and save it inline in the cooked asset.
- inside the cooked cooker, use this copy as static mesh's collision data instead of trying to derive it from (non-existent at that point) static mesh's render data.

- James Singer reviewed the fixed change.

#rb Brian.Marshall1, Francis.Hurteau, Benn.Gallagher, James.Singer

[CL 30857184 by arciel rekman in ue5-main branch]
2024-01-24 14:43:39 -05:00
sean boocock
1229fccd3c [Backout] - CL30812030
[FYI] Arciel.Rekman
Original CL Desc
-----------------------------------------------------------------
Fix inability to cook spline meshes by a cooked cooker.

Cooked cooker is a relatively new platform in Unreal that allows producing a cooked editor build and using it to cook new assets (e.g. DLC for the base game). Such cooked cooker build is faster to load than the original editor build that would cook from the source assets, and it can also be more easily deployed to cloud environments.

The problem this fix is solving is as follows:

1) Spline mesh needs collision data from the static mesh it deforms. This collision data is usually derived from its render data.
2) Cooked cooker target platform (see TCookedCookerTargetPlatform) is basically a server build, assets cooked for this platform do not store render data.
3) If a new (uncooked) spline mesh is referencing a static mesh from the base build, it fails to get its collision data because the render data was stripped when producing the cooked version of the base build.

The solution is

- to introduce a new target platform feature that allows to distinguish cooked cooker target platform from other platforms that strip audio-visual data.
- when cooking static meshes for a "cooked cooker" target get a separate copy of the asset's collision data and save it inline in the cooked asset.
- inside the cooked cooker, use this copy as static mesh's collision data instead of trying to derive it from (non-existent at that point) static mesh's render data.

#rb Brian.Marshall1, Francis.Hurteau, Benn.Gallagher

[CL 30847941 by sean boocock in ue5-main branch]
2024-01-24 11:44:40 -05:00
sergio gardeazabal
394d9ac363 [ChaosVD] Adding Scene Queries recording support
- Created CVD Macros to trace the three scene query types we have in all their modes
- Create CVD data wrappers for scene queries related data
- Added support to debug draw implicit objects in CVD directly (without creating a mesh)
- Created a new Scene Query Data inspector. This is a custom details panel which will show the data for any selected query in the viewport


#jira UE-193754, UE-203452, UE-203451, UE-193755
#rb Benn.Gallagher

[CL 30821555 by sergio gardeazabal in ue5-main branch]
2024-01-23 17:46:17 -05:00
arciel rekman
7cd1420836 Fix inability to cook spline meshes by a cooked cooker.
Cooked cooker is a relatively new platform in Unreal that allows producing a cooked editor build and using it to cook new assets (e.g. DLC for the base game). Such cooked cooker build is faster to load than the original editor build that would cook from the source assets, and it can also be more easily deployed to cloud environments.

The problem this fix is solving is as follows:

1) Spline mesh needs collision data from the static mesh it deforms. This collision data is usually derived from its render data.
2) Cooked cooker target platform (see TCookedCookerTargetPlatform) is basically a server build, assets cooked for this platform do not store render data.
3) If a new (uncooked) spline mesh is referencing a static mesh from the base build, it fails to get its collision data because the render data was stripped when producing the cooked version of the base build.

The solution is

- to introduce a new target platform feature that allows to distinguish cooked cooker target platform from other platforms that strip audio-visual data.
- when cooking static meshes for a "cooked cooker" target get a separate copy of the asset's collision data and save it inline in the cooked asset.
- inside the cooked cooker, use this copy as static mesh's collision data instead of trying to derive it from (non-existent at that point) static mesh's render data.

#rb Brian.Marshall1, Francis.Hurteau, Benn.Gallagher

[CL 30812215 by arciel rekman in ue5-main branch]
2024-01-23 13:58:58 -05:00
chris caulfield
55beea5fe8 Chaos - sleeping fixes and behaviour improvement
- add debug draw to visualize sleep state
- implement SleepFamily system that was missing from Chaos (SleepThesholdMultiplier)
- SetV and SetW now wakes particles
- reduced default velocity smoothing used by sleep thresholds
- fix smoothed velocity for particles in awake islands (minor issue that made it slightly harder to go to sleep)
- don't use smoothed velocity for floating particles
- system top alloe reduced sleep thresholds for floating particles (cvar controlled, disable dby default)

#rb benn.gallagher

[CL 30608421 by chris caulfield in ue5-main branch]
2024-01-12 19:37:04 -05:00
steve robb
55b3e27329 Replaced CONSTEXPR with constexpr.
[CL 30503197 by steve robb in ue5-main branch]
2024-01-09 08:46:46 -05:00
jaco vandyk
26c9c77aa7 Detect and ignore any dangling handles in the acceleration structures
#rb Benn.Gallagher
#[fyi] Benn.Gallagher, Vincent.Robert


#tests HeadlessChaos Juno general

[CL 30322106 by jaco vandyk in ue5-main branch]
2023-12-14 11:20:42 -05:00
vincent robert
7f353a6ace Fix accessing deleted proxy when dispatching events
#rb cedric.caillaud

[CL 29993523 by vincent robert in ue5-main branch]
2023-11-29 13:25:49 -05:00
benn gallagher
2d111770bf Fixed physics scene pending tasks causing hangs when dispatched during world shutdown
#rb Cedric.Caillaud

[CL 29662059 by benn gallagher in ue5-main branch]
2023-11-10 18:44:55 -05:00
jaco vandyk
33813433dc The Acceleration structure Async task in Evolution will now Cancel if it did not have a chance to run before destruction
Solves:
Editor Soft-Locks at end of MRQ Render
#rb Benn.Gallagher
#jira UE-191073

[CL 29542061 by jaco vandyk in ue5-main branch]
2023-11-07 19:09:17 -05:00
marc audy
c3eef33523 Deprecate PhysXIncludes and NvClothIncludes.h
[CL 29431392 by marc audy in ue5-main branch]
2023-11-03 19:34:54 -04:00
sergio gardeazabal
5eae9be4f8 [Chaos] Removing the need to create a temp TArray when calling FPhysicsObjectExternalInterface::LockRead with a single object.
This reduces memory allocations/deallocations done by that array, which can add up when a lot of calls are made.

[REVIEW] michael.bao

[CL 28947240 by sergio gardeazabal in ue5-main branch]
2023-10-19 20:58:29 -04:00
chris caulfield
8c608be937 Chaos - support per-particle InitialOverlapDepenetrationVelocity
- remove the now-superfluous on/off flag

This connects FBodyInstance::MaxDepenetrationVelocity (previously unused in Chaos) to InitialOverlapDepenetrationVelocity on rigid particles.

#rb benn.gallagher

[CL 28823891 by chris caulfield in ue5-main branch]
2023-10-16 19:00:25 -04:00
chris caulfield
379f26a007 Chaos - fix FChaosEngineInterface::SetGlobalPose_AssumesLocked for kinematics
Set the kinematic target in SetGlobalPose so that this is a teleport and velocity reset for kinematics as intended (if a teleport is not desired, the user should be calling SetKinematicTarget, not SetGlobalPose). Previously there could be problems with interpolation in async physics.

#jira UE-196442
#rb cedric.caillaud

[CL 28665908 by chris caulfield in ue5-main branch]
2023-10-11 11:25:36 -04:00
chris caulfield
78f9c2a427 Add a flag to BodyInstance to enable/disable the initial-overlap depenetration system on a per-body basis.
#rb benn.gallagher

[CL 28479005 by chris caulfield in ue5-main branch]
2023-10-04 18:12:30 -04:00
chris caulfield
0970048e1b Chaos - add show queryonly, simonly, probeonly options to debugdraw
#rb cedric.caillaud

[CL 28303060 by chris caulfield in ue5-main branch]
2023-09-27 20:12:09 -04:00
brandon schaefer
253cb99625 AutoRTFM-ifi some missing modules
Add missing std lib calls to auto open

#rb Michael Nicolella

[CL 28205907 by brandon schaefer in ue5-main branch]
2023-09-25 17:12:18 -04:00
bill henderson
fb5a35d90c Enabling Object interface with suspension constraint.
Using Constraint Suspension on modular vehicles

#rb Michael.Bao

[CL 28079045 by bill henderson in ue5-main branch]
2023-09-21 04:14:21 -04:00
michael forot
07d641f8e9 Convex shapes simplification
#rb chris.caulfield, cedric.caillaud
#jira UE-191748, UE-193615, PLAY-6863

[CL 27995506 by michael forot in ue5-main branch]
2023-09-19 10:42:54 -04:00
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