VTF to do terrain rendering

Started by
11 comments, last by MARS_999 15 years, 8 months ago
Anyone here used VTF to do terrain rendering vs. old school methods? Would there be any speed increases from using VTF? Other than the mesh being dynamic easier I would guess with VTF, is there any other reason to use it for terrain. I know water is a good choice. Also what about taking a mesh of say 17x17 or 33x33 and load that up as VBO and use the texture array extension to load up each 33x33 chunk of the terrain as a layer for the whole terrain? Then you would only have a VBO of 33x33 vertices and a small IBO for that mesh, and reuse it over and over again to render whatever size terrain you want?
Advertisement
The reason that I use VTF is that I can have only one vertex and index buffer and tile them. It saves on memory. Basically what you were saying in your second paragraph.

However, I tried small sizes like 17x17 and 33x33 and had hard times rendering a large mesh(4k x 4k). By making the size larger, such as 129x129, there was a large speed increase (2.5x if I remember correctly). The bottleneck seemed to be coming from the many draw calls that were needed. Remember, vbo's are optimized for rendering large numbers of triangles, nor repeatedly rendering small numbers.

Also, you can implement LOD easily by simply having more than one index buffer (one for each level). If you want to keep things simple, keep track of the adjacent patches and using the vertex shader move some of the vertices on the finer patches to make sure there are no cracks. This keeps you from making many index buffers for each level.

Hope this answers you questions.
Hello, SO would you say the VTF method for terrain rendering is faster than using a VBO that holds say a 512x512 mesh and smaller? ANd larger meshes the VBO was faster?


Thanks
No, I use vertex texture fetch along with a single VBO to render my terrain. The combination of the two saves memory and seems to render faster (because I can make use of really efficient LOD).

I don't really know if there is a big speedup with VTF but the fact that everything is handled in my vertex shader greatly increases the amount of flexibility i have. I don't have to ever write my vertex buffer again, so it is really efficient. VBO's that are static are heavily optimised, while dynamic VBO's are slower, if I remember correctly. So I guess you would get a speed boost from that if you were changing your mesh many times.

Oh, and I just thought of this, you could theoretically use a single terrain object to render hundreds of terrains. You just pass a texture to the render function. The vertex shader will take care of the rest for you. So even more memory efficient :)
On the other hand you limit yourself to heightmap terrain without overhangs or caves. Did benchmark the costs of a vertex texture fetch? I guess it should be equally fast as TFs in the fragment shader due to the unified architecture
http://www.8ung.at/basiror/theironcross.html
Well in terms of overhangs or caves, what I do is replace the patch that has that feature by a 3d model. The adjacent patches automatically adapt to the LOD of the center model (it took a while to figure out how).

As far as I know, there are no terrain methods (besides voxel terrain) that allow caves.

Also, the vtf is really fast on most recent graphics cards, and even if I do lose a few fps (i haven't benchmarked, so i don't really know), the trade off in ease of use is more than worth it.
You should be able to make caves and overhangs with GS support...
Perhaps, but I thought that the number of triangles that could be outputted were limited because gs are slow in comparison to the other shaders. Thus making the maximum size of the caves small. Please correct me if i'm wrong.
what about ATI and VTF, I know that newer ATI cards support VTF, but they didn't always. How common is VTF on ATI hardware now?
pushpork
From what I have read all X2000 series and newer have VTF.

This topic is closed to new replies.

Advertisement