Game Development Community

Terrain .DIF format and 3rd party tool support

by Matt Schifter · in Torque 3D Professional · 01/30/2012 (10:37 am) · 10 replies

Hello,

I've been searching a number of websites on the topic, and other than the retired "Game Level Builder" there is apparently no exporter from any 3rd party modeling system to .DIF format.

Is there perhaps a workaround? What about using a .DTS exporter/converter from an industry standard tool, such as 3DS MAX/Maya, and then importing convex .DTS files into the World Editor?

Also, I see that you can export interiors to COLLADA from the terrain editor, but there's no IMPORT feature that would allow another interiors editor to used.

A number of 3rd party tools support COLLADA for both import and export. Add COLLADA import support for terrains and a round-trip solution to high-end industry tools will be made.

All help is appreciated,


Matt

About the author

Recent Threads


#1
01/30/2012 (11:20 am)
DIF is no longer a relevant file format and has been superceded by DTS. It would appear that the only reason that it is still in the engine is so people that already have old DIF assets can use the internal conversion to export their old DIFs to COLLADA.

Terrains are not models. More info in the docs on terrains, heightmaps and modeling.
#2
01/30/2012 (6:50 pm)
What he said, but also, QuArK.
#3
01/31/2012 (7:40 am)
Steve,

Thanks very much for your reply.

I've been through the documentation, and I'm surprised that a BSP solution with portals has been dropped in favor of a traditional z-buffer occlusion system. But if DTS is the only format I need for terrains, so much the better. It's just more expensive, technically.

Regarding heightmap info and terrains "aren't models," I must most respectfully disagree because there's a problem. But I think I understand what you mean -- you are referring to the basic terrain skin formed by the Terrain editor importing a bitmap/GIS data representing a regular grid of interpolated heightmap or GIS "posts". Unfortunately, the heightmap technique doesn't cover large areas with adequate resolution. To provide adequate detail with LOD support on the terrains requires precision control over the terrain skin polygons to prevent "popping". But the more serious problem that requires an editor is this: the heightmap/post method over hilly terrain may leave an area that a building will occupy slanted, whereas it needs to be flat. Only an external editor can edit the polygons around the foundation of the building such that they are "banged flat" yet retain terrain skin integrity.

And hence my problem. So I'm looking to use an industrial strength editor, such as Presagis Creator/Terra Vista or 3DS Max/Maya to create an accurate terrain.

I'll take a look at the Quake Army Knife. Hopefully it can import a terrain skin from COLLADA format. I'm not sure what constitutes a terrain skin model file to Torque. But thanks again to both you guys for the 411.

Regards,

Matt
#4
01/31/2012 (8:50 am)
There are the Zone and Portal objects available that allow you to manually partition your scenes, but the DIF format's automatic handling was a nice feature. There is also an occlusion object, but I can't remember all of the details on it ATM.

You can take GIS data, import it to a terrain and edit it right in the World Editor. No external editor is required, unless you decide to export the terrain to COLLADA first....

If you're doing LOD twiddling on the terrain, why not just toss a ROAM implementation in there? Can't be that much more work than you'd have to do trying to LOD out a full terrain in a 3D editor. The way I believe the system works now is that if you can't see a section of terrain the entire cell is dropped from the render list. I was noticing some funny behavior reference the Forest Editor object before 1.1 final, but I haven't looked at that since then - the individual trees were not culled so you had to create separate forest objects to get segments of forest to cull when occluded.
#5
01/31/2012 (1:05 pm)
Hi Richard,

Thanks very much for your time, consideration, and advice.

It looks like DIF format is alive and well in Quark -- their latest torque support is relatively recent.

