Game Development Community

3DS to DIF Converter

by John Nilsson · in Game Design and Creative Issues · 04/26/2005 (1:14 am) · 14 replies

Hi!

There are a lot of converters from 3DS/Max to DTS but none for the DIF format.

Observe that I don't mean "create" DTS-shapes, but convert a 3DS-file to a DTS or a .map-file (which is more general).

Considering the amount of achitectural 3DS-models out there it would greatly speed up any game development.

I now that 3DS-geometry and DTS-shapes are fundamentally different, but I can see that a good analytic program can "see" the shapes and split them up to blocks which the DTS-format seems to like.

I don't want any "just do it yourself"-answers, please!


/johnn
_________________
Full Torque!

About the author

Recent Threads


#1
04/26/2005 (2:16 am)
Quote:
I now that 3DS-geometry and DTS-shapes are fundamentally different, but I can see that a good analytic program can "see" the shapes and split them up to blocks which the DTS-format seems to like.

*Way* easier said than done. Don't assume that something that is easy for a human is easy for a computer.

There is 3ds2map but the geometry needs to be in brush form (closed convex volumes) in order for it to work. Even then it isn't always that great.
#2
04/26/2005 (7:54 am)
Well, all I need is something which at least converts the basic shapes. I can reapply the textures and so on.

I tried 3ds2map and it went well, but when I then tried map2csm - but got stopped (I use Cartography Shop - which is a great program if you want to build *everything* from scratch!)

It's insane that you have to redo every building!


/johnn
_________________
Full Torque!
#3
03/14/2006 (1:54 pm)
I downloaded it and ran it but all that happens for me is a black window flashes on my screen for a second and then it vanishes without a trace. What am I doing wrong?

Or is there some tool that might be better? I'm trying to find a way to convert houses I built in Milkshape to .DIF format possibly using the exporter tool in Milkshape for .3DS or .OBJ or some other format that Milkshape can export to so that I can create my architectural features.

Thanks for any suggestions you might be able to offer!
-Sparkling

http://www.visionsgame.com
#4
03/14/2006 (2:01 pm)
3DS2MAP is a command line program. As such you will need to either running it from the command prompt or hope that you can drag and drop the 3DS file onto the icon for 3DS2Map and hope that it works as needed with the default settings it will use.

Logan
#5
03/14/2006 (2:16 pm)
Let's take a real-world evaluation of what you are trying to do on the computer.

