Strange weightMap/boneBinding behavior in 4.5.1.56 and later

shoei321shoei321 Posts: 113

I have a utility that creates basic figures with bones and geometry dynamically through SDK calls. Prior to 4.5.1.56 everything worked fine, but now the weight maps on the bones in these figures don't appear to have any effect on the geometry. The geometry bound to the bones in the figure collapses down to the local origin of the figure.

Interestingly, if I select one of the figure's bones and manipulate it (scale/rotate/etc), for the duration of the manipulation the geometry does get properly applied to the skeleton. However as soon as I let go of the mouse button it collapses back down to the figure's origin.

Another interesting data point -- figures created by the same utility in pre-4.5.1.56 DAZ Studio that were saved and then loaded in 4.5.1.56+ work just fine. It is only new figures created in 4.5.1.56+ that exhibit this problem. This suggests to me that there is something in how I'm creating these figures that isn't working properly in 4.5.1.56+.

The basic routine for the figure creation is this :


// Create a bone, add to figure
DzBone *bone = new DzBone();
bone->setName("newBone");
dzScene->addNode(bone);
figure->addNodeChild(bone, true);

// Create the BoneBinding and WeightMap
DzBoneBinding *bb = new DzBoneBinding();
bb->beginEdit();
bb->setName("New Bone Binding");

DzWeightMap *wMap = new DzWeightMap(numVerts, "new WeightMap");
for (int i = 0; i < numVerts; i++) {
  // set weightmap values
  wMap->setWeight(k, DzWeightMap::floatToWeight(someValue));
}

bb->setWeights(wMap);
bb->setFigure(figure);
bb->setBone(bone);
bb->finishEdit();

figure->getSkinBinding()->addBoneBinding(boneBinding));

Any ideas here? Has anything changed in 4.5.1.56 related to bone bindings/weightmaps/etc?

Thanks!

Comments

  • Richard HaseltineRichard Haseltine Posts: 100,888
    edited December 1969

    What setting do you have in the Tool Settings pane for Skin Binding under During Manipulation?

  • shoei321shoei321 Posts: 113
    edited December 1969

    The default seems to be Optimized. When I manipulate a bone with it set to Optimized I see the skin get drawn properly during the manipulation, then collapses once the manipulation stops.

    If I change the Skin Binding option to Full then the skin never gets drawn properly, even while manipulating.

    I'm not sure what Optimized vs Full skin binding is, but it appears that my figure draws correctly when in Optimized mode but no in Full mode.

  • shoei321shoei321 Posts: 113
    edited December 1969

    Any thoughts on this? Can someone explain what the Skin Binding setting is actually controlling? My bone bindings and weightmaps appear to work fine in Optimized mode, but not in Full mode. Is this something that can be controlled through the SDK?

    Thanks

Sign In or Register to comment.