troubles with 3dsexporter / xmlconverter / skeleton anim.

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
bugshake
Greenskin
Posts: 111
Joined: Sat Feb 26, 2005 1:12 pm
Location: Amsterdam
Contact:

troubles with 3dsexporter / xmlconverter / skeleton anim.

Post by bugshake »

Hi, I'm having a lot of troubles exporting a mesh/skeleton from 3dsmax6 using the 3dsmax exporter: when the animations are played, some of the bones seem to get translations in them! for example: a characters foot hangs about7 feet high in the air and when he starts walking, his arm starts flying around.

Image (in game)
Image (in 3dsmax)

It's a basic mesh low-poly mesh with 23 bones and 2 bones/vertex. You download it if you wish: model (143kB RAR).

I'm using the version of 3dsmax exporter from the ogre downloads page. It says it's version 1.0.0, all though searching the forums reveals there is a version 1.19 out there somewhere... anyone know where? For the xmlconverter i'm using version 1.0.2, which is also from the ogre download page.

When I examine the .skeleton.xml file, it shows no translations in the animations.

I did not use a hardware shader in the .material file.

I know it should be possible from this message from dxgeoz.
pix0l
Halfling
Posts: 62
Joined: Sun May 29, 2005 1:38 am

Post by pix0l »

Hi, I'm using Max 7 and I haven't had any problems with the Max exporter yet. I'll try and take a look at the model later and let you know if I have the same problems.
User avatar
bugshake
Greenskin
Posts: 111
Joined: Sat Feb 26, 2005 1:12 pm
Location: Amsterdam
Contact:

Post by bugshake »

I'll try and take a look at the model later and let you know if I have the same problems.
that would be great pix0l
pix0l
Halfling
Posts: 62
Joined: Sun May 29, 2005 1:38 am

Post by pix0l »

Hi sorry for taking so long. I've been busy with my own project :D I had to hunt to find this thread again. I don't know how to use the forum properly yet. :oops:

Anyway I'm taking a look at your files now. I see the problem you have in Ogre with the model going all over the place. I'm going to see if I can fix it up for ya and I'll come back and let you know if I failed miserably or not.

I've got bad news for you. I couldn't fix it unfortunately. I use character studio biped to do my animations. I've never used Max bones before. I can't even set keys properly with Max bones :P However I did play with it for a while anyway. I removed the UV map to rule that out. I also removed the floor plane just in case the exporter didn't like it. Then I deleted all the animations except for the walk animation and moved it to the beginning frames. After doing all that and exporting only the walk animation out it improved alot. The arms got fixed, and the left leg wasn't as screwed up as it was before. Both legs have the motion happening but it's not moving correctly on either leg. The right leg seems to loop funny but doesn't fly away anywhere and the left leg flys off in a different direction after it swings backwards (differently than the way yours was originally closer to how it should be).

So my suggestion to you is maybe start with the walk animation and remove the uv map, floor plane, and all other animations temporarily before exporting. Export only one animation at a time. Also try creating another quick walk cycle animation but don't mirror or copy any bones or keys. Set every key and move every bone manually. Don't make the animation perfect this is just to test if it's the way you animated the model or if it's the way you've setup the bones. If the animation works correctly at this point then good. If it still doesn't work then I'd suggest looking into the way you've setup your bones. It's one of the two that is giving you problems. Sorry I couldn't help too much.

I decided to go a little further with your model I created a new biped for it and a simple crappy walk animation. I think you can convert it from biped to Max bones if you want it give me your email address. If not I wasted my time :D
User avatar
bugshake
Greenskin
Posts: 111
Joined: Sat Feb 26, 2005 1:12 pm
Location: Amsterdam
Contact:

Post by bugshake »

Wow, thanks for the time you put into this, pix0l, I really appreciate it. I had allready tried simplifying things, but I hadn't thought of removing UV-map and that floor plane yet! After reading your suggestions, I'm going to start with a really simple bone structure, like 2 bones, to see if maybe the way I place the bones has any effect.

