Posted: 6th Apr 2022 21:32
Hi all.

After much headache, I have managed to find the settings to export animated models in Blender 3.1 that allow the model to be exported as an FBX model and loaded into AGK. Some may knwo this, but whenever I tried I got corrupted models, animation or both. Having historically stuck to .X models, since Blender removed that support I've been relying on exporting as .OBJ files, importing them into MilkShape, then animating and exporting as a .X. This worked ok, but anytime I needed to change the model it was apian, and Blender has far better animation tools now, so as AppGameKit can no longer import a Blender model I have been trying to find the solution. As it happens, a Blender exported FBX files does work in AppGameKit, if the below settings are used. It also works for multi mesh models. Note, I do not know if some variatiosn of these will work, but the below settings worked fine for me.

Also note, that ALL vertices in ALL meshes need to have a bone assigned to them, even if the do nothing - but that applys to any animated model as without a bone the default AppGameKit shader will not render any vertices not assigned to a bone. Also, if you use the auto weighting of the bones I have found Blender to be very inaccurate here, and a lot of animation errors seem to stem from here, so I would split the model into as many seperate meshes as you need for diffferent areas of the animation, manually paint the weightings, then joing the meshes back together. This works fine, and maks getting non connecting joint animation really easy.

(imagine all options are expended - I cannot attach an image here, so in Blender expand all the options and they will match up in teh FBX export options pane)
Path mode: Auto
Batch mode: off

<INCLUDE>
Limit to: this is optional, you can use as you please
Object types: use Armature and mesh

<TRANSFORM>
Scale: 1.00
Apply scalings: All local
Forward: Z Forward
Up: Y Up
Apply unit: ticked
Use space transform: ticked
Apply transform: unticked (very important)

<GEOMETRY>
Smoothing: normals only
Export subdivision surface: unticked
Apply modifiers: ticked
Loose edges: unticked
Tangent space: unticked

<ARMATURE>
Primary bone axis: Y axis
Secondary bone axis: X axis
Armature FBXNode type: null
Only deform bones: unticked
Add leaf bones: ticked (not sure if needed)

<BAKE ANIMATION>
Key all bones: ticked
NLA strips: unticked
All actions: unticked
Force start/end keying: ticked
Sampling rate: 1.00
Simplify: 1.00
Posted: 9th Apr 2022 14:38
Thanks Santman, I've had some success with .dae but I'd love to get .fbx working properly I'll give this a try

Blender's auto-weight can give you a starting point but it needs a lot of manual cleanup in general whether you are exporting for AppGameKit or not. A couple of things you can do to help here: The weight paint mode menus have options to limit the max number of bones assigned to each vertex, for export you will need to limit this to 4 however I tend to use 2 as a starting point and go to 3 as needed. keeping it low produces a smaller file size, bakes/exports faster, and you lose very little in the visuals of the animation its rare for more than 3 bones to have any major influence on a single vertex.

you should also use the 'normalize all weights' option after you do any painting or changing of weights this will ensure that each bone's weights total up to exactly 1.0 across all the assigned bones.
Posted: 10th Apr 2022 22:38
Sadly it's not working - after two full days of playing I think I have foudn the problem, but not sure if it is a Blender or AppGameKit problem. When I build an armature with an initital bone, then set up otehrs they seem to work fine. However if you rotate the core bone and that changes the physical position of a child bone, Blender does not show it as having any cooridinates as it is still at offset 0,0,0 to the root bone. However when loaded into AppGameKit, the child bone does not move at al. Oddly, this is only affected if the child bone is rotated....if it is not rotated, then it moves correctly. Ao I am assuming that it is an AKG error.
Posted: 16th Apr 2022 10:43
Ortu - how did you get DAE to work? I am exporting them with all settings, but the animation is lost every single time....or at least, AppGameKit isn't loading in any animation.