The reason is to see this articleArticle:
Http://www.cnblogs.com/ixnehc/archive/2010/12/12/1903662.html
This section inspired me:
During the specific compression, we also adjusted the compression precision of different parts of the bones. The closer the root of the bones, the stricter the error restriction, to avoid the movements, the skeleton at the end of the skeleton (such as the wrist and ankle) can be relaxed.
Previously, the precision control was fixed:
Float Epsilon = Powf ( 0.1f , Static_cast < Float > (Config. Precision )); // Precision
ThereforeCodeChanged:
Int Depth = STD: min ( 10 , Getnodedepth (pbone ));
Const Float Maxprecision = Config. Precision - Min_precision + 1.2f ;
Float Factor = STD: max ( 1.0f , Maxprecision * ( 1.0f - 1.0f / Depth ));
Epsilon = Powf ( 0.1f * Factor, static_cast < Float > (Config. Precision )); // Precision
Optimizeskeletal (epsilon, bone. keyframes );
Note:
Getnodedepth is used to obtain the depth in the skeleton where the skeleton is located.
Maxprecision is used to control the maximum variation.
Factor controls the final precision. The larger the bone depth, the closer the factor is to maxprecision.
In this way, we can observe that maxprecision = 1.2 is a suitable value, and the animation will not be too affected. The final skeleton data can be reduced by about 0.2-0.5 (compared with the previous one ).