You have made a house out of playing cards. And now you are attempting to turn it into one made out of blocks. Your cards will have to change their dimensions and significantly to become blocks (even thin ones). Because they have to be a certain thickness (let's say a half inch). Now your geometry is undergoing a massive shift from your original intent. Sometimes your floors are behaving oddly, taking on properties of some of your lower beams and support structures! Not to mention that sometimes you get a lot of shearing and tearing among points that were previously working correctly.

This doesn't mean that you can't have good results with a convertor (as long as you model with the conversion in mind rather than modeling and then hoping later that it works regardless of your modeling habits and style), but depending on the file, it might be much easier to actually re-create it from scratch or to rework the engine for object-based collissions.
#6
11/17/2006 (11:33 am)
Im having some problems using 3ds2map. I was able to successfully convert a simple cube 3ds to a map file, but theres some problems with the formatting.

Why are there commas separating the numbers in the brush definition? quark 6.3 chokes on them. was this in an earlier version of quark? I removed them and it worked fine except for textures. using existing map files as a guide, I can figure out how to manually change them to work with torque textures easy enough. the problem is that 3ds2map doesnt know how to do the texture transform parameters. is this a bug? the text file indicates the textures are "fully supported" but all brushes are using the same material01 for some reason. I know theres a fundamental difference between polygon and brush texturing and theres a number of difficulties and limitations involved in going between the two.(well map->3ds would probably be a bit easier texture wise) I think the key to successfully converting regular uvs to plane texture coords lies in judicious use of texture uvs.

I am thinking about rewriting 3ds2map. does anyone know where I can get information or source code for 3ds2map? theres a link provided in the helpfile but it's broken.
#7
11/17/2006 (11:52 am)
I'm not trying to be offensive here or anything.

But why do people keep insisting on doing this? or requesting this?

They are two totally different techniques, and two totally DIFFERENT set of requirements.

Its like trying to set up to operate, you must use a sharp scalpel to fit the needs of the patient (DIFF/BSP), but instead people pick up a chainsaw, and try to smash it into a scalpel (Poly-soup).

3ds2map will only work on very simple, very well constructed (as in using only techniques and tools that preform like BSP editing tools, tools that preform mathematical things to meshes will BOMB every time, because its invalid in BSP construction) models.

Is DIFF/BSP modeling that hard to pick up?
#8
11/17/2006 (5:26 pm)
Allyn I agree with what you're saying. people should spend less time trying to find ways around using brush based modeling tools and more time learning to use them. I have no problem using quark for game models/structures.

the main problem or difficulty with dif/map/bsp models is that theres very little available in the way of pre-fabricated game models and packs. I'm not an artist, and I can't afford to hire an artist for my game, but I can afford to purchase premade art online. take a look at sites like turbosquid or the3dstudio and you'll see that no one sells art in .map or .bsp format. it's just not done. everyone uses 3ds or obj when they want cross-compatibility with modeling software. of course I could always just grab the textures and reconstruct all the objects in quark, but this tool would definitely make things alot easier on me if it exported textures properly.
#9
11/18/2006 (9:37 am)
Then dont export them as BSP/DIF shapes for Torque. Do what almost every other game compan on the planet does, create the basic structure layout in a BSP (DIFs) and then augment it with a more polygonally complex model (DTSs) to add some extra fine detail doing stuff you would be insane to make in a BSP in the first place.
#10
11/18/2006 (5:02 pm)
L Foster thats a good idea. my first thought was that there would be additional overhead using dif along with dts and that I'd be better off using just dif. but when I think about it, I'm sure if I use a tsstatic there probably wouldnt be much overhead. the good thing is i can still use 3ds2map so get a good approximation for the associated collision.

thanks for the advice Foster and Allyn.
#11
11/19/2006 (11:03 am)
In theory portals within your DIFs should really lower the overhead you are talking about since it will cull out rooms or sections that aren't in theory visible to the player (as well as all the items contained within them). The theory though is that you have to spend the time setting it up right :)
#12
11/20/2006 (7:48 am)
And if you LOD your DTS models, even if it doesn't cull them, the LOD should pop out accordingly, taking up less of the render pipeline anyway. That is, if zoning is not culling your detail DTS's.
#13
11/20/2006 (8:08 am)
THIS IS FROM A DIFFERENT THREAD BUT I FEEL THE INFORMATION IS RELEVANT TO THE OP AND OTHER POSTERS IN THIS THREAD

Quote:
I think the problem with max is simply that Torque is written with BSP and CSG tech which is mostly outdated technology originaly for voodoo era cards. These use hundreds of tiny batches sent to the GPUinstead of grouping material meshes and combining into fewer large batches that are more efficient on modern hardware.

A more modern engine would only use BSP in its underlying structure for sorting out what gets rendered in a scene rather than rendering the visuals themselves which are more and more likely to be polysoup. You just need the right engine for the job, and Max makes for a great level building tool if you have the right engine that uses other techniques for rendering visuals.

Most engines use the SAME technique torque does. What you are describing in your second paragraph is just how torque does it from a level creation standpoint. Its up to the level designers and artists to assemble the levels correctly.

DTS does support shadow types with the TLK, and 1.5 <-- out the box.

udn.epicgames.com/Two/BreakAwayExample/BA_bsp_space.gifAnd example from URT2k, and is just like how you should create levels and areas in torque.
Also, keep inmind, that the terrain will also block out rendering of unseen or blocked by terrain objects.

udn.epicgames.com/Two/BreakAwayExample/BA_bsp_entrance.jpg
This is a shot where only the underliyng structure is a BSP, the rest is all Static meshes (AKA .DTS)
udn.epicgames.com/Two/BreakAwayExample/bsp_space.jpg
Max, or polysoup is NOT best for large, portalised interior objects.


DTS is the best for scenery objects, just not structures, i don't know where this came from. The colision is conxex (Like most engines, and BSP will ALL WAYS be faster), supports mutable effects and treatments.

DTS also supports about 4 different object types in the engine with different rendering, and "weight" requirements in the engine, using a play derived object for a plant is not how to go about it (Extream example)

Quote:
Another problem with DTS is that meshes are split into triangle strips and fans, which is great for older hardware, but means many small batches containg roughly a dozen tris each are sent to the GPU rather than having the single mesh sent in a single batch. This isn't too bad if you use DTS in moderation the way it was originaly intended, but if you try building an entire scenein DTS alone, you can easily be sending thousands of batched to the GPU.

What??? Triangle strips are used to OPTOMISE shared vectors in meshes and cuts out redudiant positions of shares corners of meshes...

Example
Quote:
For the happy beginners out there, let's briefly recall what a triangle strip is. Say your mesh contains a list of connected triangles. A triangle is made of three vertex references, and in case of connected triangles, two of them may be shared from one triangle to another. The list of indices resulting from this sharing forms a triangle strip. For example those triangles :



012

123

234

345

are equivalent to a single strip :

012345


and another
Quote:A triangle strip is a series of connected triangles, sharing vertexes, allowing for faster rendering for computer graphics. They are optimized on most graphics cards, making them the most efficient way of describing an object. After the first three coordinates for the first triangle in the strip, each new triangle only has one more vertex, sharing two of the vertexes from the last triangle. This compactness also makes them faster to load into RAM, as well as requiring less disk space.

For four triangles, as seen in the diagram, without using triangle strips, they would have to be stored and interpreted as four separate triangles: ABC, BCD, CDE, DEF. However, using a triangle strip, it can be stored simply as ABCDEF.
upload.wikimedia.org/wikipedia/en/0/03/Triangle_Strip.png
www.integrityware.com/products/poplib/gen_tri_strips.jpg
DTS are not ment for entire scenes, on this we agree.
#14
03/25/2007 (1:31 pm)
Well I for one wish there was an easy solution to this. I have a lot of houses, castles, stores and other assets that were created in Max for a different engine.

Now we are trying to figure out how to get those assets into torque as easy as possible and not lose a lot of work that was put into the models.

We are trying different methods but none have really satisfies.

Hopefully what L Foster suggests will work well