Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Enhanced Animations - setting up limb specific

Author
Message
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 19th Oct 2007 09:44 Edited at: 19th Oct 2007 10:14
I find this very hard to do. I couldn't do it with my own bone setup, so I loaded the example AI model into fragmotion and, for testing purposes, extracted the bones and realigned everything to mycharacter. I created my own walk and aim animation to test the limb specific animation system, and it works! But the head spikes up really high, and the rest of the model, while appearing to be fine some of the time, will greatly distort and jerk while the model fluently animates.

Bug on head only when not animating:



Bug on whole body when animating (note, animations and transitions work fine!). It instantly jerks into the deformed form when it starts to animate (does not do this at all in fragmotion):



Is there any easy way to fix this and/or set up limb-specific animation easily while using my own bones? It seems kind of challenging to me. I don't want to always have to copy and paste someone else's bones onto my model.

Thanks.

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 19th Oct 2007 13:57
Uncle Sam,

You shouldn't have to use a different bone system with your model. If you animated your model with your own bone system, you should be able to use that. Can you please send me a copy of the model that you are having trouble with? I have seen some other problems with models saved with Fragmotion. I'm not "exactly" sure what causes it, but I know an easy fix (if that is actually the problem).

Ron


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 19th Oct 2007 21:54
Ok, thanks, I've emailed you.

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 19th Oct 2007 22:44
Sam,

I just finished testing your model.
I get results as you show in your first picture. The head is distorted. This happens if the model is animating or not. So, I can't really help with that. There are problems with the model without Enhanced Animations being used.
I don't get any results like what is shown in your second picture.

You mentioned FragMotion. I have heard reports of other people having problems with .x models exported from it. I've never used it, so I'm not sure what to tell you.


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 19th Oct 2007 23:08 Edited at: 19th Oct 2007 23:09
Hmm, that's strange, because the model is perfect in Fragmotion. The problem is, I just purchased Fragmotion, so I can't exactly undo it. Maybe it could be exported from another modeling program. The wierd thing is though, I've used the frag motion trial and it animated my models perfectly in DBP.

I wonder why you don't the results in the second picture though...

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 19th Oct 2007 23:29
Quote: "The wierd thing is though, I've used the frag motion trial and it animated my models perfectly in DBP. "


That is odd. I'm not sure what to tell you about that!

Quote: "I wonder why you don't the results in the second picture though..."


Im not sure. I have attached a tool that was supplied with an old version of the directX SDK. It is basicly just a .x model viewer, but it has a "save" option. Please try to open your model with this tool and re-save it. I've seen it fix problems with .x models before. I may have done this trying to fix the "head" problem before I noticed the other problems. This tool may have fixed all of the problems except for the head.

Let me know if this helps!


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 19th Oct 2007 23:37 Edited at: 19th Oct 2007 23:39
It appears to not have affected it when I exported it and loaded it into the project, except maybe it's distorted even more often now. The model appears fine in the viewer! I'm concluding that it must be something with the code.

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 20th Oct 2007 00:54
Ok, it must actually be the skeleton too, because I loaded my model into DBP without enhanced animations on it, and with my original skeleton, and it works just fine.

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 20th Oct 2007 00:58
Sam,

Please send me your original model with "your" skeleton in it.
I'll have a look at that.

Thanks!

Ron


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 20th Oct 2007 01:46
Ok, emailed. Thanks again!

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 20th Oct 2007 02:18 Edited at: 20th Oct 2007 02:18
Sam,

I just tried this out with "bear2.x". It seems to load fine and animate fine with EnAn. Please test the code below. It isn't doing anything with the limb specific stuff yet, but let's confirm that this much is working for you first. If so, then it is something in your code that needs tweeking for the limb specific animations to work. We'll do that next

By the way, there is one small problem with your model. It appears that there is a vertex on the left foot that follows the right foot.




a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 20th Oct 2007 02:23
Thanks! Glad to know it works without the limb specific stuff so far. And thanks for pointing that out.

If we can get the limb specific animation to work, I'll be quite happy.

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 20th Oct 2007 21:10
Sam,

Sorry. No free time yet. Hopefully I'll be able to look at this tonight. I didn't forget!

Ron


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 21st Oct 2007 01:29
No problem! I can wait. Thanks for taking the time, and don't let it interfere with your schedule.

