Which terrain technique is suitable?

Started by
12 comments, last by Sword7 5 years, 7 months ago

Hello,

I am university student. This year I am going to write bachelor thesis about Vulkan app using terrain to render real places based on e.g. google maps data.

I played World of Warcraft for 10 years and I did some research about their terrain rendering. They render map as grid of tiles. Each tile had 4 available textures to paint (now 8 by expansion WoD) However I found issue about this implementation, that's gaps between tiles. Is there any technique which solves this problem? I read on stackoverflow that guys find only solution in using smooth tool and fixing it manually. Main question: is this terrain rendering technique obsolete? Is there any new technique that replaces this method to render large map as small tiles?

Should I try to implement rendering terrain as grid of tiles or should I use some modern technique (can you tell me which is modern for you?). If I should implement terrain as one large map to prevent gaps between tiles how textures are applied for such large map?

 

Thanks for any advice.

Advertisement

I'd start with Morgan McGuire's article from 2014. It's still close to the state-of-the-art.

vterrain.org is a virtual treasure trove of older techniques, but they don't seem to have updated much since 2010.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

10 hours ago, swiftcoder said:

I'd start with Morgan McGuire's article from 2014. It's still close to the state-of-the-art.

vterrain.org is a virtual treasure trove of older techniques, but they don't seem to have updated much since 2010.

Thanks for link about Morgan McGuire. I read that article already. If I undestood correctly it's one large map. For his example he didn't care about frustrum culling.

Also thanks for pointing to vterrain.org. I didn't read those old techniques, but I guess I should go with Morgan McGuire's technique to be modern.

4 hours ago, glararan said:

If I undestood correctly it's one large map. For his example he didn't care about frustrum culling.

That's right. Chunked terrain with frustum culling was necessary a decade ago, but modern GPUs are really good at transforming and discarding big chunks of geometry. Assuming your terrain geometry is all loaded into GPU buffers, it's typically a lot simpler to just throw the whole lot at the GPU, and let it discard everything out of view. Also tends to perform a little better, versus culling chunks on the CPU and then having to issue a separate drawcall (each likely with some state changes) for each chunk, every frame.

Morgan's article/sample code is particularly good because he calls out a lot of the little quality gotchas (rounding off grid positions, stitching meshes at LOD boundaries, manually filtering the heightmap at lower LODs, etc.)

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

What technique I should use for more than 5 texture rendering?

3 hours ago, glararan said:

What technique I should use for more than 5 texture rendering?

Where is the 5 texture limitation coming from? Is this base texture + a 4-channel blend map?

Megatexturing is always an option (works decently with geoclipmapping, may require excessive amounts of storage). You can combine multiple blend maps. You can texture terrain procedurally, instead of using blend maps...

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

18 minutes ago, swiftcoder said:

Where is the 5 texture limitation coming from? Is this base texture + a 4-channel blend map?

Yea that's what I meant.

19 minutes ago, swiftcoder said:

You can texture terrain procedurally, instead of using blend maps...

I would like not use procedural terrain texture based on height. Or did u meant something else? Of course it could be used as toggle option in app, but I would like manually painting.

2 hours ago, glararan said:

I would like not use procedural terrain texture based on height. Or did u meant something else?

You can expand on the basic height+slope that everyone starts with, in a lot of interesting ways. Proximity to water, local weather conditions, underlying geological features, and so on and so on...

2 hours ago, glararan said:

I would like manually painting

Megatexturing is still sort of the nirvana, provided you can deal with the storage implications. But you can get clever with other blend map schemes.

For example, a 4-channel blend map can naively encode blending between 4 hardcoded materials. But it can also encode 2x [material ID, blend factor] pairs. If you load all your materials into a texture array indexed by the material ID, you can have effectively unlimited materials, just so long as you never need to blend between more than 2 in a single pixel.

Use 2x 4-channel textures for the blendmap with this scheme, and you can perform the same 4-way blend you started with, but with many more materials.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

2 hours ago, swiftcoder said:

Where is the 5 texture limitation coming from? Is this base texture + a 4-channel blend map?

Megatexturing is always an option (works decently with geoclipmapping, may require excessive amounts of storage). You can combine multiple blend maps. You can texture terrain procedurally, instead of using blend maps...

While megatexturing works well (even though software implementation is still a must due to limitations of hardware implementation), it can introduce numerous other complications - like determining which part needs to be loaded at certain resolution. While this is straight forward when you have just a single camera - multiple cameras (like in Half Life 2 F.e. - basically having another camera looking at world and rendering into texture) or reflections (which are a bit of nightmare for megatexturing) complicate this further.

6 minutes ago, swiftcoder said:

Use 2x 4-channel textures for the blendmap with this scheme, and you can perform the same 4-way blend you started with, but with many more materials.

You can always blend multiple terrain geometries with different splatmaps - allowing you to have infinite number of textures you mix. While this introduces overdraw terrain was done like this in the past to overcome limitations of number of splatmaps.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

11 hours ago, swiftcoder said:

For example, a 4-channel blend map can naively encode blending between 4 hardcoded materials. But it can also encode 2x [material ID, blend factor] pairs. If you load all your materials into a texture array indexed by the material ID, you can have effectively unlimited materials, just so long as you never need to blend between more than 2 in a single pixel.

Use 2x 4-channel textures for the blendmap with this scheme, and you can perform the same 4-way blend you started with, but with many more materials.

This sound's great. I will take this direction

This topic is closed to new replies.

Advertisement