[1.40] extracting terrain information from the .ted file?

server-side?

nofix made a plug-in that would give you...

Code:
// 0 = missionCenter.x, 1 = missionCenter.y, 2 = missionCenter.width, 3 = missionCenter.height, 4 = hazeDistance, 5 = perspectiveDistance, 6 = visibleDistance

if you need that I can post it

i think that's located in the .mis file in plain text

if you're talking the height maps andrew released something to dump the info to a file but I'm not sure where to find it now

[T1] Perfect Terrain Heightmaps by [meph]DooM! - TribalWar Forums

yeah his heightmaps are here:
Andrew's Tribes Heightmaps

unfortunately heightmaps aren't equivalent to terrain - they have to be scaled x, y, and z.

if you're talking about the boundaries of the entire map I think plaspastic did something with lasers but that might be mission boundaries too

yeah kind of this. how many meters wide and long is a map? what is the height difference between the highest point and the lowest?

xy problem

What's your goal dude

i want to import andrew's heightmaps into udk and replicate the tribes terrains to the right scale programmatically rather than by feel

i asked the question because i imagine all that information is in the .ted surely, and the x/y boundaries of the map is a similar question but not exactly the same
 
Dumps the command map to a 1024x1024 RGB .raw file in "Tribes/Temp" when
the client function rebuildCommandMap() is called (aka on mission load).
File name is "MissionName_XxY_WxH.raw" where X/Y is the top left corner of
the map in game coordinates and W/H are the width and the height of the map
in game coordinates.

I think he had a page on his site detailing how to use it but it might be something else I'm thinking of.
 
does anyone know how tribes determines the terrain from the .ted file? the one containing a .dtb and a .dtf. specifically, how does it decide how to scale the heightmap to the dimensions that it wants for each map?

looks like the tribes rpg guys got started on looking at the file formats here:
Good ol' Days


or hell fuck, even ignoring those files - does anyone know how to determine the dimensions of a given map in any way?

I might be wrong, but I believe that the answer you seek is 6144x6144 meters. That is the entire terrain size from corner to corner. Understanding how tribes and games draw things at powers of 2. example 128 512 1024 ect.

anyway moving on to how I figured this out. I actually trekked the entire map grid. Since the waypoint only goes to 999 max I start from the very bottom corner south west and moved my way up north west to the top left corner. Stopping every 999 meters to reset my waypoint at my feet. I did this a total of 6 times until finally stopping at the north cornert @ 291 meters.

Since I wasn't able to put a waypoint directly at my feet I had to record the offsets starting with 28, 24, 26, 25, 25, 25. (153)

999+999+999+999+999+999=5994

+ that last little bit of meters (291) 6285 Then I subtracted those offsets after adding them all up.4096

It came out to be 6132. After that I calculated (2^12)+(2^11)=6144 To find the nearest estimate. Hope this helps :D
 
Or you can go into the Mission Editor and move an item to the corner and hit F2 and get its position, make sure the green dot is in the very corner.

For Broadside, one corner was 3072, 3072, Z. So the other would be -3072, -3072, Z. Which would make the total 6144, 6144, Z.

Or you can look in the .mis file and get the corner of the terrain.
Code:
		instant SimTerrain "Terrain" {
			tedFileName = "Broadside.dtf";
			visibleDistance = "600";
			hazeDistance = "400";
			hazeVerticalMin = "1.16395e-08";
			hazeVerticalMax = "1.74147e-39";
			perspectiveDistance = "100";
			screenSize = "50";
			contGravity = "0 0 -20";
			contDrag = "0";
			contHeight = "10000";
			position = "-3072 -3072 0";**********************
			rotation = "0 0 0";
		};

The real problem is finding the height value needed. We talked about this on the annihilation forum about two years ago. The best I was able to come up with was to get the height of the tallest hill/mountain on the map and work from there.
Annihilation Mod • View topic - POLL, REVIVE TRIBES???
 
Last edited:
Or you can go into the Mission Editor and move an item to the corner and hit F2 and get its position, make sure the green dot is in the very corner.

For Broadside, one corner was 3072, 3072, Z. So the other would be -3072, -3072, Z. Which would make the total 6144, 6144, Z.

Or you can look in the .mis file and get the corner of the terrain.
Code:
		instant SimTerrain "Terrain" {
			tedFileName = "Broadside.dtf";
			visibleDistance = "600";
			hazeDistance = "400";
			hazeVerticalMin = "1.16395e-08";
			hazeVerticalMax = "1.74147e-39";
			perspectiveDistance = "100";
			screenSize = "50";
			contGravity = "0 0 -20";
			contDrag = "0";
			contHeight = "10000";
			position = "-3072 -3072 0";**********************
			rotation = "0 0 0";
		};

