maya export error

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
wxpy2001
Gnoblar
Posts: 13
Joined: Tue May 30, 2006 4:10 pm

maya export error

Post by wxpy2001 »

i hava created a animated character in maya, and everything is ok in maya, so i export the charater to ogre's .mesh, .skeleton and .material files. but when i open these files using the OgreCEGuiMeshViewer(1.0.6p1), i got a a very strange scence. the scenes is below

everything ok in maya
Image

export settings
Image
Image

strange result
Image

thansk for any advise [/code][/url]
nothing is impossible
joi
Gnome
Posts: 327
Joined: Tue Feb 22, 2005 8:11 pm
Location: brazil

Post by joi »

There are a few things you could do to try and catch your error. Look at the XML's files for some clue on whats wrong, also, try to export other models, check your model geometry and look at the ogre log... I had no problems like this and it sure looks strange enough to be the exporter error or bug.
maya 7.0, vs 2005, ogre 1.2
csharper
Kobold
Posts: 37
Joined: Wed Apr 26, 2006 9:21 pm

same problem

Post by csharper »

I seem to be having the same problem with Maya 7/1.0.6 exporter/1.0.6 viewer.. has anyone any input on this topic?

As a programmer, I am not a Maya-guru so while I have gotten this far, my understanding of what in the model would cause this is limited. I really don't want to drive my artists crazy so if anyone has already tackled this issue, help would be much appreciated.

While I cannot just post a link to this diver maya source because it is company property, if any individual would like to look at it I will glady turn it over for inspection. PM or post a reply.

*Any* input on this would be unbelievably helpful. Thanks in advance.

Exporting without skeleton:
Image
Image

Exporting with skeleton:
Image
Image[/img]
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

Hi,

It looks like a problem with wrong skin weight values. We did experienced such result with wrongly converted models.
This problem can be due to several reasons but the most probable is that the model was modified within Maya (i.e. adding or removing vertices) after being skinned. This can result in totally incoherent numbers not adding to 1 as it should be. Check the values in the xml file to see if it the case.

If you can't manage to trace the problem, I can have a look at your file, as I'm using the same Maya and Ogre versions. Send me a PM for my email address.

Cheers.
Guyb.
csharper
Kobold
Posts: 37
Joined: Wed Apr 26, 2006 9:21 pm

Post by csharper »

Hey guy_it - thanks for the reply.

Which numbers should I be looking to add up to 1? Are they in the skeleton.xml or the mesh.xml?

I hate to waste your time if I can track it down myself as you described.
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

Hi,
have a look in the mesh.xml (if you don't have the original xml file, you can use the OgreXMLconverter to recreate it from the binary .mesh).

You should see a list of "boneassignments" on the bottom of the file looking like :
<vertexboneassignment vertexindex="0" boneindex="1" weight="0.3"/>
<vertexboneassignment vertexindex="0" boneindex="2" weight="0.5"/>
<vertexboneassignment vertexindex="0" boneindex="3" weight="0.2"/>

the numbers I'm taking about are the last ones : for a given vertex the weight should add to 1 or you may have unpredictable results ...

Good luck,
Guyb.
csharper
Kobold
Posts: 37
Joined: Wed Apr 26, 2006 9:21 pm

Post by csharper »

Thanks again guy_iti.

After your last response I wrote a quick app in C# to parse the mesh and spotlight any vertex ids whose weights do not add up to 1.0.

Upon seeing the results, I have two further questions, if you don't mind. I apologize if the answers are obvious.

1. Was there any signifigance to you using three boneassignments for a vertexindex? Or can this be assigned to <> 3 times?

2. Is there a such thing as good enough when summing the weights? Everything that was spotlighted was .9999 or .9998 - are these off enough to cause the distortions or do these assignments need to be reworked?

Again thanks for you help - I think I almost have a handle on this.
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

1. Was there any signifigance to you using three boneassignments for a vertexindex? Or can this be assigned to <> 3 times?

It can be assigned more than 3 times but you may encounter problem when using more than 4 influencing bones per vertex with some graphic card using hardware acceleration.

2. Is there a such thing as good enough when summing the weights? Everything that was spotlighted was .9999 or .9998 - are these off enough to cause the distortions or do these assignments need to be reworked?

It should be okay with values a bit under 1 in most of the cases.
I had the problem recently with Maya returning such values, and we had a bug in 1 specific machine using a Geforce. Be sure to check the model in more than 1 machine (if possible testing Nvidia & ATI GPU)
Value of more than 1 is definitly a cause of problem.

Let me know how it goes ...
Guyb.
tonytouch
Gnoblar
Posts: 12
Joined: Sat Oct 15, 2005 7:42 pm
Location: munich / germany

Post by tonytouch »

hey wxpy2001,

did you try to "edit skin / prune weights" before exporting your geometry ?

you did not use a polySmooth modificator on the mesh , did you ? :roll:
-->
just me
greg_marlow
Gnoblar
Posts: 10
Joined: Wed Jun 14, 2006 12:56 am
Location: Johnson City TN
Contact:

Post by greg_marlow »

Good News!!!

I got it to work!!! I have to say I feel pretty dumb (as I always do when these things finally start working). It was simply one check box that needed to be turned on on the exporter. It is the very last check box under the Mesh section. It is called "reorgnaize vertex buffers". I had tried to turn that on before but I must have had some other error to screw it up then.

Hope this helps out.

Greg
wxpy2001
Gnoblar
Posts: 13
Joined: Tue May 30, 2006 4:10 pm

Post by wxpy2001 »

thanks , :D greg_marlow ,i follow your advice, check the "reorganize vertex buffers",the the export model is ok , see the blow
Image

but the exported skeleton animation is error :( ,the animation displayed as this:
Image

Image

thanks all the people for your advice :o
nothing is impossible
wxpy2001
Gnoblar
Posts: 13
Joined: Tue May 30, 2006 4:10 pm

Post by wxpy2001 »

is there anyone have seen this problem?

did the exported skeleton animation error come from a bug in the Maya 7 Exporter tool? :)
nothing is impossible
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

FYI : I'm using Maya 7.0 with the exporter from 6th March 2006 (don't know exactly which version number it is) and did export several models with skeletons without any problem ...
Looking at your screenshot I would advise to check on the xml of the animation that the "scale" values of the bone animations are corrects (meaning No scale).
Guyb.

