My return to what I love most: Terrain
by Jacob Dankovchik · in Torque 3D Professional · 05/06/2009 (1:10 pm) · 82 replies
For the longest time I've been completely out of the GG community. Truth be told, after TGEA, which I considered a total flop, I had completely lost faith. With the comming of this new engine, I decided to give GG one last shot.
My biggest thing back in the day was particle effects, and terrain. I would spend hours on end playing with Atlas, making terrain after another. Mostly I'm waiting for the soft particles to make it in before I tear into those. So for now, I'm playing with terrains, and this is the result of about.. 1 day of playing.
First off, I'd like to mention the lighting. While it appears to be great at a small scale, when you scale the terrains up, it starts getting very ugly. Tweak some settings and it gets better, sometimes much better. Basically, some nice default values are going to have to be found and a good, all-inclusive menu for easily changing all settings. But, as many as there are, it would still be good to have default access to all of them, such as through an Advanced Settings menu. In other words, there's a lot of numbers to tweak, but that's a good thing because you get a lot of control.
There seems to be some inevitable lose of shadow accuracy as size goes up, which concerns me a bit, but I'll worry about that more at a later date, if it's in any way an issue.
I'd like to state that the realtime tools is a MASSIVE plus. Being able to cook up a beautiful heightmap in L3DT and then further changing it in-game is such a wonderful step for me.
One thing that I found which concerned me a bit was the height limit of 2047. While some may find this to be enough, I simply don't. :P All my time with Atlas, I did nothing but push the limits with it, as I'm doing with this new setup and honestly 2047 meters just isn't enough. For some people who are trying to make a beautiful set of mountains, it's just too small. Perhaps this is something easily fixed/changed, I'm not sure yet as I've no way to mess with source on this comp yet. But just pointing it out.
Basically, I think there is a LOT of potential in the terrain system and I'd certainly like to see some of the other people here get in on it as well. :D
Since I've just barely begun touching on the terrain, I haven't taken the time to really work with texturing yet. That's the next step for me. But here are a few shots of what I've thrown together right away. Max height is 550m, 4096x4096 in area. Had to tweak a few settings to get it to something I can find acceptable.



My biggest thing back in the day was particle effects, and terrain. I would spend hours on end playing with Atlas, making terrain after another. Mostly I'm waiting for the soft particles to make it in before I tear into those. So for now, I'm playing with terrains, and this is the result of about.. 1 day of playing.
First off, I'd like to mention the lighting. While it appears to be great at a small scale, when you scale the terrains up, it starts getting very ugly. Tweak some settings and it gets better, sometimes much better. Basically, some nice default values are going to have to be found and a good, all-inclusive menu for easily changing all settings. But, as many as there are, it would still be good to have default access to all of them, such as through an Advanced Settings menu. In other words, there's a lot of numbers to tweak, but that's a good thing because you get a lot of control.
There seems to be some inevitable lose of shadow accuracy as size goes up, which concerns me a bit, but I'll worry about that more at a later date, if it's in any way an issue.
I'd like to state that the realtime tools is a MASSIVE plus. Being able to cook up a beautiful heightmap in L3DT and then further changing it in-game is such a wonderful step for me.
One thing that I found which concerned me a bit was the height limit of 2047. While some may find this to be enough, I simply don't. :P All my time with Atlas, I did nothing but push the limits with it, as I'm doing with this new setup and honestly 2047 meters just isn't enough. For some people who are trying to make a beautiful set of mountains, it's just too small. Perhaps this is something easily fixed/changed, I'm not sure yet as I've no way to mess with source on this comp yet. But just pointing it out.
Basically, I think there is a LOT of potential in the terrain system and I'd certainly like to see some of the other people here get in on it as well. :D
Since I've just barely begun touching on the terrain, I haven't taken the time to really work with texturing yet. That's the next step for me. But here are a few shots of what I've thrown together right away. Max height is 550m, 4096x4096 in area. Had to tweak a few settings to get it to something I can find acceptable.