Also, you suggest using the biped tool, I'll try that as well, allthough I plan on doing things with tails, wings and such later, which I assume is not possible with a "biped" tool :)
pix0l
Halfling
Posts: 62
Joined: Sun May 29, 2005 1:38 am

Post by pix0l »

That's the best way to learn. Just try something different. A silly mistake I often catch myself doing is trying the same thing over and over again expecting it to magically work because it "should". Even if it's something you think unlikely to cause an error you'd be surprised sometimes.

I know for a fact you can do tails with biped. I'm like 90% sure you can do wings too. Also quadrapeds (4 legged things) are possible. I've had a really easy time exporting my animation from Max using biped and physique. By the way the bones on your model rotate really strangely compared to my biped bones. Not sure if this is how you set them up or general behaviour of Max bones.

If you get stuck remember I have your model with a biped skeleton already rigged and paritally animated.
User avatar
bugshake
Greenskin
Posts: 111
Joined: Sat Feb 26, 2005 1:12 pm
Location: Amsterdam
Contact:

Post by bugshake »

No thanks, I'll just do some biped tutorial, so I know what I'm doing. As for the weird rotation, if you ever use max bones, try setting the coordinate system to local when rotating bones. Or maybe that's not what you mean by 'strange rotation'. Thanks again anyway.
nicowall
Gnoblar
Posts: 3
Joined: Sun Jun 19, 2005 11:16 pm

Post by nicowall »

You can ad wings and tails to biped, in fact you can add any amount of bones you want, but you have to set them manually, that I suppose you know how to, since you make your own bones and do not use the bipeds. You have t add them as float bones. And for the tail, the bipeds come with bones and also pony tails. And I read somewere that if you mirror bones the exporter dosen't work very well, it may crash. I'm new in orge, but if I can help don't doubt in asking.
User avatar
bugshake
Greenskin
Posts: 111
Joined: Sat Feb 26, 2005 1:12 pm
Location: Amsterdam
Contact:

Post by bugshake »

@nicowall: thanks :)

I did some modeling yesterday, working my way up, changing one thing at a time, from a 2-bone "wagging block" animation to a 6-bone "walking puppet" animation. All very simple, all with texture coords, but with the UVwrap collapsed. Here's what I found so far:

No problems:
- when I introduced a 2nd animation
- when I used the local coordinate system
- with multiple bones attached to one
- with "floating" bones, meaning bones that are not touching their parent bone :?
- with multiple rotations on one bone
- with rotations that pass the 0 (which in 3dsmax take the long way around, rotating -315 degrees instead of +45, fortunately not in ogre)

Problems:
- when my objects's O-coord was not on the world's O-coord
- when the first frame had the bones not in their original pose
User avatar
earthquakeProof
Gnoblar
Posts: 15
Joined: Tue Feb 04, 2003 12:06 am
Location: Birmingham

Post by earthquakeProof »

Hi,

The problem seems come from the fact you used mirror while building your bones. Because one side is well animated whereas the other is not. The problem is that you can't use mirrored bones with the exporter. Maybe you should try again doing a simple copy of the bones and readjusting them.

About the exporter problem, it's because it doesn't take into account the Pivot transformation. And the problem with mirror is that it's mirroring the Pivot...

Btw, I've not tried to reassign vertices with the Skin modifier but without mirroring, it should work ;)
Vive les champignons
User avatar
earthquakeProof
Gnoblar
Posts: 15
Joined: Tue Feb 04, 2003 12:06 am
Location: Birmingham

Post by earthquakeProof »

I think I found a little patch to make the exporter works with mirrored Bones, I was able to export your model :)

have a look here: http://www.ogre3d.org/phpBB2/viewtopic. ... 2035#82035
Vive les champignons
User avatar
bugshake
Greenskin
Posts: 111
Joined: Sat Feb 26, 2005 1:12 pm
Location: Amsterdam
Contact:

Post by bugshake »

Hey cool, I'll try that.
Post Reply