PS : I just realized : is your model placed like seen on the first screenshot as the neutral pose ? Because it looks like you exported the neutral pose with the skeleton being already modified (meaning with joints rotated), when the neutral pose should be a static one with the joints rotation at 0, 0, 0 , or you may end up adding rotation values value to misplaced joints. You follow ... ?
wxpy2001
Gnoblar
Posts: 13
Joined: Tue May 30, 2006 4:10 pm

Post by wxpy2001 »

do you mean the neutral pose must be a T pose? and should i add one frame,at this frame my character at the T pose?
nothing is impossible
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

Not necesseraly a T pose but the "bind pose" (which you select in the Maya Ogre exporter in the menu "animation") at the time of the export should correspond to the original mesh, (as it it before skinning) placed on a skeleton where joints are at 0 in rotation :
For example, if you exported your mesh like it is a the first screenshot, the vertices coordinates exported will correspond to the positions they have at the time, the same for the joints positions. But if you exported the .mesh in a different pose and try to apply animation, of course you'll have very strange results.
I now keep the bind pose as a T pose at frame -1 in maya, and select this frame as "frame for neutral pose" in the exporter, and so I don't have such problem

Hope it helps,
Guyb
wxpy2001
Gnoblar
Posts: 13
Joined: Tue May 30, 2006 4:10 pm

Post by wxpy2001 »

guy_iti, thanks for all you replys :D , i have set the "frame for neutral pose" to be the "skin bind pose", but the animation still be strange,i have no idea :( , and very very depressed. :( :(

can i email my maya file to you? so you can help me to find what is the error come from?

if you have time to help me ,please tell me you email address,i email my humanoid.ma file to you.

anyway, thanks very much
nothing is impossible
User avatar
bisco
OGRE Contributor
OGRE Contributor
Posts: 235
Joined: Wed Nov 03, 2004 5:01 pm
Location: London, United Kingdom

Post by bisco »

Hey :) sorry for the late reply....
Try the new exporter, you'll have to use the new version of OGRE though.... ( at least I believe so, since the mesh format has changed with the new version of the engine )
Tell me if you keep having troubles with the new exporter ;)
guy_iti
Halfling
Posts: 53
Joined: Mon Oct 17, 2005 2:11 pm
Location: Thessaloniki - Greece
Contact:

Post by guy_iti »

Hi Bisco,

thanks for the new exporter, I'll try as soon as I check the programers are using the latest version ...

FYI : wxpy2001's problem above had nothing to do with the exporter but with the model and skeleton being in a totally different pose (original skeleton all bended as you see above, with an original mesh as T pose .. ).

Cheers,
Guy.
User avatar
bisco
OGRE Contributor
OGRE Contributor
Posts: 235
Joined: Wed Nov 03, 2004 5:01 pm
Location: London, United Kingdom

Post by bisco »

Ok, glad to hear you found the problem :D
(and most of all that it wasn't a bug of the exporter... which would mean
more work for me....;))
wxpy2001
Gnoblar
Posts: 13
Joined: Tue May 30, 2006 4:10 pm

Post by wxpy2001 »

guy_iti and bisco , thanks .the problem have been sloved with help of guy_iti, the error came from " model and skeleton being in a totally different pose ".

so now i could export the skeleton animation very well .

bisco, thank you very much for the exportor.

guy_iti ,thank you very much for help me modify the humoid maya model :D :D
nothing is impossible
Post Reply