Hi,

I found where is the error, but I don't know how to solve it... I'm sending 
identity matrix to the 
computeMatrixPaletteUniform(geom.getMatrixFromSkeletonToGeometry(), 
geom.getInvMatrixFromSkeletonToGeometry()) all the time into  void 
operator()(osgAnimation::RigGeometry& geom). So in the shader the vertex are 
not positioned correctly.

This two variables are defined into this function:

Code:

void RigGeometry::computeMatrixFromRootSkeleton()
{
if (!_root.valid())
{
OSG_WARN << "Warning " << className() <<"::computeMatrixFromRootSkeleton if you 
have this message it means you miss to call buildTransformer(Skeleton* root), 
or your RigGeometry (" << getName() <<") is not attached to a Skeleton 
subgraph" << std::endl;
return;
}
osg::MatrixList mtxList = getParent(0)->getWorldMatrices(_root.get());
osg::Matrix notRoot = _root->getMatrix();
_matrixFromSkeletonToGeometry = mtxList[0] * osg::Matrix::inverse(notRoot);
_invMatrixFromSkeletonToGeometry = 
osg::Matrix::inverse(_matrixFromSkeletonToGeometry);
_needToComputeMatrix = false;
}




I guess there will be some error in the root matrix? That is the first bone of 
the skeleton...


Thank you!

Cheers,
Aitor

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=61959#61959





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to