It seams that the initial pose is wrong in some cases. In DBPro and fragMOTION my .X file loads and plays correctly, but it fails in DarkGDK.
Anybody does know something about that? I know, the play and loop functions are broken, too. But I just mean that the animation works in DBPro and not in DarkGDK.
Maybe installing an older version works??
Thank you for any help or workaround!!!
EDIT: I have tried older versions and the animations are NOT working.
EDIT: I think some matrix multiplication is wrong. Looks like the position vector from a matrix is used where it should not be used - or something. Hmm, much guesswork...
EDIT: For models, with a initial pose, that matches the first animation pose, the animations works. But for others (which happens often) it does not work. DarkGDK calculates with the animation bone, without taking into acount, that the vertex blending positions are given by the vertex and the initial bone pose. Hm, hard to explain, sry xD
I found the problem, and this leads us to a potential solution!
So we have a initial pose. The mesh vertex and the bones, matching exactly that vertex space! Now, if the first animation pose is NOT exactly the same like the initial pose, an error with the animations is shown. So if DarkGDK would be fixed, they have to use the vertex space from the initial pose. If the animation pose uses the correct vertex space, all would be fine.
I proofed this by using models with the same initial pose and first animation pose. This works. If it's not the same, the animation is broken.
Please, can someone tell me, how long this fix should need to be implemented? Because I REALLY don't wont to fall back on my pure C++/DirectX, but I must have correct bone animations! As a workaround, I could make a tool, that takes the first animation pose and corrects the initial pose to fit it, the vertex and the bones.
EDIT: Another proof is to load a model with matching inital pose and animation pose. Appending a non-matching animation after this will work! Because the "vertex space buffer" is build just once at the first loading. This is where the bug is to locate at.
EDIT: What I am going to do now, is to fix all my media files. It will work like that: Import static model, import bones, use that as initial pose. Import animation. Than save this, but as multiple files (like I have read somewhere about to work with Enhanced Animations, might be usefull for both so):
static.X -> the original model with original initial pose bones
pose.X -> the first animation key as the initial pose with transformed vertex to match it. so basically the original model and pose is replaced with the first animation frame. then use the same as first 1-frame-long animation, which we just skip during playback to stay perfect in time.
anim1.X -> appending other animations with ANY initial pose will work now, the vertex buffer is filled correctly.
I really like to see this fix in DarkGDK. Anyone likes to see the fix, too?^^