I’m having trouble replicating Blender bone animation in my game.
Bones that have a vertical rest position (Euler(PI / 2, 0, 0)) are animated correctly (e.g. head, neck, torso, legs, shins), however bones that have horizontal rest positions (e.g. hips, shoulders, arms) appear slightly off.
I export each bone’s rotation Euler value at each frame and reconstruct the rotation matrices in game. (exporting matrix values at each frame results in a larger file size)
I tried exporting quaternion values instead, but the resulting animation looked exactly the same.
I have successfully imported the model’s resting mesh position and resting bone position. The issues happen during animation.
In Blender, the model’s rest position is:
At a certain frame in Blender the model looks like this:
At the same frame in-game, the model looks like this:
As you can see, the hip bones are at more of a downward angle, and the “L.Shoulder” bone is at more of a downward angle.
The matrix I use to rotate each bone in-game is:
Matrix4.CreateTranslation(-bone.head) * Matrix4.CreateXYZRotation(-bone.restingRotation) * Matrix4.CreateXYZRotation(bone rotation at frame X) * Matrix4.CreateTranslation(bone.parent.tail)
I obtain each bone’s resting Euler rotation by decomposing PoseBone.bone.matrix_local, and obtain each bone’s animated Euler rotation by decomposing PoseBone.matrix:
The commands above were run at the same frame as the images of the animated model. The resting Euler rotation of the right shoulder is similar to that of the left shoulder, however the animated Euler rotations are quite different.
The roll of the L.Shoulder bone is -14 degrees, and the roll of the R.Shoulder bone is 14 degrees.
Any help with this would be greatly appreciated.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!