|
I see a couple of issues here. One is that GetPolygonVertexCount is not guaranteed to be (and usually won’t be) the same result as GetControlPointsCount. Cluster weights correspond to control points and not polygon vertices directly. The second issue is that you’re not getting an accurate count of how many vertices are actually weighted, because clusters are likely to reference a single vert more than once in the event that the vert has multiple joint influences.
The appropriate way to handle skinning with deform clusters can be seen in examples\ViewScene\DrawScene.cxx. ComputeLinearDeformation is a good function to start with.
Author: RichWhitehouse
|