Game Development Community

Torque 3D beta 2, terrain size problem

by Diego Castaneda · in Torque 3D Professional · 06/23/2009 (1:16 pm) · 12 replies

Hi..

I have a problem with extensive terrains, i need to build a terrain of 182 km x 182 km. Im importing a 8196x8196 height-map, with 23 Meters Per Pixel and 860 of Height Scale, when i do click on import the world editor crash and the application closed... So i don't know, what would be the problem?. I have tried with a 61 x 61 km terrain and it works OK, but i haven't tested with trees and grass yet. So i don't know if the problem is my graphic card or torque 3D or both, or im doing something wrong?


My computer Hardware:
Nvidia Geforce 8800 GT,
8GB of RAM,
Intel Core 2 Duo 2.33 HZ

Thanks

#1
06/23/2009 (1:44 pm)
Prolly, both but even if you could get it in there. There is no way you will be able to use the entire thing as there is not enought precision to handle traveling further than about 10,000 units from origin.

see this thread

www.garagegames.com/community/forums/viewthread/94395
#2
06/23/2009 (2:17 pm)
Your first problem being, that your reccomended to use a 4096x4096 height map tops, (i think). Otherwise the engine crashes out.
#3
06/23/2009 (2:30 pm)
A 8196 x 8196 height map is not gonna work in Torque 3D. We have it capped at a maximum of 4096 as more than that and you risk running out of memory on your system/GPU.

Either live with the 4096 heightmap resolution or you need to develop some sort of custom dynamic loading. It depends on the specifics of your game on what the right path for you would be.
#4
06/23/2009 (2:55 pm)
i have tested with 4096x4096 height map, and 45 Meters Per Pixel and it crashed too.. What should I do?. If i scale everything it could be work?
#5
06/23/2009 (2:58 pm)
@Diego - Hum... thats weird.

Beta 3 should be out very soon... i suggest we test it there before we consider this a bug as i did alot of improvements to the import process.
#6
06/24/2009 (2:28 am)
4096x4096 at 45 Meters Per Pixel still seems pretty big - 754.974.720 meters in all - that's almost 755.000 Kilometers.

Just for comparasion, Earth's equatorial diameter is 12.755.660,544 meters (almost 13.000 Kilometers).

Maybe your making your world too big and running out of memory? remember you need to have in memory the terrain plus it's collision mesh and materials (textures, etc) not to mention foliage, trees, rocks, buildings, water (a lot of stuff).

Try decreasing the meters per pixel (a lot - like start at 1 and move up) and see if the problem persists. If it doesn't your world is too big at 45 meters per pixel
#7
06/24/2009 (10:52 am)
4096x4096 at 45 Meter Per Pixel are 184x184 kilometres in torque 3D right? or how many "Meter Per Pixel" do i need to achieve 184x184 kilometres in T3D with a 4096x4096 height map? I am confused.
#8
06/24/2009 (1:27 pm)
Your numbers are about right. 184.32x184.32 km at 45 squareSize.

Your physics simulation will be completely broken that far out, just so you know. And your terrain will be pretty bland looking at that 45m/pixel scale. That may not matter to your project, but it's worth mentioning.

That said, it really should be working. I haven't tried using such a huge squareSize, but I do have a few levels with 4096 terrains at smaller scales.

I would do what Luis suggested, start with squareSize 1 and see if that loads correctly, then increase it until you find where it's crashing.
#9
06/24/2009 (1:56 pm)
The square size shouldn't cause any additional memory usage or even cause it to crash. I'll try to repro this here in a bit.
#10
06/24/2009 (2:39 pm)
Hi everybody.. i have tested from squareSize 1 and it works fine, it works fine with smaller terrains. I tried again from cero with 4096x4096 and 45 Meter Per Pixel and it works,T3D load the terrain, but now the problem is how it looks.. The terrain looks flat like a plane.. So at this squareSize(45) i dont know how to use the "Height Scale" to achieve the original Max altitude that i design in L3DT...

And a last question would be.. With this huge terrain, I'll have problems inside my game with collision mesh and materials,textures, foliage, trees, rocks, buildings, water and other stuff?

What would you recommend in this case?
#11
06/24/2009 (8:58 pm)
@Diego - Beta 3 is out... i suggest testing it there before we debug this crash any further.

Quote:The terrain looks flat like a plane
Probably because your terrain is *really really* big... its flat because its much larger in area than it is in height.

Quote:I'll have problems inside my game with collision mesh and materials,textures, foliage, trees, rocks, buildings, water and other stuff?
As others have said... past 10,000 units from the 0,0,0 origin... your gonna have problems with the precision of your simulation.

Doing terrains of the size you want takes knowledge about programming and the engine to modifiy it to get the results you want. It won't be done from the mission editor alone.
#12
06/24/2009 (10:10 pm)
Thanks Tom and everybody for the help.

bye.