About the author
#42
Now if only we could have highmap images of less then 256x256 down to say 64x64. And (now im dreaming...) the ability to scale the terrain mesh X/Y/Z arbitrarily! I personally think that(along with the ability to rotate terrains, as we already DO have) would be much better then clumsy Voxel terrain systems I have previously (hated) use.
05/19/2009 (5:03 am)
@Bo: You just frustrated with it right now. After I read from my last post to the end twice I understand it. Mater of fact i have an even better respect for the flexibility of this terrain system then before.Now if only we could have highmap images of less then 256x256 down to say 64x64. And (now im dreaming...) the ability to scale the terrain mesh X/Y/Z arbitrarily! I personally think that(along with the ability to rotate terrains, as we already DO have) would be much better then clumsy Voxel terrain systems I have previously (hated) use.
#43
The intire source for that function is commented out in the source code.
@Caylo
Sadly, at the moment i have no respect for this terrain system, i played with editors/3d engines from 99$ to 15000$, and ive never had these kind of issues.
In Grome (one at a decent cost, good editor), and even cheap engines like NeoAxis, the terrain can be made on the fly, changed resolution of terrain ect ect without much hassle.
While, this is not grome, a game "lives" on the terrain, and it should not, and usually isnt, this hard to create high end terrain.
And you should certainly not have to edit all your assets just because you want higher resolution terrain.
When you change your size value, it should change your terrain size.
When you change your squareSize, it should change your resolution of terrain (and hightmap accordingly).
However, this is beta, so im not gonna start screaming (yet) :P but only because its beta, this is a 1000$ engine after all :)
05/19/2009 (5:12 am)
Btw, you cant export heightmap :Ptools/missionEditor/gui/guiTerrainExportGui.gui (257): Unknown command saveHeightMapToPNG. Object test01(2347) test01 -> TerrainBlock -> SceneObject -> NetObject -> SimObject tools/missionEditor/gui/guiTerrainExportGui.gui (258): Unknown command saveOpacityToPNGs. Object test01(2347) test01 -> TerrainBlock -> SceneObject -> NetObject -> SimObject
The intire source for that function is commented out in the source code.
@Caylo
Sadly, at the moment i have no respect for this terrain system, i played with editors/3d engines from 99$ to 15000$, and ive never had these kind of issues.
In Grome (one at a decent cost, good editor), and even cheap engines like NeoAxis, the terrain can be made on the fly, changed resolution of terrain ect ect without much hassle.
While, this is not grome, a game "lives" on the terrain, and it should not, and usually isnt, this hard to create high end terrain.
And you should certainly not have to edit all your assets just because you want higher resolution terrain.
When you change your size value, it should change your terrain size.
When you change your squareSize, it should change your resolution of terrain (and hightmap accordingly).
However, this is beta, so im not gonna start screaming (yet) :P but only because its beta, this is a 1000$ engine after all :)
#44
You can try changing TerrainBlock::smMinCellSize if you want. What exactly that var is used for is a bit complex, but if you want a 64x64 terrain you would need to set it to 32.
Edit: You still might have to find a way to actually allocate a terrain/heightmap with those dimensions. But this should theoretically make it render properly if you manage that ;)
05/19/2009 (5:26 am)
@CayloYou can try changing TerrainBlock::smMinCellSize if you want. What exactly that var is used for is a bit complex, but if you want a 64x64 terrain you would need to set it to 32.
Edit: You still might have to find a way to actually allocate a terrain/heightmap with those dimensions. But this should theoretically make it render properly if you manage that ;)
#45
Logged as THREED-459
05/19/2009 (5:37 am)
"Terrain heightmap export unworking, consider supporting smaller terrain sizes, and several usability issues"Logged as THREED-459
#46
05/19/2009 (5:43 am)
Bo, I really think you just need to relax, take a breather, and read stuff over again. You must be confused about something because I was able to get this terrain system to perform better for me than any other, and faster. I could mix up a nice, albeit random terrain within 3 minutes, tops.
#47
T3D's terrain approach is quite novel in many respects. It was mostly confusing to me until I unlearned my previous hightmap way of thinking, I had much trouble giving up terrain texture blend layers, but i am finding it is for the best.
@James: My programing ability is far below the complexity i have read from the terrain code in T3D. It is a little secret I dont often tell in public, but im not really a programmer at all. I made my money as a game content designer. I picked up all programing skills from TGE. Probably an appalling number of c'coding misconceptions also. And quite often i amaze myself learning something simple that most programmers take for granted, what is why i often seem so proud of my few programing achievements.
05/19/2009 (5:44 am)
@Bo: I have worked with/own(EDIT: i dont wish to imply i own many engines, just 3, but worked with many) MANY engines. Torque is the only 'toy' engine I have(and T3D just might take the TOY out of Torque). Most terrain systems are either very simple highmap systems with limited flexibility, or overly complex 'other' systems that take days to get working/looking right. T3D's terrain approach is quite novel in many respects. It was mostly confusing to me until I unlearned my previous hightmap way of thinking, I had much trouble giving up terrain texture blend layers, but i am finding it is for the best.
@James: My programing ability is far below the complexity i have read from the terrain code in T3D. It is a little secret I dont often tell in public, but im not really a programmer at all. I made my money as a game content designer. I picked up all programing skills from TGE. Probably an appalling number of c'coding misconceptions also. And quite often i amaze myself learning something simple that most programmers take for granted, what is why i often seem so proud of my few programing achievements.
#48
I do NOT, want to edit/change/resize my models or anything just because i want higher resolution terrain, 1 cm = 1 cm, not 1 cm = 5 cm because i have to resize.
This engine should be able to save a terrain height map, and by doing that, it should be able to resize such a map (png or whatever) and re save it.
There should be a terrain cell multiplyer or something, so you can do
256x256 * squareSize * cellMultiplyer
So a
256x256 * 1 * 2 (twice as many cells) would make a 512x512 heightmap.
256x256 * 1 * 4 (4 times as many cells) would make a 1024x1024 heightmap.
256x256 * 0.5 * 2 (twice as many cells, half size) would make a 256x256 heightmap.
And if you change these options, it simply resize the heightmap and re save's it.
Im not mad or anything, i just think its a simple thing, and it should be in the engine.
And sure, if i just use the terrain "out of box", you can make terrain, its not high enough resolution for what i need, and as said above, 1 cm = 1 cm, im NOT resizing my models.
And i am relaxed, have been all the time :)
PS. Never did terrain in TGE/TGEA, never used them, and even though this might be better terrain, it still missing alot of what i would call "basic" features, and im sorry if someone feels i step on there toes, but for my game plan, the terrain system is not performing as expected.
05/19/2009 (6:14 am)
Waw, i feel you guys got no clue about what im talking about (no pun intended).I do NOT, want to edit/change/resize my models or anything just because i want higher resolution terrain, 1 cm = 1 cm, not 1 cm = 5 cm because i have to resize.
This engine should be able to save a terrain height map, and by doing that, it should be able to resize such a map (png or whatever) and re save it.
There should be a terrain cell multiplyer or something, so you can do
256x256 * squareSize * cellMultiplyer
So a
256x256 * 1 * 2 (twice as many cells) would make a 512x512 heightmap.
256x256 * 1 * 4 (4 times as many cells) would make a 1024x1024 heightmap.
256x256 * 0.5 * 2 (twice as many cells, half size) would make a 256x256 heightmap.
And if you change these options, it simply resize the heightmap and re save's it.
Im not mad or anything, i just think its a simple thing, and it should be in the engine.
And sure, if i just use the terrain "out of box", you can make terrain, its not high enough resolution for what i need, and as said above, 1 cm = 1 cm, im NOT resizing my models.
And i am relaxed, have been all the time :)
PS. Never did terrain in TGE/TGEA, never used them, and even though this might be better terrain, it still missing alot of what i would call "basic" features, and im sorry if someone feels i step on there toes, but for my game plan, the terrain system is not performing as expected.
#49
If you like, give me an exact example of what you like and I'll show you how to go about making it. Like, want a 512x512 terrain? I'll make you one with as high of a resolution as you could possibly want. Hell, I'll make it higher res then is even reasonable!
05/19/2009 (6:18 am)
I don't know how you could possibly want any more resolution...If you like, give me an exact example of what you like and I'll show you how to go about making it. Like, want a 512x512 terrain? I'll make you one with as high of a resolution as you could possibly want. Hell, I'll make it higher res then is even reasonable!
#50
Edit: interestingly, turns out the lag is caused by collision, not by the number of polys.. A rather disappointing detail. Perhaps something GG may want to look into for some serious optimization?
05/19/2009 (6:27 am)
K, just made a 512x512 meter terrain. I used a 4096x4096 heightmap to generate it, squareSize of 0.125. Unfortunately I only get about 1 FPS while running.. It smooths out if i stop moving, but once I start moving again, it lags pretty badly. But basically, you won't get much higher res than this, trust me! I can email the heightmap if you want so you can try yourself, see if it's enough resolution. ;)Edit: interestingly, turns out the lag is caused by collision, not by the number of polys.. A rather disappointing detail. Perhaps something GG may want to look into for some serious optimization?
#51
05/19/2009 (6:40 am)
I might be wrong... but what I think Bo is talking about is basically a sub-divide in a modeling program. Say you have a 512x512 terrain map, and you need more control, with one quick change, you can suddenly make it a 1024x1024, with a squareSize = 1/2 it's previous value, and you can now add the detail you need. Correct me if I'm wrong.
#52
05/19/2009 (6:51 am)
well if that's all he needs to do, just resize the image and reimport with half the squareSize. A process that will take all of 2 minutes at most and leaves you with double the resolution.
#53
Yes, thats what im talking about, im not talking about texture space.
If we talked 3D model, it would be the same as making a 3000 poly model to a 6000 poly model, to a 12000 poly model.
Creating more poly/tri's/cells/whateveryouwanttocallit ect on terrain..
@Jacob
No, that does not work, if you change squareSize, all you to is change terrain size, i do NOT want to change terrain size, only the sub-divisions/tri's or whatever on the terrain and keep the terrain same size.
It has nothing to do with the image, the hightmap size is how rough your heightmap will be, NOT your grid.
NOTHING you do right now changes the sub-divisions or cells as its referred too in the engine source, the squareSize only changes size of map (width / height), nothing else.
My brains gonna explode soon, i think we all talk beside eachother and noone understand what we are talking about xD (besides Tim, seems like he got it).
05/19/2009 (7:05 am)
@TimYes, thats what im talking about, im not talking about texture space.
If we talked 3D model, it would be the same as making a 3000 poly model to a 6000 poly model, to a 12000 poly model.
Creating more poly/tri's/cells/whateveryouwanttocallit ect on terrain..
@Jacob
No, that does not work, if you change squareSize, all you to is change terrain size, i do NOT want to change terrain size, only the sub-divisions/tri's or whatever on the terrain and keep the terrain same size.
It has nothing to do with the image, the hightmap size is how rough your heightmap will be, NOT your grid.
NOTHING you do right now changes the sub-divisions or cells as its referred too in the engine source, the squareSize only changes size of map (width / height), nothing else.
My brains gonna explode soon, i think we all talk beside eachother and noone understand what we are talking about xD (besides Tim, seems like he got it).
#54
05/19/2009 (7:27 am)
Gah. You aren't listening. Like, at all... When you increase the size of your heightmap you also increase the size of your terrain. So, you decrease the squareSize to get it back to the right size. If you send me a heightmap I'll gladly fix it up for you within 30-60 seconds.
#55
The question for you is, do you understand the steps we have described to accomplish what you want even without this feature yet implemented? (AND IT IS POSSIBLE) If so, then we are all good; if not, then I suggest taking Jacob up on his offer.
05/19/2009 (7:37 am)
Bo I understand the feature you are requesting, and I have it logged, so you don't need to worry about further describing it, I get it.The question for you is, do you understand the steps we have described to accomplish what you want even without this feature yet implemented? (AND IT IS POSSIBLE) If so, then we are all good; if not, then I suggest taking Jacob up on his offer.
#56
If you wanted to make this even smoother, the engine is capable of scaling / saving images, so you could write a quick tool to automate those steps.
05/19/2009 (7:53 am)
@Bo - Yeah, although not as smooth as you may like it, this can be accomplished by:- Export height map from Torque.
- Scale the image * 2.
- Import height map to Torque.
- Divide the squareSize / 2.
- Enjoy your higher resolution terrain.
If you wanted to make this even smoother, the engine is capable of scaling / saving images, so you could write a quick tool to automate those steps.
#57
You sure dont get it, yes, you increase your size of terrain by increasing your heightmap, but thats NOT what im after.
@James
Okay, you get it, thanks, and for explaining...
First, explain to me, by using the math in this engine, how your making better resolution (tri's) on the terrain and brush, so that you can make uber smooth mountains with HIGHLY smooth roundings even if its very steep.
Even if you use a 200000000000000MB x 200000000000000MB heightmap, if your tools and grid that you draw on is low ress, you will get the rough edges instead of rounded, no mather what heightmap you are using.
If your terrain is rough, your heightmap output will be rought (in this editor), no mather what size your using, you cannot create round edges where there is no ress for it (unless you use normal mapped grid or something to fake the extra grid/terrain ressolution).
And while yes, you "could" get some decent terrain done using Grome/L3DT ect, that was NOT the issue, and it should not be nessesary.
I know, im the boogie man right now, but what i/team bought this engine for is not possible with the rough shape of the terrain editor at the moment, so, thats why im bringing this up.
What im after to be excact, possibility to make smooth terrain, and still have sharp cornors without too much stretching of the terrain texture (and without scaling everything wich kind of makes the unified metric systems in the engine obsolete).
And it is possible, ive seen 99$ engines with it, i would expect this one to have it aswell (without use of 3rd party software!).
05/19/2009 (8:27 am)
@JacobYou sure dont get it, yes, you increase your size of terrain by increasing your heightmap, but thats NOT what im after.
@James
Okay, you get it, thanks, and for explaining...
First, explain to me, by using the math in this engine, how your making better resolution (tri's) on the terrain and brush, so that you can make uber smooth mountains with HIGHLY smooth roundings even if its very steep.
Even if you use a 200000000000000MB x 200000000000000MB heightmap, if your tools and grid that you draw on is low ress, you will get the rough edges instead of rounded, no mather what heightmap you are using.
If your terrain is rough, your heightmap output will be rought (in this editor), no mather what size your using, you cannot create round edges where there is no ress for it (unless you use normal mapped grid or something to fake the extra grid/terrain ressolution).
And while yes, you "could" get some decent terrain done using Grome/L3DT ect, that was NOT the issue, and it should not be nessesary.
I know, im the boogie man right now, but what i/team bought this engine for is not possible with the rough shape of the terrain editor at the moment, so, thats why im bringing this up.
What im after to be excact, possibility to make smooth terrain, and still have sharp cornors without too much stretching of the terrain texture (and without scaling everything wich kind of makes the unified metric systems in the engine obsolete).
And it is possible, ive seen 99$ engines with it, i would expect this one to have it aswell (without use of 3rd party software!).
#58
You don't need to use Grome, you don't need to resize any models. I think whatever code you looked at mislead you...
Screenshot incoming momentarily to demonstrate...
05/19/2009 (8:44 am)
Ok, so I agree that this could be easier to do. But you seem to think it actually is not even possible. That is not true.You don't need to use Grome, you don't need to resize any models. I think whatever code you looked at mislead you...
Screenshot incoming momentarily to demonstrate...
#59
05/19/2009 (8:44 am)
I've explained it several times over. Look up at those screenshots with the wireframes and tell me that isn't an increase in resolution. When I get home from work I'll even take the extra few minutes to demonstrate it step by every single step. If you don't get it THEN... Well, I don't know. I'll go have a conversation with a brick wall I guess.
#60
05/19/2009 (9:05 am)
Let's all cool off. I personally don't want this thread locked, because I am learning from it. It's not that easy communicating sometimes with just text, and Bo's first language isn't English either. I have a feeling that maybe I understand what is going on here, but being the noob I am, I am not about to put my two cents in. Let's see the screenshots and Jacob's work please and see where that takes us.
Torque 3D Owner Steve
YP productions