Game Development Community

Noob question: Getting a DIF file/object into the game engine

by Rhys Twelves · in Torque X 3D · 06/05/2009 (4:31 am) · 6 replies

Hi there,

I'm a coder and brand new to Torque Engine, and am just getting my head around the design philosophy of it, and how models get from Asset Creation Tool -> Game Engine.
I can see how dts/fbx/x files get exported from Blender/Maya/Max and then can be imported using TXBuilder and a resultant txscene file produced, but no matter how hard I search the forums/tutorials/docs etc, I cannot see how you are supposed to work with DIF files created from Constructor or otherwise.
I have the "trial" TX 3D package, and none of the startup projects have any DIF files referenced, or examples of how to load them into the engine or embed them in the txscene file.

Also, as a secondary note whilst I'm at it, if I try to enable the fps stats (bool flag) in the supplied FPSDemo it won't run due to a Null Pointer Exception (NPE) on the font load/initialisation. I've tried bmfontgen to create my own but for some reason the fontstyle allocation doesn't like any provided fonts.

Can anyone help with either of these two issues?

Kindest Regards,

Code12sMonkey

About the author

Recent Threads


#1
06/05/2009 (5:39 am)
DIFs are T3DStaticGeometryComponent or T3DStaticTSRenderComponent, I'm not sure which, except to say that I am sure that DIFs are also called static geometry.

From what I can see, fonts are created using the standard XNA sprite font pipeline.

I could be wrong, there is a massive lack of documentation for TX.
#2
06/05/2009 (6:14 am)
As far as I know, DIFs are not supported in TX.
I am also sorry about that because the constructor is a nice tool.

#3
06/08/2009 (4:38 am)
That seems to be correct. If you add a model (fbx, dts) in the builder as a Static, it gets polysoup set to true and is basically the new version of dif.

As far as I can tell.
#4
06/09/2009 (4:12 am)
Firstly, thanks guys for the response. Very helpful. But I'm still confused. Are you basically saying that I don't have simple BSP geometry with Torque X, or can I set some imported (fxb, dts) geometry to behave as simple BSP? It would seem very limiting and expensive to have to deal with polysoup geometry for all games/apps wrtten in Torque X.
Also, with Constructor being such a cool (free!) tool, it seems a shame that it can only be used with the commercial version of Torque.
Oh well, I guess beggars cannot be choosers :-(
#5
06/09/2009 (5:22 am)
To be honest I don't know which is faster, but I'm betting the GG guys have done it that way for a reason, I'm guessing it has something to do with dynamic lighting and shadows, but I really don't have a clue.

Constructor is cool yeah, but this version of Torque is commercial too, it's just written from scratch in C# rather than C++.
#6
06/11/2009 (10:38 pm)
I'm not really sure why DIFs weren't implemented in Torque X to start with, but I'm also interested in using them for Torque X - they are amazing efficient. I have thought a lot about getting DIFs ported into Torque X, mostly because I want to recycle a lot of my old DIF art. It's going to take a while before I get to it, it's around the middle of my to-do list.

John K.
www.envygames.com