Commit Graph

120 Commits

Author SHA1 Message Date
Alex McAdams
df4a68160c Cloth: Add new SelfCollisionSpheres to legacy skeletal mesh cloth assets.
I have deprecated the existing array SelfCollisionIndices (they're unused now that apex cloth is no longer supported) on the ClothPhysicalMeshData for a new Set SelfCollisionVertexSet, but it's built in the same way.

#rb kriss.gossart

[CL 28328000 by Alex McAdams in ue5-main branch]
2023-09-28 16:36:33 -04:00
kriss gossart
9cd58af11a Cloth - Added a skeletal mesh component velocity scale property to reduce the component induced velocities on all its cloths. This also replaces the bLocalSpaceSimulation property that was used with Chaos Cloth and had been deprecated.
#rb Nick.Brett

[CL 28127643 by kriss gossart in ue5-main branch]
2023-09-22 05:34:55 -04:00
kriss gossart
e8ee6c7c01 Cloth - Fixed an edge case when adding clothing data from a different skeletal mesh asset crashes, due to recalculating the reference bone index in legacy assets without having the correct bone mapping.
#rb Rinat.Abdrashitov
#jira UE-189612
#rnx

[CL 26464856 by kriss gossart in ue5-main branch]
2023-07-19 13:23:31 -04:00
kriss gossart
6735b2082f Chaos Cloth - Fixed the shared config outer ownership when adding cloth assets from another skeletal mesh.
#rb Alex.McAdams

[CL 26457380 by kriss gossart in ue5-main branch]
2023-07-19 08:19:48 -04:00
kriss gossart
43c9781787 Cloth - Fixed a crash in the skeletal mesh cloth painting tool caused by invalid bone mapping indices after importing an existing cloth onto a different skeleton.
#rb Rinat.Abdrashitov
#jira UE-185119

[CL 26428497 by kriss gossart in ue5-main branch]
2023-07-18 05:19:18 -04:00
kriss gossart
7681367a90 Chaos Cloth - Fixed the skinning/simulation vertex contributions on the render mesh by passing the correct MaxDistance weight map.
#rb Rinat.Abdrashitov
#jira UE-186979
#rnx

[CL 26348439 by kriss gossart in ue5-main branch]
2023-06-30 13:26:26 -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
Alex McAdams
855ad419c0 ClothCollection Schema rework. Existing cloth assets will be emptied, but their associated Dataflow graphs and nodes are still valid (with the exception of AddWeightMapNodes which need to be repainted because indexing has changed).
The topline changes are:

* No more Lods in the collection. Instead, have one collection per Lod in the ClothAsset.
* Separate SimPatterns and RenderPatterns. SimPattern = contiguous 2D island. RenderPattern = SkeletalMeshSection (single material)
* Separate 2D and 3D sim vertices. 2D vertices are unwelded patterns. 3D vertices are welded. Welding and bookkeeping is handled by the new FCollectionClothSeamFacade
** Most sim vertex data live on 3D vertices since that is how they will be consumed by the solver.
** Weight maps live on 3D vertices. Cloth paint tool has been updated to show welded 2D values changing together when in 2D mode.
* Tethers are now stored on their dynamic node as SimVertex3D data. They are batched at the end when generating the final asset. (This is because seaming after tether creation could generate invalid batches)

Callouts for a few features NOT included in the CL that will need to be done in the future. They were not implemented in the previous version either, so no loss of functionality, but they need to be implemented for completeness:
* SkeletalMeshImport as sim mesh. We're now requiring that SimPatterns are 2D islands, so need to possibly generate multiple SimPatterns.
* Multiple LODs not fully supported. Missing Up and Down transition data as well as handling property collection per LOD at the solver level.

Features not implemented because we lack DataflowNodes to make these construction changes, but will need to be implemented
* Ability to remove seams and split the associated 3D vertices.
* Cleanup/compactify 2D and 3D sim vertices if only 2D or only 3D vertices are removed.

#preflight 6470edd7da61f7b079459e52
#rb kriss.gossart

[CL 25783019 by Alex McAdams in ue5-main branch]
2023-06-03 19:33:19 -04:00
bryan sefcik
da92084a12 Optimized out more private modules includes and dependencies.
#preflight 64627c382965f6ea8ea83bd6

[CL 25479683 by bryan sefcik in ue5-main branch]
2023-05-15 16:26:12 -04:00
Alex McAdams
cd0aa4393c ChaosClothAsset: Add tethers (long range attachments).
Several parts to this:

* Add new CollectionClothTetherBatchFacade for tethers at the cloth collection level. The fields already existed in the schema, so it was just a matter of adding the right methods to the facade.
* Add ability to generate tethers for cloth collection data. This was added to a new utility "ClothEngineTools" (rather than ClothGeometryTools because it has an Engine dependence by reusing the existing ClothTetherData).
* Add creating tethers as part of the default sim config node
* Create new atomic Long Range Attachment sim config node
* Add ClothTetherData to the FChaosClothSimulationLodModel and populate it from the cloth collection
* Access ClothTetherData via the ClothSimulationMesh. NOTE: there is only one type of tether data stored on the new  cloth assets, so the request for geometric vs euclidean tethers is unused.

Also had to add a PostSerialize to the CollectionClothFacade that is run on the ClothAsset to fixup old assets with corrupted tether data.

At Kriss's request, I also deprecated the use of TetherMode in favor of a simple bool bUseGeodesicTethers everywhere.

#preflight 645eb888cf788a255880582b
#rb kriss.gossart

[CL 25479149 by Alex McAdams in ue5-main branch]
2023-05-15 15:57:08 -04:00
robert millar
d9b4700aa0 Markup up native serializers for object ref archives
#rb none

[CL 25415965 by robert millar in ue5-main branch]
2023-05-10 16:34:18 -04:00
Steve Robb
bde3de5924 Fixed mismatched copy constructor/assignment operator in ClothingMeshUtils::FVertexParameterMapper.
#rb none
#jira none
#preflight none

[CL 25198656 by Steve Robb in ue5-main branch]
2023-04-26 11:04:31 -04:00
Alex McAdams
7459095f1f Fix ClothSimulation cache data deprecation warnings when building with clang.
#preflight 6430874f2855180717c59785
#rb trivial

[CL 24970915 by Alex McAdams in ue5-main branch]
2023-04-07 17:49:09 -04:00
kriss gossart
c68a94979e Chaos Cloth - Fixed crash when undoing mask targets.
#rb Benn.Gallagher
#preflight 642414e1e11ce5214f74f665
#jira UE-181338

[CL 24849421 by kriss gossart in ue5-main branch]
2023-03-29 21:27:47 -04:00
Alex McAdams
8b49aa50c0 Chaos Cloth: record reference space transform for correct playback.
Since Chaos Cloth caches are now read in two places (SkeletalMeshComponentCacheAdapter and ClothComponentCacheAdapter), I created a few new structs to share code.
ClothingSimulationCacheData holds cache data that is read for the associated context.
ChaosClothingCacheSchema reads and writes cache data.

We need to write the ReferenceSpaceTransform as part of caching and then to read it back and set it.
Additionally, I'm now only writing the particles that have been simulated (namely other LOD particles will no longer be cached).

ChaosCache has been updated to be able to store named transforms (rather than just per-particle transforms)

Existing cloth caches will continue to work. They simply don't have the transform data.

#preflight 63f02662977ceed915637592
#rb michael.forot kriss.gossart

[CL 24318632 by Alex McAdams in ue5-main branch]
2023-02-20 13:00:25 -05:00
steve robb
7344868693 Deprecated TAreTypesEqual and ARE_TYPES_EQUAL.
#rb robert.manuszewski
#preflight 63bea04ac543a64b7d304c46

[CL 23651053 by steve robb in ue5-main branch]
2023-01-11 14:28:59 -05:00
kriss gossart
593ffac9c3 Cloth - Deprecate APEX collision from the ClothLODData structure.
#rb Benn.Gallagher
#preflight 63726df2b6636838286d0ccc
#jira none

[CL 23133965 by kriss gossart in ue5-main branch]
2022-11-15 06:25:00 -05: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
kriss gossart
892b1eb70c Cloth - Fixed a potential division by zero with a 0 delta time while setting up the context. Also the solver velocity scale is now set to 0 when any cloth teleport mode is activated to match the internal solver behavior.
#rb Benn.Gallagher
#preflight 634d69f7d737d61a2fefe0ae
#jira none

[CL 22652052 by kriss gossart in ue5-main branch]
2022-10-20 06:10:03 -04:00
Matt Peters
3b57fa2789 IncrementalCooking: Add DeclareConstructClasses for classes that need it. Fix some transient UObjects that assert they are never persistently serialized to support Serialize being called on their ClassDefaultObject to support DeclareCustomVersions.
#rb Zousar.Shaker
#rnx
#preflight 63497341f622f6c4bb1dd625

[CL 22529151 by Matt Peters in ue5-main branch]
2022-10-14 12:42:43 -04:00
kriss gossart
25cdb979d6 Chaos Cloth - Fix the velocity calculations when MaxPhysicsDelta kicks in.
- Add velocity debug draw.
- Draw aerodynamic forces in different colors depending on whether the particle is kinematic/dynamic.

#[rb Michael.Forot]
#[preflight 62bd89183f0d6beee282f026]
#[okforgithub public]
#[jira none]
[Edigrate CL 20895640]

#rb trivial
#preflight 6336bcd3e72271755f07f746
#jira UE-162974

[CL 22271819 by kriss gossart in ue5-main branch]
2022-09-30 11:41:20 -04:00
danny couture
ceda239238 Do not PreEditChange skeletal mesh while building in async task
#rb Alexis.Matte
#preflight none

[CL 22220668 by danny couture in ue5-main branch]
2022-09-28 08:43:51 -04:00
marc audy
311f7464bf Updated ../Engine/Source/Runtime/... to inline gen.cpp files
Before:
3648 unity files
Total CPU Time: 47886.140625 s
Total time in Parallel executor: 498.81 seconds

After:
3548 unity files
Total CPU Time: 46643.828125 s
Total time in Parallel executor: 486.06 seconds

#jira
#preflight

[CL 22173263 by marc audy in ue5-main branch]
2022-09-24 13:57:58 -04:00
bryan sefcik
cb0456c6d4 Cleaned up build.cs files by removing any include paths that were already being added by UBT. This was done to help identify how include paths are being added and to help with future refactoring.
#jira
#preflight 631a5c04967ffc68fbf0dd8f

[CL 21911226 by bryan sefcik in ue5-main branch]
2022-09-08 21:44:02 -04:00
Michael Forot
16994e043c Chaos cloth support for the chaos cache
#rb kriss.gossart
#jira none
#preflight 6303947ffa1ac183e5e8f152

[CL 21484267 by Michael Forot in ue5-main branch]
2022-08-22 11:19:48 -04:00