Making a terrain engine (master thesis)

Started by
39 comments, last by thallish 17 years, 10 months ago
Quote:Original post by Mike2343
Honestly why do you need it? The GPU can more then handle the verticies.

This argument ("You don't need LOD nowadays") aways comes up. And it's always wrong.

Say your poly budget was 1000 tris for the landscape. Now I could just brute force it and render the nearest 1000 in the view and it'd look ok. But if I actually had LOD then I could use those 1000 more efficiently and get the same visual quality but twice the draw distance. Thats going to be true no matter how high your poly budget actually is.

The real question is how complicated your LOD system needs to be. IMHO you don't need anything more complicated than geomipmapping. Nice high detail terrain, and switch to different sets of indices for farther away. Don't bother with geomorphing or anything complicated, just make sure that the transitions are far enough away so the snapping is minor.

Likewise for crack fixing schemes - keep it simple with something static like skirts. You still get LOD, but you're doing a minimal amount of CPU work and just letting the GPU do what it does best - blast through big chunks of static geometry.
Advertisement
Quote:Original post by Mike2343
I don't know if its been mentioned but you don't really need LOD


I get so frustrated when I hear this comment because as a general statement, it's complete bullcrap.

Depending on the quality and scale requirements of the terrain, it's very possible that you need to still use LOD. For medium-sized or coarse terrains you might not need LOD, but if a game like WoW tried to draw its entire terrain (the visible set at any given time) at its full resolution, you would definitely notice.

Quote:Original post by OrangyTang
This argument ("You don't need LOD nowadays") aways comes up. And it's always wrong.
QFT.

Particularly with some of the lightweight simplistic algorithms -- geomipmapping would be my choice -- you can perform LoD very efficiently. My own terrain system performs LoD with negligible performance penalty (it's a couple tens of thousands of cycles per second), and the poly counts are cut back sharply as a result. (Exact values depend on configuration, but it's generally 10%-20% of what the brute force would render, with no visible artifacts.)

And yes, I know Carmack said it. And I say he's wrong.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Funny, from what I read Carmack isn't using terrain LOD in his new engine. I personally know he's better then me so I assume he has a valid reason and has done the research.

I've seen what Ysaneya (very impressive btw) but having skimmed his Journal from time to time I've not actually seen him mention LOD. I'm not saying he hasn't but I've not seen it. Also, most of us aren't doing what he is doing. Most are working on limited range terrains (a 6' person can only see so far before something obstructs the view and 8x8-16x16 miles is normally more then enough for most FPS games).

I'm also talking MODERN hardware, not GF3 or older here (likely excluding GF4 too at this point).

1000 tri's for terrain? That's the face count of some LOD models ;-) But in all honesty if that's your triangle budget for terrain you're likely working with older hardware and I already said that I wasn't considering it.

Remember the OP has not stated exactly what this is going to be used for, or how far he needs to see. I was just pointing out for limited range terrain engines (under 16x16 miles or so) you can brute force it in most cases (higher density meshs of course will require it).

Edit:
You posted as I was typing mine up lol.
Quote:
And yes, I know Carmack said it. And I say he's wrong.


If you're a better programmer then him, more power to you. Like I said, in OUR case the poly count wasn't an issue compared to the CPU cycles we wanted to give up. It's also a mute point since the terrain engine is now shelved for the time being. Also, I'm not a Carmack fan (he's an awesome programmer, I just down't worship any coders period, it's a rule of mine) but I was brute forcing awhile ago and came to my own conclusion (you can believe it's wrong or right, I honestly don't care worked for us) that brute force was better for us and that the GPU could easily handle it.

Anyways, out until tomorrow I think. Take it easy.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

Quote:Original post by Mike2343
1000 tri's for terrain? That's the face count of some LOD models ;-) But in all honesty if that's your triangle budget for terrain you're likely working with older hardware and I already said that I wasn't considering it.

I deliberately picked a stupidly low number to show a point - that no matter how big (or small) your poly budget actually is, you can always get better results by spending the polys where they matter (ie. using LOD).
The main problem is not triangles but the shader complexity, because your terrain should support multple blended textures each with its own normal map, and various projected shadew textures like canopy shadows, model shadows etc..Also I would expect that terrains in future should use relief mapping or some variant.

So maybe some kind of shader LOD is needed, rather than geometry LOD.

however in my engine I have all these effects and I just brute force it with no problem.
This thread is derailing quite a bit, shouldn't we return to giving the op resources he wants? Surely it's up to him to decide whether games should have LOD, it's his thesis, not yours ;)
Ollie"It is better to ask some of the questions than to know all the answers." ~ James Thurber[ mdxinfo | An iridescent tentacle | Game design patterns ]
Quote:Original post by Mike2343
Funny, from what I read Carmack isn't using terrain LOD in his new engine. I personally know he's better then me so I assume he has a valid reason and has done the research.

...

Quote:
And yes, I know Carmack said it. And I say he's wrong.

If you're a better programmer then him, more power to you.

...


I'd argue that doing as he's doing would require you to be at least as good a programmer as he is. Therefore, if Carmack isn't using terrain LOD, you'd want to be just as good as he is to do the same.

Seriously though, I think you should build your terrain engine as normal, profile, with and without LOD, see what speed/view distance tradeof works best in your case.

[Edited by - issch on May 25, 2006 8:53:33 AM]
First of all I have got a lot of inspiration out of the discussion, and some of problems has been revealed to me. I will work with this further. And this discussion was exactly what i wanted so I am happy :-)

Quote:
Seriously though, I think you should build your terrain engine as normal, profile, with and without LOD, see what speed/view distance tradeof works best in your case.


Yeah this would be an idea and I will probably consider each of the methods. The hard part would be to specify what method would work under which circumstances and how to specify the criteria to describe the circumstance;-) But I guess that
also has a lot to do with the experience, which I will be getting a lot of in the next year.

I got to wonder though about how to make caves/overhangs in the terrain. I know I just read about it a week ago and I cant seem to find the information about it now. It was something about using a second heightmap. Does somebody have an idea on how to do this?

Also i found a report on this site that utilizes a mixture of a couple of the most popular algorithms. What is your take on that?

regards
thallish

regards/thallishI don't care if I'm known, I'd rather people know me
Not to do with terrain (but still relevent depending on the scope of your engine), but there is a very good paper by Jerry Tessendorf on ocean simulation that explains how to get the choppy overhanging waves using two extra height maps for x/z displacement. It also describes a very simple method for detecting self intersections. Even though he uses fft's to generate the maps in real time for oceanscapes, you could probably steal the same idea to come up with a way for pre-generating realistic terrains in this way.

This topic is closed to new replies.

Advertisement