Caves and Vertical Cliffs with TGEA Terrain
by Caylo Gypsyblood · 01/26/2009 (10:00 pm) · 26 comments
Testing the flexibility of TGEA's terrain system I decided to try an old trick i have used on other much more expensive 3D engines.
First test was to see if Torque could use a high map terrain to build vertical cliffs.

The cliff face is complete with overhangs, and if one wish placing another terrain map at the top of the cliff also works. I used a 512x512 maga terrain hightmap, cut into 4 normal hightmaps sections.
Once imported into TGEA and I was done painting textures, I rotated the 2 cliff faces and placed them on the 'ground' terrain.
My next test was to make caves useing TGEAs terrain systm.

This is accomplished by designing your hightmap, and import it.Paint your textures. Now copy it then flipping it 180 and place it over the 'ground' terrain.
I have used some clumsy voxel terrain implementations and always hated how much time and effort they take. Now Torque allows more then one terrain and allows the level designer to rotate them. The flexibility far exceeds what current voxel terrain can do, and is much easier to work with.
Think of floating islands, deep canyons and arching land bridges!
First test was to see if Torque could use a high map terrain to build vertical cliffs.

The cliff face is complete with overhangs, and if one wish placing another terrain map at the top of the cliff also works. I used a 512x512 maga terrain hightmap, cut into 4 normal hightmaps sections.
Once imported into TGEA and I was done painting textures, I rotated the 2 cliff faces and placed them on the 'ground' terrain.My next test was to make caves useing TGEAs terrain systm.

This is accomplished by designing your hightmap, and import it.Paint your textures. Now copy it then flipping it 180 and place it over the 'ground' terrain.
I have used some clumsy voxel terrain implementations and always hated how much time and effort they take. Now Torque allows more then one terrain and allows the level designer to rotate them. The flexibility far exceeds what current voxel terrain can do, and is much easier to work with.
Think of floating islands, deep canyons and arching land bridges!
#22
I'm working on something else right now, but when I get a chance, I may try taking this idea a bit further. It would require some modifications to the terrain class, but what I'm thinking of is a terrain object container, a bit like the MegaTerrain object, to which an arbitrary number of terrain blocks can be added. It would automatically stack the blocks, flipping every second one. But most importantly, it would automatically trim any polygons that cross over or under the other blocks in the stack. So, if you want a floating island, you would have one block for the top surface, with a high spot in the middle. And another block for the underside, with high areas all around the edges. Wherever the height of the underside block exceeds the height of the topside block, neither block renders anything, and the polys at the crossover area get neatly trimmed. If all the blocks are aligned correctly, the trimming should come a pretty low cost, I think.
01/28/2009 (6:56 pm)
Very cool. I've wanted to use a layered terrain system ever since playing Drakan: Order of the Flame. They used multiple terrain layers to great effect, and to this day I have never seen another game that looks quite the same.I'm working on something else right now, but when I get a chance, I may try taking this idea a bit further. It would require some modifications to the terrain class, but what I'm thinking of is a terrain object container, a bit like the MegaTerrain object, to which an arbitrary number of terrain blocks can be added. It would automatically stack the blocks, flipping every second one. But most importantly, it would automatically trim any polygons that cross over or under the other blocks in the stack. So, if you want a floating island, you would have one block for the top surface, with a high spot in the middle. And another block for the underside, with high areas all around the edges. Wherever the height of the underside block exceeds the height of the topside block, neither block renders anything, and the polys at the crossover area get neatly trimmed. If all the blocks are aligned correctly, the trimming should come a pretty low cost, I think.
#23
I too have always been hugely impressed with how well Drakan pulled that off (Drakan: Order of the Flame is one of my all-time favorite games) and I have been slowly pushing the Torque terrain system in that direction over the years (like adding support for multiple TerrainBlock's to TGEA 1.7).
01/29/2009 (11:05 am)
Quote:
I've wanted to use a layered terrain system ever since playing Drakan: Order of the Flame. They used multiple terrain layers to great effect, and to this day I have never seen another game that looks quite the same.
I too have always been hugely impressed with how well Drakan pulled that off (Drakan: Order of the Flame is one of my all-time favorite games) and I have been slowly pushing the Torque terrain system in that direction over the years (like adding support for multiple TerrainBlock's to TGEA 1.7).
#24
As someone much more familiar with the terrain system than myself, can you think of any reasons why my idea might be more difficult to implement than it sounds?
01/29/2009 (1:56 pm)
Matt, I'm very happy to hear that. The landscapes in that game were really a joy to explore and fly around, and it was really only the layering that distinguished it from other games of the time. I can only imagine how something like that could be improved by some foliage replicators, a good water shader, and other modern eye candy that wasn't possible back then.As someone much more familiar with the terrain system than myself, can you think of any reasons why my idea might be more difficult to implement than it sounds?
#25
We also ran into some mipmapping issues on the edges of the terrains which we did some pretty nasty hacks to get around with Megaterrain.
However, not all is bad news. With some of the improvements going into terrain rendering in Torque 3D some of these issues will get a *lot* easier to manage or to outright fix =)
01/29/2009 (2:30 pm)
I suspect the "trimming" you are planning to do is going to be harder than you suspect. One of the issues we had with linking multiple terrains is that the TerrainBlock has 0 through 255 data points but renders 0 through 256 with the last set of points being the far edge. This is extremely handy when you are tiling the terrain infinitely like we used to always do since it means that you will always match up on your edges. However, it gets problematic when you reduce your rendering to a single tile and unfortunately it is very much non-trivial to fix the rendering side of TerrainBlock currently. Megaterrain was a work around that we did that allows the terrains to know about their neighbors heightfield data and to use that for the "256" data points when rendering. This also allowed for automatic "seam stitching" but you can still see evidence of the issue I just described on the outer edges of the Megaterrain.We also ran into some mipmapping issues on the edges of the terrains which we did some pretty nasty hacks to get around with Megaterrain.
However, not all is bad news. With some of the improvements going into terrain rendering in Torque 3D some of these issues will get a *lot* easier to manage or to outright fix =)
#26
01/29/2009 (3:44 pm)
Mmm, maybe it would not be time well spent then. I'll wait and see what I can do with the new system when it arrives. Although, as there is a public wish list for Torque 3D features, I would simply ask that you do whatever you can to continue pushing the terrain system in that direction.
Torque Owner Britton LaRoche