16-07-2021, 08:08 AM
(This post was last modified: 16-07-2021, 08:14 AM by josemendez.)
(15-07-2021, 02:48 PM)chris_stamati Wrote: You can see the error at the end. I used Burst backend and I installed all packages.
Will try to reproduce and provide a patch asap. Thanks!
(15-07-2021, 02:48 PM)chris_stamati Wrote: [....]because having a true simulation with obi colliders attached to all bones is too dangerous
...and expensive
(15-07-2021, 02:48 PM)chris_stamati Wrote: I need to figure out how to wrap the body with the shirt, skin it and then apply Obi skinned cloth to simulate it.
This is the feature that I need to implement. Since you are more experienced than me with this stuff could you give me some tips on how would you implement it, thanks!
The hardest part of this is skinning the cloth to the character's body at runtime, in an efficient way that also results in good enough skinning (generating the cloth from the skinned mesh is comparatively very easy). There's two feasible approaches for skinning that I can think of:
- Copy skin weights from the closest vertex in the body. This is conceptually simple and will work well if the amount of vertices in the body and the cloth is similar. You can either copy from the closest vertex in the body, or use a distance weighed average of the n closest vertices. To make this fast, you will have to put the body into some sort of spatial acceleration structure -grid or bvh, for instance- so that you don't need to check all body vertices for each cloth vertex (which would be quadratic cost).
- Use geodesic voxel skinning. This is the best entirely automatic skinning algorithm I've come across. The idea is to voxelize the volume occupied by the cloth mesh, then determine skin weights for each vertex by calculating the closest path from the vertex to each bone, traversing the voxel structure. You can think of this as bones emitting "heat" which gets diffused trough voxels, each vertex gets bound to the n "hottest" bones. Here's an article describing it:
http://www.delasa.net/data/sca2013_voxelization.pdf
I have a (working) rough implementation of this if you're interested.