Game Development Community

Exporting to Torque

by Edith Cowan University (#0002) · in Torque Game Engine · 05/10/2009 (3:04 am) · 11 replies

Hey.

I'm having some trouble exporting shapes from Max to Torque (and ShowTool). Some shapes don't show up at all, while others do.

I get errors like this for the objects that don't show up when I load up the Torque demo:

Error: shape .../grenade.dts-collision detail 1 (Collision-0) bounds box invalid!

And I get this for an object that does show up:

Warning: shape .../m16.dts collision detail 1 (Collision-1) bounds exceed that of shape.

Here are some screenshots of the bounds, collision and dummy objects, etc. (bounds is inner box, collision is outer), just to prove that they are there and valid (I hope): 1, 2

The grenade and bounds/collision boxes are much larger than they are going to be when they go into the game, as I thought that making them larger would fix the problem of them not showing up (I had them scaled down to such a small scale - in metres - because they were supposed to be roughly life-size) but it didn't.

Any help is appreciated.

Cheers.

#1
05/13/2009 (1:53 am)
Add a detail number to the mesh shape itself, to match the detail marker number.

And curses to GG for removing(and never fixing it) TGE from my 'View All Unread' forums list, I always forget to manually check TGE.
#2
05/13/2009 (3:51 am)
Ok I renamed it grenade1 (to match detail1) but it's still giving me the same error in the console.
#3
05/13/2009 (4:41 pm)
Try using the max2dts exporter pro for max, it works a lot better. It's also much easier to use.

Use showtool before bringing anything into the engine... Showtool is a quick easy way of testing things out, it's unnecessary to spend the time bringing into torque only to find it doesn't work.

first try removing your collision shape and test the export. Make sure it shows up in showtool. If this works your problem might be that the exporter things your collision shape is an actual mesh because it has a "1" at the end of it. Everything that has a 1 at the end may be interpreted by the exporter as being a mesh that belongs in detail1. I havn't used the exporter your using, so not completely sure.

Oh yea and scaling things in max for use in dts exporting isn't a good idea... If you need something to be larger, edit the mesh and scale it, don't scale the object. Because the exporter doesn't always take the transform into account, which means you should reset the transform of any object before exporting. I have heard many people have this problem...

#4
05/13/2009 (10:18 pm)
torque.abigholeintheweb.com/public_system/useruploads/maxexport_Schema.jpgThis is working example i just went to compare your setup(and took this example pic as this shape export and work fine), and it seems right. But try using other then ONE number for your detail.
#5
05/15/2009 (2:39 am)
Hey Jeremy.

I am using max2dts and showtool. I was using the torque game demo just to get a better idea of why my shapes weren't showing up as showtool doesn't really let me know what's going on with errors, etc.

I got rid of my collision shape (Col-1 which is the shape that envelopes the bounds box I'm presuming) and the grenade will show up in showtool but not in the game (and I still get the same error).

Not sure what you mean by the scaling thing... do you mean instead of clicking on the object, go into editable poly/mesh on the stack and select all the vertices/polys and scale that way instead?

Hi Caylo. My detail (for the grenade) was already named detail2. This is a screenshot of my schematic view:

i50.photobucket.com/albums/f344/mybowlcut/untitled-56.png
I should have done this earlier (sorry): The grenade.max file. This way you guys can take a look for yourselves haha. Might be a bit easier.

Cheers.
#6
05/15/2009 (5:36 pm)
Shoot, I use Max7 and that is a ver.11 file; will not load for me. (I hate they way they force one to upgrade, and refuse to as Max7 is still working great for me). ok, done ranting.


What i suggest is delete the Collision marker and see if just the mesh will export. If not be sure the grenade2 mesh is collapse as mesh nothing else in stack. If you still have export trouble, try exporting mesh as 3DS and load it back in new, then retry the export. As a final test, you could load the mesh into a scene that DO export correctly, join the mesh together with the one that do export, delete the old mesh and export that way.
#7
05/16/2009 (5:34 pm)
Damn. I'd save it as another version file if I could...

I deleted the Collision-1 dummy object and the grenade still doesn't show up but the console error goes away. I tried selecting the vertices of the editable poly on the stack of the grenade and scaling it larger that way instead, but it still won't show up in the game.

I tried exporting it and it's the same as above - no errors but doesn't show up in the game.

I'll try merging it with a model that does export, but I have a few questions that might affect the export:

- Is there a list of modifiers, etc. that Torque doesn't like? E.g. smooth, etc.?
- Does the shape have to be physically connected? E.g. the grenade has a pin that is part of of the mesh but doesn't touch it. Instead it just hangs in mid-air very close to the grenade. If Torque requires that all shapes be connected somehow or something, then maybe that's the problem? Haha.
#8
05/16/2009 (6:32 pm)
I have never had troubles with modifiers, but hear it said that you need to have it collapse as a mesh before it exports(So if its not working, collapse it to a mesh and see...)

I use multi-mesh shapes all the time. If the "grenade" is number 2 detail, number the "PIN" to be number 2 also. Then be sure the schematic have the "PIN" connected to "Start01" (I have also had it work by hooking parts together as in "PIN" connected to "grenade" connected to "Start01"), so the basic rules seem to be making sure they all hookup to "Start01" someway. (The same trick works for collision mesh and you can chain way more then the default 9 and they seem to work- but this is not a kosher way of doing it.)

As mentioned by Jeremy Farley above, sometimes scale will mess up the bounds point. Try the "Box Trick";

www.garagegames.com/community/forums/viewthread/43206

www.garagegames.com/community/forums/viewthread/61928

EDIT: if nothing works, export as .3ds and email it to me, I believe you can still load 'old fashion' .max files- so i could try setting it up and then let you know what was wrong.



#9
05/18/2009 (1:12 am)
I tried emailing you but it couldn't send it to that comcast address. I uploaded it to MediaFire instead: www.mediafire.com/?sharekey=6bb77c068ba480807069484bded33bcd7a0feb529d08b921
#10
05/18/2009 (11:28 pm)
It did not email, as there is a NULL placed after the @ when one do a CUT/past.

I got it working, send me an email so i can send it back to you...

Or, what I did was delete all node markers are rebuild them. You only need one bounds, and be sure any/all nodes you use are correctly numbered and named.

#11
05/28/2009 (7:38 am)
I think Torque only exports editable meshes. Try converting your grenade to an editable mesh before exporting.