Am I asking too much of single-precision floats?
When the root of a skeleton transformed using the following code is only 3000 units from the origin, I am seeing very noticeable errors, where the meshes all jitter and shake with respect to one another.
I reduced most of the errors in my smooth skinning by applying the large root transform after the rest of the skeleton was already computed. Is this what I should be doing for my rigid ‘skinning?’
Granted, I’m starting from rather crappy data where things are modeled in millimeters but the world space ranges in the thousands of meters.
I also have a small near clip plane, but increasing it shows that it’s not a z-fighting problem.
for( unsigned int i = 0; i < skin->joints.size(); ++i ) {
RigidJoint *joint = skin->joints[i];
Mat34 modifier;
if( joint->parent ) {
modifier = joint->bindmat * joint->modifier;
joint->currentMat = joint->parent->currentMat * modifier;
}
else {
modifier = joint->modifier * joint->bindmat;
joint->currentMat = modifier;
}
}