Regarding the zone/portal & occlusion objects I am not that familiar with them (been a while since I read a book on Torque, but I'm re-learning), but I would think they are absolutely necessary to keep dts/dae objects performing well, especially in an urban environment.

In doing terrain editing inside the tool, I don't think it will cut it. Simulation/Serious Games terrains can be absolutely enormous, and a heightmap won't have the necessary resolution.

Using ROAM might be good in a flight simulation environment to render areas that are outside the area of interest. This project is a ground pounder terrain, so visible changes in LOD are not desirable. This can be specified in a sophisticated terrain editor like Terra Vista, which can the generate proper LODs for you. Of course, that is tens of thousands of dollars. We can subcontract to get that done for us, but there has to be a round trip artwork pipeline to Torque. Also, Terra Vista outputs to a third party format that we need to support, so again we need the round trip support back to Torque.

I'm thinking now we could generate a terrain skin in Collada format and then drop that into the Torque terrain editor...


Regards,

Matt



#6
01/31/2012 (1:09 pm)
http://www.garagegames.com/community/resource/view/20852/1

That might help out with the terrain detailing if its texture resolution you're concerned about, you can also use multiple terrains in a single mission to achieve the mission size, and using the terrain options in the world editor you can adjust the LOD stages to reduce the popping if thats still an issue.

Using a terrain is more versatile then using a dts mesh for a terrain.
#7
01/31/2012 (2:04 pm)
Thanks Andy,

Nice delapidated building & texture work, by the way.

I've used heightmaps before on terrains as well as their DTED, USGS DEM, and GIS equivalents. It won't work for our needs, and the last I used the Torque terrain editor, it couldn't bang a precision area flat and cut out a building foundation shape. But I'm still re-learning and I'll give it a shot. When four Torque experts tell me the terrain editor is worth looking at though my needs are stringent, I definitely am listening and will "explore it to pieces."

Regards,

Matt
#8
01/31/2012 (4:31 pm)
there's a "set height" tool thats better for flattening an area then the flatten/smooth tool is, that can be a bitch to get used to because it uses the average height.

Using the set height tool, select your brush size, and mouse over where you want to flatten it out, in the bottom right in the status bar, you will see "Min:xx Avg:xx Max:xx" these are the height coordinates of the terrain within your cursor, choose whatever height, judging from whats in the average height which you want the terrain flattened to, and in the top right of the window you have the "height" value for your tool settings. enter the height you need, and then just paint away at the terrain, it will set all terrain areas that you paint to that exact height.
Place your building as you need, and then use the smooth tool around the edges of the flattened area to give it a more natural look.

What kind of game are you making ? of more detailed terrain geometry, use a smaller meter per pixel ratio, although that can get very resource intensive on a large high resolution terrain from say a 4096 heightmap. however the 'physically' smaller the terrain with a higher resolution diffuse map can give some stunning results cause of the way the diffuse map is compressed over the physically smaller terrain achieving better detail clarity at mid and long range, plus some nice detail maps ontop of it for some really crisp looking terrain from the players perspective when on foot.

this image here is a pretty basic one, on a large map too, it only has 2 texture layers, one for rocks and one for grass both set at a base diffuse resolution for the terrain texture map at 4096x4096 to combat blurriness at distance.
The view distance there is about 4km to the mountains in the back.
www.mediafire.com/imgbnc.php/7523753c697b892598d557ba9b2efd056ca94ad795ca0d4c81ce2920474384a66g.jpg
The terrain tools with T3D have improved a tremendous amount from TGE and TGEA days, theres also a few other useful resources for painting your terrains from konrad kiss

Sahara is very handy for blending in world objects to match your terrain/worlds texturing
http://www.garagegames.com/community/blogs/view/20375

and a resource tool I couldnt live without when making large terrains is his rule based autopainter
http://www.garagegames.com/community/resources/view/17145
#9
02/01/2012 (1:08 am)
From the sounds of it there are two functions waiting to be implemented for the terrain:
1. Set height to selected object (center of the object would need to be at the bottom of the object)
2. Cut around selected object
#10
02/01/2012 (7:07 am)
Thank you Andy for the detail on the "set height" brush. That might do it.

I will certainly check out those links as soon as I can.

I'm actually not building a game -- this is a small research project for the Dept of Defense. The goal is to bring digital (aka "constructive") entities driven by AI into a live training environment with live Combatants. The terrain is technically already built -- we just need a virtual imitation of it. Since we will be tracking actual soldiers using GPS devices, we need to place everything precisely so the virtual view of the terrain with the soldiers and constructive entities match reality.


Regards,


Matt