XNA Creators Club Online
Page 1 of 1 (7 items)
Sort Posts: Previous Next

Blender / XSI + fbx / x > SkinnedModelSample Problems.

Last post 04-04-2008 10:26 PM by Xythalia. 6 replies.
  • 03-31-2008 9:09 PM

    Blender / XSI + fbx / x > SkinnedModelSample Problems.

    Sorry to ask a question on my first post, but I'm pretty much at my wits end.
    After over 140 hours of trying to make any of these combinations work (and searching the forums / web looking for solutions)

    Any help anyone could offer in making any of these combinations work would be great.

    Blender + fbx: model animation appears deformed. As one poster put it, Spaghetti. Problem persists even if baked in blender (i'm guessing this is supposed to be related to ik? even with no ik constrants in my armature, it still happens)

    picture: (fbx top, export for xna fbx bottom)
    http://xs.to/xs.php?h=xs126&d=08142&f=fbx_problems474.jpg

    i have no idea what is with that arm in the XNA fbx, since no animation is applied to the arm bones in the animation i'm playing.

    Blender + x export: model plays fine in the directx viewer, but will not will not load because of:

    Error    1    The mesh "" is invalid. Bone number 21 in the skin has a null or empty name.    C:\workspace\SkinningSample\SkinningSample\Content\man.x    SkinningSampleWindows

    only post I found on this was a single post on these forums. Bone 21 does not correspond to the 21st bone created in Blender, or the 21st bone in the .x file. (Importer possibly adding an extra bone?)


    XSI dotXSI >  (using crosswalk instead of skinned model) animation appears fine, but even with the improvements on the board (not using XSISAS, setting parameters manually) ~4-5 animating models drops my fps by over 500 down to unplayable levels.

    (a friend of mine has to do this part, since I only have mod tool)
    XSI .x export > displays fine, but no matter how the animation is set up, it simply displays the last keyframe all the time.

    Anything that could help would be greatly appreciated. I'm sure its got to be something so simple that I've missed that everyone else assumes that people have already done. A link to someplace I might have missed in my searches would be very helpful as well.


    Settings that work for you in blender / xsi exporting would also be helpful (my fbx viewer cannot view the blender fbx exports at all)
  • 04-01-2008 6:30 AM In reply to

    Re: Blender / XSI + fbx / x > SkinnedModelSample Problems.

    There is a FBX exporter for blender that works, I don't have a link to it but search for "blender fbx export xna" and you should find it.

    It's a version that optomised for XNA.

    My graphic artist is putting together a howto for this problem, but it's low priority as I need him to animate me some spiders and crabs (don't ask!)

    As soon as he gets chance to finish the howto I will post it here

     

     

    Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
  • 04-01-2008 12:36 PM In reply to

    Re: Blender / XSI + fbx / x > SkinnedModelSample Problems.

    thank you. Once that gets posted I hope that can answer most of the questions people post here.

    unfortunately I have been using both the normal fbx export, and the one modified for xna with no luck. the strange part is, no matter what type of fbx I output from blender, the quicktime fbx reader can't read it.

    oh well, back off to troubleshooting. I'll post anything new I find, just in case someone else is having the same problems.
  • 04-01-2008 1:25 PM In reply to

    Re: Blender / XSI + fbx / x > SkinnedModelSample Problems.

    You're not alone.  I've spent the last week trying to get an animation created in Blender to run properly in XNA.  The dwarf sample that is part of the Animation Component Library works fine, and I've had the tiny.x sample working, along witih the skinnedanimation sample - but I cant get .x or the XNA geared .fbx export from blender to animate.   I can get the .X meshes to render just fine statically...  but animation eludes me.

  • 04-03-2008 4:09 AM In reply to

    Re: Blender / XSI + fbx / x > SkinnedModelSample Problems.

    FBX does work, I use it all the time.

    But it's as fragile a cherry blossom, ............ dipped in liquid nitrogen.

    ONE vertex not assigned to a bone, importer blows up.

    Too many bones, shader blows up.

    Doing things in the wrong order in blender, EVERYTHING blows up.

    Once you have the technique down though, you can have multiple animations in a single file.

    I'll try to push my GA to finish the HOWTO

     

     

     

    Information is not knowledge, knowledge is not wisdom, wisdom is not truth, truth is not beauty, beauty is not love, love is not music, music is the best! Wisdom is the domain of the Wis (which is extinct).
  • 04-03-2008 11:13 AM In reply to

    Re: Blender / XSI + fbx / x > SkinnedModelSample Problems.

    I can expand on this a bit.  I spent last night working to get any kind of basic animation working using Blender -> .x -> XNA.  I managed to do it using the following pattern:  (disclaimer: I am using the Animation Components Library with XNA 1.1, but the things that make importers barf are likely the same)

    1. Create your mesh - start by keeping it simple, I started with nothing more than an extruded rectangular 'stick'.
    2. Add your armature, then extrude a couple bones to fill the mesh.  You might want to start with a mere two bones.
    3. Name your bones something clear and easy to remember.
    4. Once your armature is positioned in your mesh the way you want it, select your mesh, then begin assigning vertex groups.  Make sure each group is distinct (no common vertices with other groups).  Name the groups the exact same name as the bone to which you want them assigned.  Leave each group's weight at 1.
    5. Double check that every vertex belongs to a vertex group.
    6. Double check that every bone has a parent (this messed me up a ton)
    7. In object mode select your mesh, then shift-select your armature.  Press Ctrl-P, select Armature, then select Name Groups.  This will automatically assign your vertex groups to the appropriate bone so long as you've kept the names the same.
    8. (continue to progressively save your work :P)
    9. Put your armature into pose mode, and switch to your animation setup (I just use Ctrl-left arrow).
    10. Setup your models initial pose at frame 1 and add a Loc/Rot keyframe for all the bones.
    11. Do your animation - setting up keyframes and such as normal.
    12. Reduce the total animation length to cover just the keyframes you added.
    13. In the Action/IPO select box, with your full armature selected select Pose (I do this, but I don't know if its necessary)
    14. With your full armature still selected, switch to the Action Editor in one of your windows, and select Keys -> Bake Action to IPO Keys.  (You should get a little confirmation box saying a new action was baked.  Click it.)
    15. Save your work one more time.
    16. Export your animation to .x using the following options: Animation checked, Speed checked, Flip xy (y up) checked, and Right-handed coords.  Then just Export All.
    17. Test your animation using the DirectX viewer.  It should play correctly.  If not (for example if things look really warped) then step backwards through your saved .blends and export them till you find one that works - then recheck your steps.


    I then just play animation 0 using the animation components library - this works fine for me.  Of course when you bring your animation into your project you need to remember to change the content processor and importers as appropriate - for me it's tht X File - Animation library importer and Model - Animation Library processor.  If you have to use the skinned animation sample then I'm not sure what would need to be changed, but presumably the stuff in blender all still applies.  Using this technique I managed to get (somewhat crude) humanoid meshes doing a walking animation with correct UV-textures.  The most common problems I ran into that would mess things up were:

    1. Missing a vertex.
    2. Having a bone with no parent bone set (with the exception of the very first bone).  This makes your model look wacky in the DirectX mesh viewer.
    3. Forgetting to bake.

    I hope this is useful.  It's by no means extensive, presupposes some knowledge of blender, and is basically what I've learned after about a week of doing this.

  • 04-04-2008 10:26 PM In reply to

    Re: Blender / XSI + fbx / x > SkinnedModelSample Problems.

    Stainless:

    FBX does work, I use it all the time.

    But it's as fragile a cherry blossom, ............ dipped in liquid nitrogen.

    ONE vertex not assigned to a bone, importer blows up.

    Too many bones, shader blows up.

    Doing things in the wrong order in blender, EVERYTHING blows up.

    Once you have the technique down though, you can have multiple animations in a single file.

    I'll try to push my GA to finish the HOWTO

     

     

     



    Yeah, thats what I've been experimenting with over the last week.
    following the order listed above seems to help a bit, but for now it seems like i'm still doing something wrong.

    Thank you for all the help in the thread though, it has helped me get the more simple animation working, and i'm sure it will help other people. Maybe when I get some more free time ill try to build a complex model and rig it over again using that strict order.
Page 1 of 1 (7 items) Previous Next