Turning DTS into DIF
by ITT019GreenBay (#0003) · in Torque Game Engine · 01/01/2008 (12:12 am) · 3 replies
I've been trying to make some terrains in Max, export them as a DTS, and then export it from Constructor as a DIF. My problem is I'm not quite sure how to do it. I assume that I make a DTS like I usually would in Max then import it into Constructor and then export it as a DIF, but I haven't found information that says this. Also when I import the dts using import static mesh, nothing shows up in Constuctor, so I'm also wondering if it needs a material before going into Constructor.
About the author
#2
Terrains are a specific type of geometry as well in TGE. I would recommend using the tools inside the engine or implementing the opcode resource to use DTS files with polygonal collision. I have no idea what the impact of a terrain system would be using opcode, though.
EDIT:
Beat to the punch by Daniel! Great explanation!
01/01/2008 (12:58 am)
You cannot do that, actually, as the types of geometry use different paradigms. Constructor is for making DIF's, not exporting DTS models as them. You can "burn" DTS models into DIF's, but that is for doing things like placing chairs (DTS models) in a room (DIF geometry). For differences in the types of geometry between the two, you should look at Matt Fairfax's Convex vs. Concave article.Terrains are a specific type of geometry as well in TGE. I would recommend using the tools inside the engine or implementing the opcode resource to use DTS files with polygonal collision. I have no idea what the impact of a terrain system would be using opcode, though.
EDIT:
Beat to the punch by Daniel! Great explanation!
#3
01/01/2008 (6:59 pm)
Thanks for the replies, they helped a lot. As for what I'm doing, I'm making a level where the player starts out in a cave and after awhile will end up in a crater. I know Terrain Editor can't do caves, I've tried and looked on the forums for an answer. Another thing I've heard is DTS's have a lot of collision issues compared to DIF's. So since my player will be inside the cave does it mean I should use a DIF?
Torque 3D Owner Daniel Rehn
One of the MAIN problems with this is that DTS and DIF files are treated completely different to eachother internally within the game engine.
A DTS file can essentially be any shape or size, concave/convex, and has its own set of rules for collisions within the engine. They can be static or animated. These are maily used for avatars, animated objects, or basically any freeform object within the Torque playfield.
A DIF file follows a different set of rules altogether. All shapes to be DIF MUST adhere to a strict set of rules in that the shapes MUST conform to convex shapes. That is, all shapes must not be "open" as such, must be uniform mass - they cannot have varying surfaces and are calculated via BSP collisions. They have their own set of routines internal, that define what can be passed,collided or placed, and portalized.
DIF files must be static(as such..) and cannot be animated.
Ofcourse, to each these cons, there are ways around it, but go beyond the scope of what I am trying to say.
It basically can come down to the complexity of your DTS shape. It may be a little too "wild" for the game engine to interpret correctly. Its difficult to say as to why, as you have not posted any visual evidence of what you are trying to acheive :-)
If you are trying to create a genuinely unique terrain, try, for example, working off a basic heightmap, and having the engine create your terrain based of that.
Otherwise, dont be affraid to actually use the in engine terrain editor. It really is quite versatile. This way, you can scape your basic terrain, and then litter your environment with trees, rocks, whatever, in the form of DTS images. This will be done manually, but you will get a better understanding of how to utilise alot of the features that are already present for you.
Anonther option, would be to use a software program such as 3d World Studio. This enables you to create all your basic DIF needs, including a bit of basic terrain work.
It enables you to save to the .MAP format, which in turn, is parsed through your choice of Map2Dif.exe .
It is This program, map2dif, which turns the .MAP file into a .DIF file, which can then be imported into your Torque Project.
By the way, it is ALWAYS helpful to make sure you have materials linked to your objects, and accessable by exporters and engine, plus other tools... it just makes life so much easier.
Hope I was of SOME help.
Regards,
Dan.