Home Technical Talk

3ds Max >> export to OGRE problem

polycounter lvl 12
Offline / Send Message
Anushka polycounter lvl 12
Hi everybody!!

I have this MAJOR important problem to tell you all:

I always worked with Maya, but after some serious problems expprting to OGRE platform, I realized maybe it was better to change to MAx. And so I did.

WITH MAX:
I rigged a female model using biped system and then animated it with free animation, on Euler curves mode (so that I can easily edit the tangents);
So, i animated a walk cycle and a golf swing:

when I export it to OGRE, with ogre exporter, the walk cycle is fine on ogre mesh viewer, but the legs on the swing animation just swing back and forward.... no mesh distortion whatsoever, just swingin around.... :poly122:
I tried to change the animation back to quaternion, but the same thing happens; :(
I also tried to put a key on the end of the animation for the foot, export it > swingin happens.... :poly122: notice that, there is NO animation on the legs on the swing movement, they're just planted on the ground through a free key.

And the most curious and strange thing is, I changed from Maya to Max precisely because some models became completely distorted after the ogre export on Maya>> stretching arms and legs, out of place movements, and all sorts of unwanted things.... :( I also did a new rig on Maya, making sure that on the smooth bind I changed the default number 5 of the maximum bones influence to 4, the same thing happens.. :poly127:

What I am trying to say, is that, why do I frequently have problems with exporting (viewing) animated models to OGRE platform??? Is there something I could be doing wrong? Is there any tech-spec I do not know about? :(
why does the animation sometimes becomes distorted or simply out of place with OGRE viewer??
I have the latest version ogre exporter and viewer and been working both on maya 2009 and max 2009.

Someone must know what's happening or what's wrong... Please, help! :poly142:

Replies

  • Vrav
    Options
    Offline / Send Message
    Vrav polycounter lvl 11
    ( from http://www.ogre3d.org/wiki/index.php/Exporter_3DStudioMax )
    "1. Ogre does not support IK animation, only FK animation allowed. That means you cannot use Max IK solver for any bone chain in your animation. And you must have Position and Rotation keyframe for every single bone that you want to export for animation."

    Is that relevant?
  • Anushka
    Options
    Offline / Send Message
    Anushka polycounter lvl 12
    Vrav wrote: »
    ( from http://www.ogre3d.org/wiki/index.php/Exporter_3DStudioMax )
    "1. Ogre does not support IK animation, only FK animation allowed. That means you cannot use Max IK solver for any bone chain in your animation. And you must have Position and Rotation keyframe for every single bone that you want to export for animation."

    Is that relevant?


    That is very, very relevant! THANK YOUU :thumbup:
    But I can tell you this: the walk cycle, which on OGRE viewer is FINE, was animated fully with the biped system, that works both with IK and FK controllers and the cycle was animated with the IK system... So, on the viewer, the walk is perfectely fine althougn it was animated with IK's.
    On the other hand, the swing animation is not OK... I will try to put keyframes on every bone with Position and Rotation, and see if that fixes it.

    If not, why is one animation fine using IK and the other is not with the exact same system? :poly122:
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Heh, if that excerpt is true, Vrav, then whoever wrote their exporter wasn't thinking straight - there's a fairly easy way to get rotation/position values for joints in an IK chain even if the joints themselves don't get keys. Silly OGRE programmers!
  • Anushka
    Options
    Offline / Send Message
    Anushka polycounter lvl 12
    MoP wrote: »
    Heh, if that excerpt is true, Vrav, then whoever wrote their exporter wasn't thinking straight - there's a fairly easy way to get rotation/position values for joints in an IK chain even if the joints themselves don't get keys. Silly OGRE programmers!


    what??? how does that apply to my problem? :( can I fix it (within Maya or Max) or not?
  • oXYnary
    Options
    Offline / Send Message
    oXYnary polycounter lvl 18
    MoP, they are calling you! Tis open source after all. ;)

    Anushka, I need to add you to my IM. Next project most likely is with a Ogre Rendering Engine.
  • Mark Dygert
    Options
    Offline / Send Message
    Doesn't look like you can do too much about it, its a limitation of Ogre... that sucks.

    It means you can't use any planted keys(IK), so you'll need to convert them all over to free keys, which they'll probably float around like crazy. Or export with a key per frame, basically baking in the IK.

    The walk was probably fine because it didn't have large gaps between the planted keys?
  • oXYnary
    Options
    Offline / Send Message
    oXYnary polycounter lvl 18
    I found some talk on the forums about people interested in adding IK, even a supposed patch?

    Here is what I found.

    http://www.ogre3d.org/forums/viewtopic.php?f=4&t=35712&start=50
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Anushka wrote: »
    what??? how does that apply to my problem? :( can I fix it (within Maya or Max) or not?

    Sorry, no. You can't fix it yourself. But I think if you make a request to the OGRE team they should be able to update the plugin to support IK animation.
  • Anushka
    Options
    Offline / Send Message
    Anushka polycounter lvl 12
    Vig wrote: »
    It means you can't use any planted keys(IK), so you'll need to convert them all over to free keys, which they'll probably float around like crazy. Or export with a key per frame, basically baking in the IK.

    The walk was probably fine because it didn't have large gaps between the planted keys?


    Hi Vig :)
    what does 'baking in the IK' means? I don't understand that...

    About the gaps, what do you mean by gaps between the planted keys? I also don't understand that.... My walk cycle was made with quaternion curves and auto-key :shifty: 40 frames > keys on frames 0, 10, 20, 30 and 40
  • Anushka
    Options
    Offline / Send Message
    Anushka polycounter lvl 12
    MoP wrote: »
    Sorry, no. You can't fix it yourself. But I think if you make a request to the OGRE team they should be able to update the plugin to support IK animation.

    thanks, I will do that ;)
  • Anushka
    Options
    Offline / Send Message
    Anushka polycounter lvl 12
    oXYnary wrote: »
    I found some talk on the forums about people interested in adding IK, even a supposed patch?

    Here is what I found.

    http://www.ogre3d.org/forums/viewtopic.php?f=4&t=35712&start=50

    thanks! I pposted a reply on that thread... lets see what happens!
  • Mark Dygert
    Options
    Offline / Send Message
    Anushka wrote: »
    Hi Vig :)
    what does 'baking in the IK' means? I don't understand that...

    About the gaps, what do you mean by gaps between the planted keys? I also don't understand that.... My walk cycle was made with quaternion curves and auto-key :shifty: 40 frames > keys on frames 0, 10, 20, 30 and 40
    By gaps I meant planted keys on 0 and 40. Just book ends with no other keys except for the planted.

    As for the baking that's a bad term to use, I meant put a free key on every frame. The easy way is to save the animation (biped > Save) with a key per frame, and load (biped > load) that back into your model so every frame is keyed.

    That makes it nearly impossible to edit. So you probably want to save a version without a key per frame first. That way you can load that .bip file in and make any changes without having to worry about keys on every frame.

    It almost always gets you around funky IK issues, which it looks like this is. But some engines really don't handle a key on every frame all that well, some do great. Not sure which Ogre is...
  • Anushka
    Options
    Offline / Send Message
    Anushka polycounter lvl 12
    wELL, today I tried to export with keys on everyframe and the didn't work!
    one other thing, the walk cycle, that yesterday was fine, today its not, through the exact same scene which I saved yesterday; all the animations are completely distorted on arms and legs, which proves that the IK's aren't being accepted correctly on OGre. :poly122:

    is there any way to convert on Max all the IK animations to FK?
    and if I need to animate it all again, how can I make sure that I only use FK's on Max?

    thanks :poly142:
  • Mark Dygert
    Options
    Offline / Send Message
    The only time IK is used (as far as I know) is when you have planted keys. You can use IK to move the hands around and position the arms on each key but it will be recorded as FK movement. In theory if you remove the planted keys you'll remove the IK.

    It's really weird the key per frame didn't work, that puts rotation keys (FK) on every piece and overides any IK... If you load the key per frame animation onto a new biped does it also distort?
  • Anushka
    Options
    Offline / Send Message
    Anushka polycounter lvl 12
    Vig wrote: »
    The only time IK is used (as far as I know) is when you have planted keys. You can use IK to move the hands around and position the arms on each key but it will be recorded as FK movement. In theory if you remove the planted keys you'll remove the IK.

    It's really weird the key per frame didn't work, that puts rotation keys (FK) on every piece and overides any IK... If you load the key per frame animation onto a new biped does it also distort?


    I haven't tried loading the animation to another biped, but I could try that.
    Also, I tested a simple animation on the same biped animating exclusively through rotation of the bones (links on biped) and it worked perfetly on ogre. :poly124:

    For what I read, max alternates between IK and FK depending on the way the biped is moved: if you move the hands and feet by translation, you will be using IK animation and the keys (im guessing) they relate to the IK system, but if the biped is moved only through rotation, that way only FK is used. The free keys must be used always so that the FK system doesn't switch to IK, cause if even the hand, for example, is moved by rotation, if its keyed a sliding key, max will use IK mode to that. at least, this is what I understood :) Am I wrong?
Sign In or Register to comment.