Game Development Community

Maya and TGE

by Shakey · in Artist Corner · 01/18/2006 (12:49 pm) · 7 replies

OK I have TGE 1.4 and I am pretty well skilled at programming in C and Torque script, the artwork, I am having major issues with. I have Maya and I want to export some models in the engine with the Torque Showtool. I know I must use the exporter and it does work I went through the tutorials that came with the filepack and everything worked. Now with Maya that is a different story what are the qualifications of creating in Maya and exporting to Torque. I have a really good book called Learning Maya 7 Foundations that walks you through the software making different scenes and models. Can you export models created using nurbs primitives, the reason I ask is, they have a really cool robot they modelled, rigged, textured and animated and I thought for learning purposes I would create the robot and export it into the game engine. They use the software itself to playback the whole scene, they built a little room added planets rotating around a sun then added a robot and a flying orb. I want to take a couple of these objects and place then into the game world to get a feel of the process. Any suggestions, especially with the requirements and if this could be done.

#1
01/18/2006 (7:58 pm)
Hey
You can only export polygons nurbs are a No NO!
but your not totally F@#@@# just convert the nurbs to polygons you can do this in the modify/convert/nurbs to polygons .Make sure you delete the models history and freeze the transformations and dont use any maya shaders you need to uvmap an texture each model before you export them and your better off exporting each part on its own.
#2
01/25/2006 (8:45 am)
I too have a bit of an issue with Maya exporting.

I have been stuck on Torque for a while now, gave up on it and always came back again. I am finally at a point where I can say I think I have Torque Script almost completely figured out, and Maya is finally no longer a mystery. What a difference a 3rd button makes.

Anyway, I am finally up and running and doing everything I think I should be doing and using the Maya2DTS exporter gives me the "Export complete" message. I load the character into the game and see...nothing. The character I gave the shape to is running around and you can see the name flying past you, just the shape is missing.

I used the skeleton from the MayaFilePack and imported a model from my DarkMatter series, positioned the model to fit over the skeleton and deleted the BlueGuy limb by limb as I did so. When I got the model sorted, I read that I couldn't simply parent a limb to a bone since then I cannot create LOD, so I separated the skeleton from the mesh and did a soft skinning. Tested it and it works fine.

I then leave the skeleton a child under the Start01 Node and leave the mesh in the root of the scene.
The mesh is actually a group of separate meshes within a group called soldier128
I then crated a detail node called detail128

By now my structure is:
bounds

soldier128
-mesh1
-mesh2
...
-meshn

base01
-start01
. -bip01
. . -unlink
. . -Bip01_pelvis
. . . ...
-detail128

Then, just in case the problem is with the 3DS import procedure, I created a simple textured sphere in the root and named that mesh64 and created another detail node named detail64.

I hit the export button, it exports, I move it into position, I hit run, the game starts, and no visible model in sight. I tried looking at the console and found numerous problems of the DSQs I load requiring more nodes so I created them (mount2 and mount3, for example) until I got no more errors at all. Even still, wether I use it with or without loading the animations, I still cannot see the model.

One problem you might ask me to look at is the vertex normals after import. Well, as it turns out, the normals were inverted but I did sort that out before hand, so that is not the problem.

Interresting problem: When I originally deleted the limbs from the BlueGuy model, I forgot one limb and it exported with my model and it was the only visble part thereof (well, partly visible since parts of it would have been blocked by my actual model).

Interrestingly enough, when using the supplied BlueGuy.dts, it works fine, but when I export it myself from BlueGuy.ma, it freezes the game upon startup, yet when I forgot that single limb, that part was the only part I could see...

Can anyone PLEASE give me some help on how to fix this little export problem of mine?
If you want, email me at fromGaragegames@jaccojansen.co.uk and I will email you a screen shot of my maya scene with outliner open to display the various nodes.

I really welcome any and all help in this.

Sincerely
Jacco
#3
01/25/2006 (8:52 am)
Oh, I forgot to mention, since it does use the BlueGuy's skeleton, it is actually large enough to see ingame.
I opened the scene first, then imported the 3DS file, then clicked on the setTorqueUnits command, but my units were already set up as meters with Y axis pointing up.

After clicking the units button, I noticed it didn't change the up-axis so I did it manually and then had to rotate the blueguy and my model. When I clicked on the createBounds button it also required a -90 degree tilt.

Anyway, the units are correct and the size of my character is around neck high to the default player character.

When viewed in the ShowTool, all it displays is the skeleton and no mesh, but it gives me a model height of 230 from the starting view
#4
01/25/2006 (10:13 am)
All of your meshes must be named with the correct detail number. In your instance, make sure each piece has 128 at the end of its name.
#5
01/25/2006 (10:57 am)
Took me all day to try and sort it out, it took one paragraph to sort it out :)

Thanks a lot for that bit of info.

I now have a new problem. For some reason, the shape didn't appear, unless I walk right past it then turn around. Then some parts of it show up but only the shader, not the texture. So I went back to my model and separated the combined meshes into separate meshes alongside the ones that was not grouped together. I exported again and this time expanded the bounding box a little more.

Now I have the wierdest problem. The model appears exactly as I modelled it, textured exactly as it should be... even animated as it should be... perfectly... as long as I am within it's bounding block....

As soon as I move out of it's bounding block, the model disappears completely. The 64 model doesn't appear, either. It just vanishes.

Have you any idea why this would be?
#6
01/26/2006 (1:32 am)
Okay, I figured it out:

Don't parent meshes to each other
Make sure all the LOD shapes are also bound to the skeleton and make sure you remove ALL limbs from the skeleton. Lol, that yielded some funny results when I forgot only his lower leg and his chest inside the skeleton.
And most importantly, get the size right.

The problem I had was due to the character being less than 128 high unless I was right in his face. The other LOD was only a sphere that I didn't bind to the skeleton so when it got to that LOD it simply didn't display anything resulting in the vanishing player I mentioned above.

Thanks again to Danny Ngan for your help. I don't think I would have thought about renaming all meshes for a very long time. That single paragraph above saved me days of head scratching. Thanks a whole bunch :D
#7
01/26/2006 (3:15 am)
Okay, I figured it out:

Don't parent meshes to each other
Make sure all the LOD shapes are also bound to the skeleton and make sure you remove ALL limbs from the skeleton. Lol, that yielded some funny results when I forgot only his lower leg and his chest inside the skeleton.
And most importantly, get the size right.

The problem I had was due to the character being less than 128 high unless I was right in his face. The other LOD was only a sphere that I didn't bind to the skeleton so when it got to that LOD it simply didn't display anything resulting in the vanishing player I mentioned above.

Thanks again to Danny Ngan for your help. I don't think I would have thought about renaming all meshes for a very long time. That single paragraph above saved me days of head scratching. Thanks a whole bunch :D