Game Development Community

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.

img148.imageshack.us/img148/3006/screenshot00200000.pngimg152.imageshack.us/img152/1940/screenshot00200001.pngimg110.imageshack.us/img110/144/screenshot00200002.png
#61
05/19/2009 (9:09 am)
To the left I have a 256x256 terrain I created via file->create blank terrain. To the right I have a 2048x2048 terrain I created in the same way.

farm4.static.flickr.com/3598/3546327272_66c63e7a1c.jpg
Here I changed the right side terrain's squareSize to 0.125, as you can see, it is now the same size visually as the left side terrain.

farm4.static.flickr.com/3584/3546327378_b547de44d3.jpg
Here looking in close and in wireframe... there is an obvious difference in detail.

farm4.static.flickr.com/3538/3545520841_1ba4edb5e0.jpg
Note that I had to turn the screenError field to zero in order to keep it from lod-ing, otherwise it might "appear" to be the same res as the left side until you get very close to it.

You have more detail to work with on the right side any way you look at it. If you have mountains or rolling hills, they will look smoother and less blocky on the terrain on the right.
#62
05/19/2009 (9:11 am)
Quote: @Jacob -- It would be a blessing to me (and probably alot of others) if you would write up a tutorial.

Include me in that set of 'others'. I have been following Steve and Aaron's Bundysoft forum thread to try and find out if more than a heightmap can be exported from L3DT for use in T3D.


Quote: And you should certainly not have to edit all your assets just because you want higher resolution terrain.

From what I understand Bo you don't have to touch any of your other assets. Just make sure your terrain is big enough before bringing it in so that when it is given a higher res it will shrink down nicely to the size you need. No?

#63
05/19/2009 (9:20 am)
Well, no idea when it'll be for me to get home. I may just tell my "boss" to shove it and go home early.

And yea, I should apologize for my irratibility, I have a nice bout of insomnia going on, haven't slept in a day and a half and am a bit on edge sooo...
#64
05/19/2009 (9:21 am)
Ah, don't worry about it Jacob, just keep making cool terrain posts ;)
#65
05/19/2009 (9:38 am)
... with great talent comes great irritability
#66
05/19/2009 (10:02 am)
First, loving the screenshots I'm seeing from the OP.

Second, I have a question for.. well.. everyone reading this thread.

Has anyone else experienced significant shadow rendering bugs with larger (ie, larger than stock TGE's 256 resolution) terrains? I reported this as a bug, and got a "flagged" response, but I'm curious if anyone else has experienced it. I haven't seen any other mention of this bug, so I'm considering that it may be hardware-specific.

It's a significant failure of the shadow rendering system, resulting in large incorrect areas of shadow on the terrain. In some cases it looks like lighting is being cast from every direction at once, resulting in a complete circle of shadowing around one mountain peak. In other cases, entire blocks of terrain are rendered as shadowed. Exaccerbated when moving objects (for example, large vehicles) are introduced to the scene.

This goes beyond a loss of lighting accuracy (as mentioned in the OP), and is a complete shadow rendering failure. I'm running an nVidia 285 on XP x64 with an Intel Q9650 on an EVGA 790i (nVidia) board. Every heightmap resolution on terrain over 256 causes severe shadow rendering issues as soon as the terrain is significantly altered.

None of the screenshots I see here are close enough to the terrain to show the actual Adv Lighting terrain self-shadowing. You can see the shading (ie, terrain is automatically darker when facing opposite the light source) is working properly, but it is range-independent.

*edit: I should mention that I'm using a squaresize of 8.
#67
05/19/2009 (10:12 am)
I beleive I know what issue you're referring to. When I get home I'll take a few shots and see if it's the same issue you're having and if so, help you in correcting it.
#68
05/19/2009 (11:19 am)
Well language barriers certainly do suck. I can see where Bo is coming from, and i find my self agreeing with him, some way of editing or resizing the 'base' terrain from within the engine would be quite a useful feature, i think much of his frustration is based on the fact that you most exit and reload your heightmaps.

I'm just gpoing to throw in an extra issue here though, the fact that T3D invisinly renders... masses of terrain you cant see based on the number of terrain tris means that only the most powerful of computers can run terrains better than 1 meter square sizes anyway (unless theres some massive optimisations to be done) as it is my 1 meter square size terrain renders/processes whatever you want to call it.. 2.5 - 3 million tris per frame as it is. any more than that and my not exactly old crappy system would crumble i think
#69
05/19/2009 (2:20 pm)
"...exit and reload your heightmaps."

I have found you can directly import the hightmap image, and it will replace the terrain block that have the same name. I can edit the hightmap image and re-import 'on the fly'.
#70
05/19/2009 (2:35 pm)
sorry yes, by exit and reload i meant "edit externally and re-import".

its still an awkward operation particularly if you dont have photoshop, theres a thread somewhere about heightmap formats i think
#71
05/19/2009 (3:22 pm)
Sounds like he will probably be able to get away with a high poly/resolution map because his camera will be in an overhead Diablo style setup so it won't be peering out toward the rest of the terrain killing the engine. In that case it is warranted to want to try to get the terrain as good looking as humanly possible since there will be a lot of camera focus on it with the camera fixed straight at it.

Will still have to face the zoning issues though if it is a large wilderness type game as the engine isn't setup to load in demand for that.
#72
05/19/2009 (4:42 pm)
ok, i'm using a 2048x2048 heightmap at 1 m per square and i think 256 height, so i'm expecting some rough treatment of my resources.

so i understand this image takes a few tris to display(wanted to show off strata created by conrads resource too)
www.bloodknightstudios.co.uk/t3d/screenshot_003-00001.png
but i dont understand this
www.bloodknightstudios.co.uk/t3d/screenshot_003-00000.pngfrom 2.4 mil to 2.2 mil tris
#73
05/19/2009 (5:12 pm)
Yeah I would say something is fishy there. I get major FPS drop if I look at 1 corner of a map to another with just the terrain on, but one would think the tris would drop looking straight at the ground.

Hoping a bit of terrain to terrain occlusion will be included as it helps with that a bit, as done setting in some view distance scalers for performance, but we will see what kind of end result we get out of Beta.
#74
05/19/2009 (5:16 pm)
In Beta1 terrain cell culling and lod is incorrect for terrains that are offset from 0,0,0 or have a rotation. Seems to me like this has the be whats happening for you Bloodnight in that screenshot looking straight down.

Other changes for beta2 should also cause culling to grab a lot less triangles.
#75
05/19/2009 (5:18 pm)
Oh cool, I was just about to start working on documenting some LOD oddities I was observing.
#76
05/19/2009 (7:25 pm)
@James (and all others)

Thanks, i kind of got it to work (why is it called screenError and not LOD ?) but one fix makes new bugs :P

2048x2048 HM, import as 0.125 squareSize.

Tried to raise terrain, but just a tiny small amount and got this

see screenshot

using round brush, it does not look round to me, and also it "broke" or made a hole true terrain.

Just a heads up :) and ill wait to complain more about this until beta 2 or 3 :P

