Increasing max heightmap
by Adam Beer · in Torque Game Engine · 10/20/2007 (11:32 am) · 12 replies
I have 'heard' that people have done this but I cant find what exactly you need to do. It would be nice to have 1024x1024 heightmaps be supported. The main reason is that when I view the terrain in wireframe mode the terrain is not detailed enough (not enought verts). How would I increase this so I can have more detailed terrain AND have it large to. (square size is not what im looking for)
Thanks.
Thanks.
About the author
Adam is the owner of Ignition Games, an indie game and software development company.
#2
10/21/2007 (2:40 pm)
This is not a trivial task. Portions of the terrain rendering code are written in assembly. If more detailed terrains are a requirement, your best bet might be moving to TGEA.
#3
10/23/2007 (4:37 am)
We are using TGEA. We are moving away from atlas because it doesnt support our needs for our specific game. We need to be able to edit the terrain, and we have destructable terrain as a must have feature and I have that working on Legacy. Basically, this is my only option.
#4
10/23/2007 (3:33 pm)
You can reduce squaresize to get more resolution. (You would then need more of the 256x256 pieces to cover your entire terrain.) Warning: Some functions may not work with squaresize not equal to 8 meters.
#5
10/23/2007 (3:37 pm)
That image is with a square size of 3. If I put it any lower than 3 it will crash. Also I need the be able to have the editable terrain big. The lower the square size, the smaller the playable area. Is there anything I can do?
#6
I haven't done it myself (I built Atlas instead :P), but if you're serious about higher geometry density then that's what I'd recommend.
10/23/2007 (3:43 pm)
There are a bunch of constants in the terrain files that control the terrain size. You can play with those to increase the heightfield size. Going up to 1024 shouldn't be a big issue from a design issue, but it will take some tweaking and hackery to update all the code to work properly, and figuring out the relationships between the constants isn't exactly obvious, but can definitely be done.I haven't done it myself (I built Atlas instead :P), but if you're serious about higher geometry density then that's what I'd recommend.
#7
I dont want to assume things, but the way TGEA is looking right now, it doesnt look like there is going to be anything done about the Atlas terrain editing. No offense Ben, Atlas is great but there are things like the editing of it which I dont understand why it wasnt built into it in the first place.
10/23/2007 (3:58 pm)
The biggest thing for me with atlas is that I NEED to be able to edit it like Legacy. Also we need to be able to have the terrain deform like Legacy can do also. Atlas is very good with everything else that we need, but those 2 things we absolutely need. I dont want to assume things, but the way TGEA is looking right now, it doesnt look like there is going to be anything done about the Atlas terrain editing. No offense Ben, Atlas is great but there are things like the editing of it which I dont understand why it wasnt built into it in the first place.
#8
I think you should definitely use legacy for this; the fix is to change some constants to make it support bigger heightfields. Atlas is as you say great for some things, but editing is not one of them. So why even bother with it? Go with what works for your situation.
10/23/2007 (4:06 pm)
Your reply kind of confuses me. :)I think you should definitely use legacy for this; the fix is to change some constants to make it support bigger heightfields. Atlas is as you say great for some things, but editing is not one of them. So why even bother with it? Go with what works for your situation.
#9
Basicaly, Atlas is amazing. There are a few things missing form it that we need:
-Editing it
-The ability to have projectiles alter the hight (craters) <--this is a resource for Legacy
We need those 2 features in our game because artillery is a major part and so are the citys. The terrain needs to be precisely heightened for certain structures in certain areas. What I mean by that is the buildings arent going to be on flat ground and there will be hight differences around the city. The way atlas handles this (through a heightmap) is very very hard to get the exact scale and height needed to place the buildings together correctly. Sorry if this is still confusing...to basically sum it up, I need to be able to edit the height in the editor like Legacy.
10/23/2007 (4:14 pm)
Me too.. :)Basicaly, Atlas is amazing. There are a few things missing form it that we need:
-Editing it
-The ability to have projectiles alter the hight (craters) <--this is a resource for Legacy
We need those 2 features in our game because artillery is a major part and so are the citys. The terrain needs to be precisely heightened for certain structures in certain areas. What I mean by that is the buildings arent going to be on flat ground and there will be hight differences around the city. The way atlas handles this (through a heightmap) is very very hard to get the exact scale and height needed to place the buildings together correctly. Sorry if this is still confusing...to basically sum it up, I need to be able to edit the height in the editor like Legacy.
#10
10/23/2007 (4:27 pm)
Those are very important features. The problem is that Atlas doesn't maintain any heightfield data at runtime. It just stores meshes. It's fast and efficient but it makes it very difficult to write an editor for it. I'd recommend using Legacy, which works under TGEA last I checked.
#11
10/23/2007 (4:51 pm)
It does work under TGEA, but the problem I have with it is the image above. That has the square size on 3. The ground is too pointy for me and I have terrain that can be blown up. When you have one of those craters made the crater is very pointy and its not smooth. The question I have is how hard would it be to get legacy terrain more detailed then it is without having to change the square size from 8?
#12
10/23/2007 (5:18 pm)
Square size is by definition the distance between heightfield samples... so I guess you could hack the geometry emission stuff to add extra verts (see terrRender.cpp), but there's not some other possible value to change for that that I know of.
Torque Owner Adam Beer
Ignition Games Inc.
You can clearly see the polygons in the terrain up close. I just want to have more polygons the closer you are to a certain point.