Advanced terrain rendering

i played around with the terrain-tutorial. it's easy, but i couldn't find 2 features i'd like to use.

a) add another texture which should be mixed in based on the slope, not the height. why? a really high mountain would look like some sort of cake with its layers - a single, high slope should look rocky.

b) assign a texture to each quad (or edge between 4 quads) and let the renderer make the transitions on the fly while rendering the stuff. this way, it is easily possible to add streets, paths, anything to the ground.



are these features (or something similar) implemented?

I believe what you want to look at is jmetest.terrain.TestProceduralSplatTexture where a separate texture is being placed for a 'road' effect.



Also, you might want to take a look at multi-pass texturing. This is a tecnique that I use for up-close terrain to give added detail, but let only one pass work on the far away terrain. Examples: jmetest.renderer.TestMultitexture, jmetest.renderer.TestMultipleTexRender, jmetest.renderer.TestMultitexturePass



Hope that helps!

that should solve the slope/road-problems. i can generate an alpha-texture out of the slope angles and give it to a splattexturegenerator. thx.

now for the detail texture(s): i already use a detail texture (greyscale noise) like the flaghunt-tutorial does it, but this will add the same details to every spot of my terrain. i thought about using other alpha-maps to tell the renderer which detail texture to use where and what opacity to use. has anyone ever tried this? will it kill my graphics card?








You could also try realtime texture splatting for an alternative approach. Here's an implementation that uses GLSL shaders to do that:

http://www.jmonkeyengine.com/jmeforum/index.php?topic=4146.0

I think there are other solutions as well to be found searching the forum for "texture splatting".

That thread also includes a non-shader solution from MrCoder which requires you to render a pass for each tile.

I am currently working on a non-shader solution that utilizes all texture units available on the card (page1, page2), I plan to create a splatting engine which will smartly use shaders and/or texture units to increase performance.  It probably will be available for public use at some point so check the forums.

care to look at the terra terrain, just havent had time to do a simple render yet

Momoko_Fan said:

That thread also includes a non-shader solution from MrCoder which requires you to render a pass for each tile.
I am currently working on a non-shader solution that utilizes all texture units available on the card (page1, page2), I plan to create a splatting engine which will smartly use shaders and/or texture units to increase performance.  It probably will be available for public use at some point so check the forums.


terrainblock/page compatible?

It should work with any terrain system as long as the texture coordinates are aligned across the terrain.

Since TerrainPage uses smart culling then I might improve it so that it uses the culling data from previous passes to improve performance.