The real problem is finding the height value needed. We talked about this on the annihilation forum about two years ago. The best I was able to come up with was to get the height of the tallest hill/mountain on the map and work from there.
Annihilation Mod • View topic - POLL, REVIVE TRIBES???

very cool. ty

especially the thread you linked
 
Last edited:
Or you can go into the Mission Editor and move an item to the corner and hit F2 and get its position, make sure the green dot is in the very corner.

For Broadside, one corner was 3072, 3072, Z. So the other would be -3072, -3072, Z. Which would make the total 6144, 6144, Z.

Or you can look in the .mis file and get the corner of the terrain.
Code:
		instant SimTerrain "Terrain" {
			tedFileName = "Broadside.dtf";
			visibleDistance = "600";
			hazeDistance = "400";
			hazeVerticalMin = "1.16395e-08";
			hazeVerticalMax = "1.74147e-39";
			perspectiveDistance = "100";
			screenSize = "50";
			contGravity = "0 0 -20";
			contDrag = "0";
			contHeight = "10000";
			position = "-3072 -3072 0";**********************
			rotation = "0 0 0";
		};

The real problem is finding the height value needed. We talked about this on the annihilation forum about two years ago. The best I was able to come up with was to get the height of the tallest hill/mountain on the map and work from there.
Annihilation Mod • View topic - POLL, REVIVE TRIBES???

lmfao I knew there was an easier way, I just didn't know hahahaha
 
Progress. I've been messing with Broadside and its terrain and stuff, so here is what I've found out so far.

MATH!

The map is 6144 units in the x and y. We already know that, however, the map is tiled 3 times in the x and y. The heightmaps that we are using are tiled, but only account for one tile in Tribes, so what we are actually working with is a tile that is 2048 units in the x and y (6144/3 = 2048). We are also working with the center tile, so our new coordinates are -1024, -1024 for one corner, and 1024, 1024 for the other corner.

When the heightmap is imported into the UDK, we need to choose dimensions for the x, y, and z. Generally, a size of 128 or 256 for the heightmap is correct. For Broadside, it happens to be 256, which is an 8th of the 2048 from earlier. So the x and y dimensions are 256. The z dimension therefore is an 8th of the difference between the height of the highest point on the map and the lowest point on the map. That number, based off doing it by hand so it could be off a little, is 215.45 so divided by 8 is 26.93 for the z.

So now we have terrain at the correct size, but by default it puts the terrain at 0,0 which is not good for us, we need it so that 0,0 is the center. For a 256 heightmap, the terrain comes in at a size of 65536 units in the x and y, so it needs to be moved to 32768, 32768 instead (65536/2 = 32768). This brings 0,0 to the center. You may need to rotate the terrain or use -32768 instead, you'll know in a second.

I happened to have made a replica of the Broadside base a few years ago, so this is easier for me to see. We're able to pull the x, y, and z coordinates for the base from the .mis file and mission editor, so we know one base is at -182.177, -208.289, 180.895, however those units need to be converted to fit on our larger terrain. If we take the corner -1024, -1024 and set it equal to the corner -32768, -32768, we'll see that the T1 coordinates need to be multiplied by 32 to translate to the UDK.

So, with that the Broadside base is placed at the correct location, but the terrain is far too low. The z location needs to be set at 3072 for it to be correct. I'm not really sure why it's that number and not 2048 or 1024, but 3072 fits correctly.

One other thing I noticed is that the y coordinate may need to be flipped, so instead of -208.289, it should be 208.289. Has to do with moving/rotating the terrain.

So, now we just need a way to get the z difference from Tribes.

Long post, lots of info.
 
Double post, I know. My brother wrote up some code that uses LOS to get the highest and lowest points on the map.

Broadside:
Min: 13.8583
Max: 245.964

Total: 232.1057

Heightmap in the UDK:
X: 256
Y: 256
Z: 29.01

BroadsideTerrainTest.png
 
Double post, I know. My brother wrote up some code that uses LOS to get the highest and lowest points on the map.

Broadside:
Min: 13.8583
Max: 245.964

Total: 232.1057

Heightmap in the UDK:
X: 256
Y: 256
Z: 29.01

BroadsideTerrainTest.png

holy shit nice
 
Last edited:
Back
Top