Chenak
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 21st Oct 2007 02:41 Edited at: 21st Oct 2007 02:44
Might be because you haven't assigned every vertex to a bone, I remember the polygon stretching thing happened to me while I was using Character FX. When I left the arms verticies unassigned they would stretch like crazy exactly like your screenshot. It's kind of a dbpro bug, but its not too serious as there is an easyish fix.

Just make sure every single vertex is assigned. Hopefully it should fix your problem too
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 21st Oct 2007 05:00
Well, what's strange is that it doesn't stretch like that without using enhanced animations.

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 21st Oct 2007 07:36 Edited at: 21st Oct 2007 07:39
Ok, I just ran through the animations in fragmotion of the ai model, and it appears to have animations for walking, aiming, and walking and aiming. Of course, in the limb specific example it's not using the walking and aiming animation, its doing it limb specific and playing both the walking and the aiming without walking animations at the same time, right? Otherwise enhanced animations would be pointless.

EDIT:

Oh wait, sorry, I did it with the bear myself (the buggy one in the first post), so yeah, it is doing it limb specific. Sorry about that. I'm guessing that model was originaly created without enhanced animations, so you or whoever made it had to make every combination of animations because without enhanced animations it couldn't be limb specific?

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 22nd Oct 2007 06:48
Sorry for the triple post, just keeping this from dropping all the way down 'till Ron finds time to help me.

Mage
Valued Member
18
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 22nd Oct 2007 15:12 Edited at: 22nd Oct 2007 15:15
Quote: "When I left the arms verticies unassigned they would stretch like crazy..."


That's basically whats happening.

You either have vertices that are not assigned to a bone, or they are weighted/assigned to more then one bone, or you really messed up and they are rigged to a wrong bone off screen.


You need to redo the "rigging" on your model. Try to redo the assignments for each vertex out of place, or delete all the assignments and replace them all.

I have had this problem before.

------------------
[Custom Signature]
Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 22nd Oct 2007 18:30
Sam,

I had some time to play with this. If you apply a walk animation to limbs 3 and 6 (the left and right legs) and include the child limbs, the walk animation will be applied to ONLY the legs. You can then apply the aim animation to the arms (I forget the limb numbers for them). Anyway, take a good look at how the limb specific example works. Your model's hierarchy is quite different than the "AI" model. With some playing around, it will work with your model.
Sorry I haven't had time to re-write the entire example using your model, but things have been very hectic the last few days!

Ron


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 22nd Oct 2007 21:28
Thanks Ron! I'll give it a try a let you know.

Quote: "That's basically whats happening.

You either have vertices that are not assigned to a bone, or they are weighted/assigned to more then one bone, or you really messed up and they are rigged to a wrong bone off screen.


You need to redo the "rigging" on your model. Try to redo the assignments for each vertex out of place, or delete all the assignments and replace them all.

I have had this problem before."


Actually, I've done that, many times. But like I said, the model doesn't do that when not applied to enhanced animations. It's all in the code, and that affects how the end result will look.

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 22nd Oct 2007 22:06
Quote: "Actually, I've done that, many times. But like I said, the model doesn't do that when not applied to enhanced animations. It's all in the code, and that affects how the end result will look."


As I said, there are some problems with models used from FragMotion. If you re-save the file with the utility I uploaded, it should help make it appear how it does when loaded in DBpro without EnAn used. The "bear2.x" model looks perfect for me. There are no problems with it except an odd vertex on the left foot which follows the right. All of the models that I tested that you sent me look the same in DBpro whether or not EnAn is used.

-Ron


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 22nd Oct 2007 22:32
Oh, I see. When I said code, I meant the DBP code, not the code behind EnAn, so I wasn't bashing it or anything. I meant that you just need to set up the code right in DBP to support the hierarchy of each model. I've fixed that vertex on the foor though so it's all good now.

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 22nd Oct 2007 22:36 Edited at: 22nd Oct 2007 22:37
Is it ok if you post the code? What's wierd is that I'm applying the animation to just the left leg, or all the body, or combination of both, but no matter what I do, the only thing that ever moves is the left leg!!!!!

EDIT: nvm.

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 22nd Oct 2007 22:45
Quote: "EDIT: nvm. "


So, you got it working?


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 22nd Oct 2007 23:12 Edited at: 22nd Oct 2007 23:13
Well, sort of.

