Commit Graph

2 Commits

Author SHA1 Message Date
Alex McAdams
71f140457e Reduce number of bad weights in SkinnedLevelSet that cause "spikes". These spikes are caused by vertices getting small weights that get renormalized to large weights, in particular because for some reason the largest influence is not set.
Firstly, improve the dirichlet weights on the surface when doing the poisson diffusion by only considering vertices with non-zero weights for the closest point calculation. Before, it was possible to get zero weights because the triangle mesh includes any triangle with non-zero weights.

Secondly, when renormalizing weights, set a higher threshold (0.1) for discarding weights.

Also added debug draw of the weights.

#preflight 63f941e4ae54ee4ce9209426

[CL 24426752 by Alex McAdams in ue5-main branch]
2023-02-27 12:48:21 -05:00
Alex McAdams
613b0638b9 Add Skinned Level Set Physics type.
This adds a new Chaos Implicit Object TWeightedLatticeImplicitObject which can wrap any (bounded) rigid implicit object with a weighted lattice. The lattice deforms via Linear Blend Skinning and is used to approximate deformation of the wrapped rigid implicit object.

A new physics asset FKShapeElem type has been added: the FKSkinnedLevelSet which holds a TWeightedLatticeImplicitObject<FLevelSet>. The PhysicsAssetEditor has been updated to generate this for skeletal meshes. Skinned level sets can be generated from a subset of bones in the skeletal mesh. Weights are transferred by Poisson diffusing weights on the surface to the volumetric lattice points.

There is limited debug draw and the asset generation workflow likely will need iteration.

#preflight 63d9b7f48505ea6b1fd4abb4
#rb kriss.gossart

[CL 23950693 by Alex McAdams in ue5-main branch]
2023-02-01 12:00:49 -05:00