XNA Creators Club Online
Page 8 of 8 (196 items) « First ... < Previous 4 5 6 7 8
Sort Posts: Previous Next

XNA 3.1: Avatar

Last post 1/10/2010 3:19 PM by UberGeekGames. 195 replies.
  • 7/26/2009 10:58 PM In reply to
    • (723)
    • premium membership
    • Posts 303

    Re: XNA 3.1: Avatar

    Still no luck.

    I do have another question though...

    I see some pretty big differences between the scenes in the custom avatar animations pack and the avatar rig.  When I turn off the boy/girl skin on the rig I see several control rings and the bones, which don't seem to be present (in at least some) of the other sample pack scenes.
    From playing around with it, it seems that this skeleton just ensures the proportions remain non-deformed.  However, in the scenes without the skeleton I can rotate the elbow and the rest of the arm below the elbow rotates with it (which seems to me very, very useful).
    With the avatar rig the skeleton prevents me from rotating/translating the elbow if it would move the hand (essentially always).  It will automatically move the elbow if I move the hand, but almost always in a way I do not want... and without being able to manually adjust it I have been unable to get satisfactory results.
    Essentially it seems with the avatar rig I can only design with inverse kinematics?

    I like how the skeleton keeps me from stretching an arm too far or making other deformations, but is there any way to keep that functionality while still allowing me to animate using forward kinematics?
    Serious as a heart attack...
    ... and twice as deadly.
  • 7/26/2009 11:09 PM In reply to
    • (258)
    • premium membership Team XNA
    • Posts 209

    Re: XNA 3.1: Avatar

    There are some differences between the Softimage animations in the custom animation pack and the animation rig. The reason was how these were authored in Maya and then converted over into Softimage. You should use the animation rig when making new animations.
    Dean Johnson, XNA Framework Developer - Blog: Nerd Herder
  • 7/27/2009 12:50 AM In reply to
    • (723)
    • premium membership
    • Posts 303

    Re: XNA 3.1: Avatar

    Dean:
    There are some differences between the Softimage animations in the custom animation pack and the animation rig. The reason was how these were authored in Maya and then converted over into Softimage. You should use the animation rig when making new animations.


    I see.  Is there any simple way to remove the constraints preventing animating with forward kinematics with the rig?  I'm very new to this, and it may just be some option or setting I need to change, though I haven't found anything while looking through the documentation.

    I just want a way to move that elbow (though I expect I will run into the same thing on other joints).  When I animate with the inverse kinematics (moving the hand to the final position) there are multiple possible solutions that bring the hand to that position, and the one the rig chooses hasn't given me the angle I want on the elbow and shoulder.

    Also, I retried exporting to .fbx with a few scenes from the custom animation pack, this time making them their own project.  I still encountered the same warnings at the completion of the export.  Since I wouldn't expect the scenes to even show up on the project manager had I set the project up in the wrong directory I don't think that can be the issue.  Is it possible there is some plug-in or add-on I need that wasn't part of the installation file I downloaded from the XNA partners page?


    EDIT: Just noticed I had copied the Pictures folder to the wrong directory of the CustomAvatarAnimation project.  It DOES build now, but it gives me the same error as I was getting when I tried loading it into my own project (which did not incorporate the CustomAvatarAnimationData class or any of the others).  That error being:
    "Error loading "KungFuStand". File contains Microsoft.Xna.Framework.Graphics.Model but trying to load as CustomAvatarAnimation.CustomAvatarAnimationData."
    All I changed was this:

    // Load the walk animation 
    //animationData = Content.Load<CustomAvatarAnimationData>("Walk"); 
    animationData = Content.Load<CustomAvatarAnimationData>("KungFuStand"); 
    customAnimations[0] = new CustomAvatarAnimationPlayer(animationData.Name, 
                                            animationData.Length, animationData.Keyframes); 

    Apparently the .fbx I am exporting from SoftImage isn't even recognizably the same type as the animations included in the Custom Avatar Animation example.
    Serious as a heart attack...
    ... and twice as deadly.
  • 7/27/2009 4:10 AM In reply to
    • (258)
    • premium membership Team XNA
    • Posts 209

    Re: XNA 3.1: Avatar

    Right click the FBX file in your content project and make sure the content processor is set to the custom avatar processor. The error message is telling you that your content was build using the model processor and your code is asking for something else.
    Dean Johnson, XNA Framework Developer - Blog: Nerd Herder
  • 7/27/2009 11:56 PM In reply to
    • (723)
    • premium membership
    • Posts 303

    Re: XNA 3.1: Avatar

    Dean:
    Right click the FBX file in your content project and make sure the content processor is set to the custom avatar processor. The error message is telling you that your content was build using the model processor and your code is asking for something else.


    Thanks, that did it.  I now have my first animation running which is only slightly incorrect, still not embedding the textures it seems, and not in my own project...

    But still!  I've got something!  Progress!

    As for the part of the animation that isn't correct... not surprisingly it is the bloody elbow (or perhaps more accurately rotation in the shoulder).  For the right arm in my animation (in SoftImage) the bend of the elbow is in Y, but when I run it in the CustomAvatarAnimations sample the bend is in X/Z.  The hand is in the right position, though its rotation seems a bit off as well...
    Serious as a heart attack...
    ... and twice as deadly.
  • 7/31/2009 4:36 PM In reply to

    Re: XNA 3.1: Avatar

    @UberGeekGames I'm trying to import some animations from maya to Collada and use it in your wrapper, but I'm getting always IndexOutOfRange in this line:

    q =

    Quaternion.Slerp(bones[i].rotation[begin_frame], bones[i].rotation[next_frame], delta);

     

     

     


    I'm a newbie in Maya, but i use an IK Handle to make a simple movement of a arm to test and tryied to export it using the default Collada Exporter from Maya 2009 and already tried with this: http://sourceforge.net/projects/colladamaya/

    Probably I need do some steps before export no?

    Thanks
    Like games? Like Programming? 3D Gaming and Programming
    Twitter: vando_pereira
  • 7/31/2009 5:09 PM In reply to

    Re: XNA 3.1: Avatar

    It sounds like the animation isn't being exported properly. I don't have Maya unfortunately, so I can't really help there... Maybe one of the other devs that has Maya can chime in.
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 7/31/2009 9:36 PM In reply to
    • (723)
    • premium membership
    • Posts 303

    Re: XNA 3.1: Avatar

    Uber, have you used the SoftImage tools for any avatar animation then?

    Though I am still getting a host of warnings I have been able to export a usable animation for my project.  What's really bugging me is the inability to rotate certain joints and some pretty big differences between what I see in SoftImage and the animation in XNA.
    Serious as a heart attack...
    ... and twice as deadly.
  • 7/31/2009 11:38 PM In reply to

    Re: XNA 3.1: Avatar

    I've gotten the latest version installed but haven't quite gotten there yet... For my Avatar project I had actually hacked together an editor that allows me to rotate each bone, and DebugLogs out the position of the joints, and loads them back in to be used. (mind you these were VERY simple poses!) I'll definitely be trying that soon though.

    If only Autodesk would become an XNA partner so we could get cheap versions of Maya... ;-)
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 8/27/2009 10:34 PM In reply to

    Re: XNA 3.1: Avatar

    Hi,

    I just realized that I was writing a double of AvatarWrapper for my game... I'm a bit slow nowadays! So I've tested AvatarWrapper and it's a quite good library, so I'm switching to that and I'll add UberGeekGames in the credits.

    Thanks for sharing this library!

    Cheers,
    Pino
  • 8/28/2009 2:00 PM In reply to

    Re: XNA 3.1: Avatar

    Thanks, I'm glad you find it useful!

    Now go make a cool game with it, and don't be afraid to send unsolicited "look what I did" emails - I love seeing what people do with my code. :)
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 8/29/2009 9:47 AM In reply to

    Re: XNA 3.1: Avatar

    UberGeekGames:
    Thanks, I'm glad you find it useful!

    Now go make a cool game with it, and don't be afraid to send unsolicited "look what I did" emails - I love seeing what people do with my code. :)
    I'll do that ;)

    Thanks again,
    Pino
  • 11/15/2009 2:09 AM In reply to

    Re: XNA 3.1: Avatar

    Not sure if I should resurrect this thread or start a new one, but it seems pertinent for questions about avatars and avatarwrapper (which is awesome, thanks Ubergeek).

    Anyway, I'm trying to export an avatar animation as an .FBX according to the instructions included with the avatar rig (AvatarRig\Documentation\readme.htm).  I then try to import the .FBX using SkinnedModelProcessor (as per the instructions in AvatarWrapper) but I get the following warning and error (I'm guessing the warning doesn't matter since I'm not texturing the avatar myself).

    Building ArmRaise.fbx -> D:\MSDev\Samples\AvatarWrapper\AvatarTest1\bin\x86\Debug\Content\ArmRaise.xnb
    Content\ArmRaise.fbx : warning : There were vertices which did not contain texture coordinates in the following mesh or meshes: BlendShapeEarDefault, girl_hair
    Content\ArmRaise.fbx : error : Skeleton has 104 bones, but the maximum supported is 72.

     

     

    I've tried selecting specific things in the scene that seem irrelevant to avatar rendering (i.e. unselecting the camera), and then setting the "Selection Only" option in the "Crosswalk FXB export" dialog.  But there doesn't seem to be an obvious set of objects I can cull from my selection that will let me hit 72 bones.

    I'd appreciate any help on this, thanks
    -Dan





     

  • 11/15/2009 5:39 AM In reply to
    • (258)
    • premium membership Team XNA
    • Posts 209

    Re: XNA 3.1: Avatar

    I am not sure about how to load custom animations using the AvatarWrapper but if you are following the instructions on how to export using the avatar rig the resulting FBX is designed to be using the the custom avatar animation processor found here http://creators.xna.com/en-US/sample/customavataranimation. If you take a look at the processor you will see a chunk of code that removes bones that are not needed from the rig.
    Dean Johnson, XNA Framework Developer - Blog: Nerd Herder
  • 11/15/2009 8:34 PM In reply to

    Re: XNA 3.1: Avatar

    Thanks Dean.  I read this entire thread again, and now I think I understand the problem better - the SkinnedModelProcessor wouldn't know what to do with .FBX's generated from the XSI Avatar Rig, and even if it did AvatarWrapper might not know how to utilize the data.

    It looks like Ubergeek tried to get AvatarWrapper working with XSI, then the CustomAvatarAnimation sample came out, and at that point Ubergeek was going to take another look at XSI.  On Ubergeek's site under AvatarWrapper it says "Fortunately, the XNA Team has just released an XSI Mod Tool skeleton, so you can use that for animations", so Uber - wondering if you've made any progress on this.

    If not, it looks like my choices are
    a) buy and learn max or maya, (or blender and learn a multi-step workflow for importing animations)
    b) Replace AvatarWrapper with the techniques used in the CustomAvatarAnimation sample, or maybe wrap both techniques so I can still prototype with canned animations on the PC.

    thanks for the help

    -Dan



     

  • 1/6/2010 3:26 PM In reply to

    Re: XNA 3.1: Avatar

    Hey Danimal, sorry I didn't see this sooner. Yeah, B) is probably going to be your best option here. There was another thread on this a short while ago that should help.


    I'm posting here since I have a problem of my own... My artist and I are trying to get animations working from 3Ds Max, and so far we've been able get them working great on the PC using Collada, but they crash the AvatarRenderer since some bones aren't decomposable. This is with the "flailing arms" test animation provided in .max format.

    Sowaz, Spear, or anyone else who's had success in exporting animations from 3Ds Max: how did you do it? My artist uses 3Ds Max 2010 but has 2009 working too trying to recreate the exact steps in the video, with no luck so far.
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 1/6/2010 10:15 PM In reply to

    Re: XNA 3.1: Avatar

    I probably can't help too much Uber; I don't have access to Max anymore and haven't been using Avatars lately. :-/  Plus most of the work I did was in Maya.

    It seems strange, though, that some of the bones aren't decomposable (but are decomposable on PC?).  Is this just with some animations or with all of them?

    Have you tried a different format like FBX?  Exporters have a funny way of behaving differently.  Though with this kind of data I suspect that's not the problem.

    Is there any more information on what's failing with the decompose?  What does the matrix look like that's breaking?

    You could perhaps try Reflecting the decompose method to see exactly where it's failing?  (that's a shot in the dark; I've never done this and only heard about Reflect very recently)

  • 1/7/2010 12:14 AM In reply to

    Re: XNA 3.1: Avatar

    It's with all animations, and I'm trying to track down when and where the bones become non-decomposable. It's really strange since they're decomposed to quaternions and vector3s for easier interpolating and this works fine, except when they go to the AvatarRenderer it breaks.

    We've tried every exporter that looks like it might possibly work, starting with those in the AvatarWrapper. FBX keeps coming up "no avatar skeleton found" though.

    Thanks for the suggestions though, I'll keep at it. I've filed a pair of Connect issues about these issues:
    https://connect.microsoft.com/site226/feedback/ViewFeedback.aspx?FeedbackID=523451
    https://connect.microsoft.com/site226/feedback/ViewFeedback.aspx?FeedbackID=523452
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
  • 1/7/2010 12:48 AM In reply to

    Re: XNA 3.1: Avatar

    So are you taking the decomposition you use for interpolation, creating a matrix from that, and then using that matrix?
  • 1/7/2010 1:31 AM In reply to

    Re: XNA 3.1: Avatar

    UberGeekGames:
    It's with all animations, and I'm trying to track down when and where the bones become non-decomposable. It's really strange since they're decomposed to quaternions and vector3s for easier interpolating and this works fine, except when they go to the AvatarRenderer it breaks.


    Show your code from decomposition -> AvatarRenderer so we can make 100% sure what is going on.  There might be something else that is going wrong instead.
    Homerun Challenge - On the Marketplace

    Avatar Golf - On the Marketplace

    Blog: www.barkerscrest.com - Easy Golf
  • 1/10/2010 3:19 PM In reply to

    Re: XNA 3.1: Avatar

    Just a quick update: we eventually got this working, and the problem was in the exporter, not the code. Thanks for all the suggestions though!
    "Software is never finished, it is in varying states of 'less broken'" because "If it ain't broke, it doesn't have enough features yet"

    In Playtest: Avatar Land | The MANLY Game for MANLY Men

    The signature that was too big for the 512 char limit
Page 8 of 8 (196 items) « First ... < Previous 4 5 6 7 8 Previous Next