I reversed the IncChild and ExcChild variable values to see what would happen, and it worked! But when doing the aim animation, it would stop the whole body, not just the top. I am going through the code and am trying to get it to apply to just the upper spine, but it refuses to obey me.

Maybe your code would be useful after all...

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 23rd Oct 2007 02:27
Sam,

It is because your model's legs are child limbs of the spine. So, if you apply an animation to the spine and use the "Include Child", it will also apply it to the legs. You need to do something like this:

To apply an animation to legs:
-Play animation of left leg and it's children
-Play animation on Right leg and it's children

To apply an animation to the upper body:
-Play an animation on the Left arm and it's children
-Play an animation on the Right arm and it's children
-Play an animation on the spine and DO NOT include children (otherwise it will also get applied to legs since they are children of the spine).

Hope this helps!


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 23rd Oct 2007 03:01 Edited at: 23rd Oct 2007 03:09
But that's what's so wierd! I've applied it to just the lower half of the body, and only the left leg moves. So I have to do it globally, which is why I can't split it up. I've checked the limb heirarchy. It SHOULD work!!!! I can see the code, it has to work, everything's typed in perfectly!

This piece of code should make both legs move...it doesn't, just one!



Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 24th Oct 2007 01:35
*bump*

Oh yeah, I'm pulling my hair out over this.

Image All
19
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 24th Oct 2007 02:48
I'd have the spine be a child of the pelvis, and the legs be a child of the pelvis as well. Did you build your skeleton from the bottom up?

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 24th Oct 2007 02:53
Well, no. I actually made it to match the model in the example, which is why I'm puzzled that it does not work even then.

Image All
19
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 24th Oct 2007 02:55
Try building it my way and see if that works; with that kind of a skeleton, the legs are no longer a child of the spine, but rather on the same level in the hierarchy with it. You could even make them above the spine in the hierarchy by making a protrusion upward from the pelvis and have the spine be a child of that.

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 24th Oct 2007 02:58
Thanks, I'll try that.

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 24th Oct 2007 03:14
Wow! I'm getting somewhere! This is rather embarrassing, but uh....I think this was all my fault. See, I was loading it into Dark Matter and checking the limb numbers so I could match the code. But Dark Matter screws the limb numbers all up! Using a DBP project, the limb numbers are print correctly.

So sorry for all the trouble I caused Ron. I still need to tweak it to make sure it works, then I'll get back to you. Thanks for all the help.

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 24th Oct 2007 03:46
Quote: "Wow! I'm getting somewhere! This is rather embarrassing, but uh....I think this was all my fault. See, I was loading it into Dark Matter and checking the limb numbers so I could match the code. But Dark Matter screws the limb numbers all up! Using a DBP project, the limb numbers are print correctly."


Haha! Oops!
Let me know if it doesn't work. Sorry I have been so busy. I am trying to finish of EnAn for GDK. I only have one more example to write, then the help file (which I HATE doing )


a.k.a WOLF!
Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 24th Oct 2007 03:58
No, it's ok. It works great now, it's all good. Thanks so much for all your help.

Uncle Sam
20
Years of Service
User Offline
Joined: 23rd Jul 2005
Location: West Coast, USA
Posted: 24th Oct 2007 04:11
Oh, by the way, for anyone who ever has any problems with Fragmotion and Enhanced Animations working together, just use Ron's little program he uploaded to re-export it. It fixes any bugs that might occur.

Ron Erickson
Moderator
22
Years of Service
User Offline
Joined: 6th Dec 2002
Location: Pittsburgh, PA, USA
Posted: 24th Oct 2007 04:17
Quote: "Oh, by the way, for anyone who ever has any problems with Fragmotion and Enhanced Animations working together, just use Ron's little program he uploaded to re-export it. It fixes any bugs that might occur."

I still have no idea what causes it. There are so many rotation matrices within a model. It seems like one of them isn't populated in Fragmotion that is used by EnAn. When the model is re-saved with that DirectX tool, it seems to sort everthing in a format that EnAn understands correctly. So far, FragMotion is the ONLY app that I know of any issues with. I'll get it worked out sooner or later, but at least there is a good fix that works!


a.k.a WOLF!

Login to post a reply

Server time is: 2025-08-08 17:40:42
Your offset time is: 2025-08-08 17:40:42