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]
* 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]
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]
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]
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]
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]