Game Development Community

Exporting a character in Maya 7

by Amr Bekhit · in Torque Game Engine · 09/09/2006 (10:32 am) · 12 replies

Hi all!

I've modelled a character in Maya 7 but I've had no success in exporting it to DTS. I modelled the mesh, added a skeleton, smooth bound it to the mesh and added mount, eye and cam nodes. I embeded the mesh, registered details, took the mesh out of the base0 hierarchy and pulled the skeleton and nodes into the hierarchy. Finally I created a bounding box. I've tried exporting it, but everytime I do this Maya crashes. I've trawled the internet for the past few days for solutions but I've had no success. I've had success before in exporting simple shapes and also a bone animated weapon, but characters are doing my head in :(. Any ideas people?

I've uploaded the Maya 7 file and the error and dump files. They can be downloaded from http://www.helmpcb.com/Helmut.zip

Thanks in advance!

--Amr

#1
09/11/2006 (9:58 am)
OK well, I've tried again. This time, I've made another simple character from scratch (similar to the blockman used in some of the demos) then rigged him. I exported the model to a .dts file and this was successfully displayed in the Show Tool. However, I had a problem exporting the dsq file. I created a simple root animation by moving my character's arms and head a little bit. I added a sequence node, set the parameters and then exported the dsq file. When I loaded it into the Show Tool, I could see the bones in the animation being played, but only the character's head was moving with the animation whereas the arms didn't move at all. I then tried doing the same thing but exporting everything into a single .dts file and I had exactly the same results. The cfg file I'm using contains:

AlwaysExport:
*

Anyone else encountered a similar problem?

--Amr
#2
09/11/2006 (11:07 am)
Hey
Cool helmet head lol fist off you need to close all the open polygons like the ends of his arms/legs and body
you also need to use a png or jpg texture not "bmp" should give him some back bones and parent them together then drop that hole rig on the start01 i also don't see a Sequence_ ....node cant export any animations with out one for each set of movements with the start and stop key frames you can make them with the dts utility edit in the channel bar other then that small list of things should export ..Oh try to avoid using auto uvmapping.
#3
09/11/2006 (11:13 am)
Thanks very much for your reply!

I'll close up the faces: the fill hole tool should do the trick. I'll change the texture file too.

Do all the joints have to be parented to a single root joint? Or can I have several joint chains like I have in my model?

The reason why I don't have ny sequence nodes is because I'm hoping to export the animation as a DSQ and so the main model file won't have any in it.

--Amr
#4
09/11/2006 (12:04 pm)
Should use a complete rig legs arms and back bones but its up to you mite export fine like you have it
make sure you triangulate the new faces after filling them if you have one quad face it will also fail exporting.
Also add all the bone to the AlwaysExport: example below.

the * will will export every thing with a more complex rig this wood be a headache.

AlwaysExport:
eye
cam
mount0
mount1
root
waist
neck
right_hip
right_knee
right_ankle
left_hip
left_knee
left_ankle
right_shoulder
right_elbow
right_wrist
left_shoulder
left_elbow
left_wrist
-Param::CollapseTransforms
#5
09/11/2006 (12:21 pm)
Thanks for the info, Dave!

I created a new cfg file and the model now exports successfully into DTS - thanks!

I ran across another problem: I wanted to create a DSQ animation for my model (he moves his arms and helmet), so I made another copy of the model file, added a sequence node, made my animation, then exported as a DSQ. When I came to view the animation in the Show Tool, I could see the bones moving correctly, but only one part of my model was animating, whereas the rest (arms and helmet) remained stationary.

Here's a video of what's happening to make it clearer:

Note how only the crest is animated correctly when viewed in the Show Tool.

Any ideas?

--Amr
#6
09/11/2006 (5:30 pm)
Yup that's (&(^(& up maybe try to brake that model up....... Call the parts body4 leftarm4 rightarm4
leftleg4 rightleg4 ....freeze transforms/delete history before you skin it. If you leave any mesh X.Y.Z or scale info behind you asking for trouble.
#7
09/11/2006 (5:47 pm)
Dave: I owe you a lot!

Thanks to you, I've successfuly gotten Helmut to export properly and the DSQ files to work properly in the Show Tool. Thank you very much for your help!

I just want to summaries what I've learn't about creating skinned models for torque:

1-Set up maya units using the DTS utility
2-Create geometry
3-Triangulate geometry
4-Make sure there are no holes in geometry (Fill Hole tool)
5-Delete geometry history
6-Freeze transformations on geometry
7-Name geometry (all parts of geometry should have the same number at the end to indicate LOD level)
8-Rig geometry + smooth bind skeleton to geometry
8-Embed geometry
9-Register details
10-Take all geometry out of base01 hierarchy, and place skeleton in start01
11-Create bounding box + resize to encompass all geometry + subsequent animations
12-Create config file: In the file, list all the mount, cam and eye points and all the joints. End the file with -Param::CollapseTransforms
13-Model is now ready to be exported as DTS/DSQ

I'm going to work on a tutorial for this: hopefully it'll save many people the trouble I went through.

Once again, thanks very much Dave!

--Amr
#8
09/11/2006 (6:29 pm)
No problem glad to help out bean there my self before..! And you can have a hole or in better terms show the backside of a polygon you just need to set it up right in the Dts utility under Rendering options two sided materials highlight the model first don't use this lots because it makes that mesh double the poly count.
#9
09/11/2006 (7:45 pm)
A quick question Amr; which exporter do you use for Maya7? Ours seems messed up cause we can't export the Cam node.
#10
09/12/2006 (4:24 am)
I'm can't remeber for sure (I think I must have tried a few), but if you like, I can email you the .mll file I'm currently using - thats seems to be working fine.

--Amr
#11
09/12/2006 (6:55 am)
I think we solved the problem. There was a spell error in the -Param::CollapseTransforms line of the config.
Thanks anyway!
#12
09/12/2006 (4:57 pm)
I've written a tutorial which outlines each step needed in order to export a skinned model from Maya to Torque. The tutorial can be viewed at www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=11252, and when it is approved, can be found in the Resources section. Hopefully, I will write this up in the TDN too.

--Amr