Game Development Community

3DS Shapes for TSE

by John Kanalakis · in Torque Game Engine Advanced · 08/22/2006 (5:41 pm) · 7 replies

Has anyone implemented Matt's 3DS Shape Loader resource for TSE?
Before jumping to this porting project, I'd thought it might be a good idea to check in with everyone else. I'm interested in getting TSE to load native 3DS shapes into a mission.

About the author

John Kanalakis is the owner of EnvyGames, an independent game development studio in Silicon Valley that produces games and tools for Xbox 360, Windows, and the Web.


#1
08/22/2006 (5:58 pm)
Yeah, i'm insterested in this as well. though. i'm getting more interested in other mesh file types.
#2
08/23/2006 (3:18 am)
Havent tried it John, but check out using lib3ds for loading the mesh and such. You'll find its pretty easy.

I've still got plans to incorporate .fbx at some point, as its far far better supported by everything now and includes all the features I can think of.

The FBX sdk is now freely available (it wasnt for a long long time). So hopefully soon-ish I'll get round to it. But of course, time is limited :)
#3
08/23/2006 (5:47 pm)
@Phil Carlisle

FBX is what I am looking into as well.

This is a link to lib3DS that Phil mentioned.
#4
08/23/2006 (6:06 pm)
3ds is a really old, and REALLY bad format... avoid if possible.
#5
08/23/2006 (6:31 pm)
Great responses! FBX makes a lot of sense given that Microsoft is also pushing it for the XNA platform. Having a native FBX shape loader for TSE could allow enable art assets re-use with TorqueX.

So, it sounds like the game plan is to dissect the ShapeBase.cpp (and possibly Matt's Shape3ds.cc) file for code reference (rendering and processing materials). Then, work in some calls into the FBX sdk for loading the mesh. Finally, tie in polysoup collision code. I guess a bonus would be to playback any animations embedded within the FBX file.

Sound about right?
#6
08/24/2006 (8:10 am)
Hey John,

Yes, absolutely. You might also want to check out Collada. Its meant to be a file exchange format and is supposedly being used for PS3 etc. However I'm sure I remember Logan F saying that collada is either a subset or a superset of FBX anyway.

I'd go with FBX simply because its got wide support within the modelling tools fraternity (motionbuilder,max,maya etc).

I'd do the work myself, but right now I'm damn busy. Having .fbx native shapes would be really useful to me, like you mention, having polysoup collisions is high on my list too (along with a billion other things).
#7
08/25/2006 (9:13 am)
We managed to add polysoup collision in TSE. There's no voodoo involved (it's just lots of code writing): just create one tetrahedron convex for each triangle, and use some space partitioning scheme to only return the relevant ones during queries (actually, that's what Atlas does - we used it's collision-related functions, like buildConvex and getFeatures as base for our own code).

Heck, before we had space partitioning setup (using r-trees), the peformance for player collision didn't change much, even when the player was testing collisions against 200+ tetrahedrons at the same time (but performance degraded when we used vehicles against 2000+ unpartitioned convexes).