And btw, yes, while im fairly good in "normal" english, explaining stuff in it is frikkin hard :P

EDIT:

I also think there is inconsistency between terrain and tool.

If you see the screenshot, the size of squares in the tool itself would make nice terrain, but, the size of triangles on terrain is larger, so it get "roughed" out.
#77
05/19/2009 (7:25 pm)
@Bloodknight

Consider that unlike the original TGE terrain it doesn't cull individual trangles from being sent to the card... it culls cells. The polycount is the number of triangles sent to the video card.

A cell can have about 32K triangles each. And currently if that cell has several material layers on it then it has to render it several times each. Worse the shadow rendering also has to tender the terrain cells... once per PSSM split.

So while with upcoming betas things will get much better... looking down won't ever really result in very small polycount from terrain.
#78
05/19/2009 (9:14 pm)
Well, here ya go.
www.garagegames.com/community/resources/view/17275

Hopefully that's helpful. Now if you all don't mind, I'm going to try to sleep. It's been a couple days now, so I should be tired enough.
#79
05/19/2009 (9:38 pm)
@Jacob

Thanks :) awesome tutorial and i can see you put alot into it (thought i dont own L3DT or plan on buying it)

and good night :P
-----

However im going for use of T3D internal tools (why else have a editor in the first place).

L3DT can make awesome terrains and cost 34.95$, Torque3D cost 1000$ (35$ of those should/could probably be value of terrain editor so why ask for less then L3DT can do'ish).

Now, im not dissing T3D, or anything like that, and this is beta and im well aware of that, but for final i do expect a smooth editor that just works like it should, and i think its only fair to ask for that, anyone not agreeing just have too much money :).

Reason ofcourse asking for smooth terrain editor is that i dont expect my team to run out and buy external tools after buying the engine at 1000$, its kind of "expected".

And sorry for me being a "rear end of a donkey", i just belive in speaking my mind, even if i step on a few toes. :)
#80
05/20/2009 (4:50 am)
@Bo - Do you expect a game engine to have modeling tools built in as well? If you start from a completely blank terrain, you can absolutely use the in-game terrain editor, and a lot of time, to come up with a lot of good looking terrain. The reason that you might want to use software like L3DT is because it goes way above and beyond to calculate really realistic looking terrains. Do you really expect logic such as erosion to be built into a game engine?

Additionally, there's a FREE standard version of L3DT, should be more than sufficient for your T3D terrains.