Digital Art Zone

 
     
Strange weightMap/boneBinding behavior in 4.5.1.56 and later
Posted: 24 April 2013 10:19 AM   [ Ignore ]
Member
Rank
Total Posts:  54
Joined  2010-09-22

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(bonetrue);

// 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 0numVertsi++) {
  
// set weightmap values
  
wMap->setWeight(kDzWeightMap::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!

 

Profile
 
 
Posted: 24 April 2013 12:12 PM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  14317
Joined  2003-10-09

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

 Signature 

DAZ Studio Frequently Asked Questions

Index of free DAZ Studio scripts and plugins list

Profile
 
 
Posted: 24 April 2013 12:17 PM   [ Ignore ]   [ # 2 ]
Member
Rank
Total Posts:  54
Joined  2010-09-22

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.

Profile
 
 
Posted: 27 April 2013 08:07 AM   [ Ignore ]   [ # 3 ]
Member
Rank
Total Posts:  54
Joined  2010-09-22

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

Profile