GeoClipMaps - splitting geometry into smaller meshes or using fewer large meshes

Started by
5 comments, last by dave j 10 years, 5 months ago

Check the post further down for another question on GeoClipMaps.

I am in the process of implementing GeoClipMaps (for the second time, first attempt never finished), and I have been looking through the online resources on terrain rendering to see if something new has popped up since my last try.

So i found this post http://electronicmeteor.wordpress.com/2013/02/10/big-progress-on-geo-clipmaps-and-terrain/, to cut things short - in the post the author explains that instead of doing it like in the GPU Gems article, where they split up each level of geometry into several parts allowing just a few vertex buffers to be allocated for the entire terrain, the author instead pre-allocates a mesh for each clip level, see screenshots:

GPU Gems:

02_clipmaps_05.jpg

Blog Author:

clipmaps2.png?w=605&h=339

The above screenshot from the blog is a work in progress and still has gaps, etc, but I am thinking about the pros/cons of these approaches. The approach in the blog seems a lot easier to build, but I am thinking there could be some major drawbacks to doing it like this (memory requirements, needing one separate vertex buffer per clip level, etc).

Anyone willing to weigh on this?

Advertisement
One vertexbuffer per level is not necessary.

I did s.th. similar. I have one central mesh, one ring mesh and one transition mesh (also a ring but thinner), the latter two being rendered multiple times with different scales. The memory impact is negligible but since all meshes are always visible, you loose the ability to frustrum cull the terrain behind the camera. On the up side, you have fewer drawcalls.

If I find the time, I'll try to rearrange the indices in the indexbuffer in a way, that I can render only specific index ranges in each ring, where each index range corresponds to one section of the ring. That way, I should gain the ability to frustrum cull the terrain, but without needing significantly more draw calls (at least when the index ranges can be merged).

I can't notice how much different this approach is from, say, a quad tree based LOD. Unless I am missing something...

"I AM ZE EMPRAH OPENGL 3.3 THE CORE, I DEMAND FROM THEE ZE SHADERZ AND MATRIXEZ"

My journals: dustArtemis ECS framework and Making a Terrain Generator

One vertexbuffer per level is not necessary.

I did s.th. similar. I have one central mesh, one ring mesh and one transition mesh (also a ring but thinner), the latter two being rendered multiple times with different scales. The memory impact is negligible but since all meshes are always visible, you loose the ability to frustrum cull the terrain behind the camera. On the up side, you have fewer drawcalls.

If I find the time, I'll try to rearrange the indices in the indexbuffer in a way, that I can render only specific index ranges in each ring, where each index range corresponds to one section of the ring. That way, I should gain the ability to frustrum cull the terrain, but without needing significantly more draw calls (at least when the index ranges can be merged).

Ah yes, of course - one vertex buffer is only needed + one for the center. But yes, of course - you loose the ability to do frustum culling. Interesting idea bout the index buffers tho and to do frustum culling through that.

I can't notice how much different this approach is from, say, a quad tree based LOD. Unless I am missing something...

Well, compared to something like a quad-tree based geo mipmapping which is usually done on the CPU, this has a few benefits:

1) All of the heavy computation is done on the GPU

2) A lot less draw-calls

but I am thinking about the pros/cons of these approaches

The pro is that it is a small bit easier to conceptualize. Once you realize the only difference is in scale, which simply doubles, making things pretty easy to understand, you would not be willing to make such a trade-off. Using multiple buffers takes more memory and is much slower to process. Plus you are limited in the number of levels you can have, which could otherwise be dynamic.
There is very little (no) reason not to use the same buffers for every level.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Thanks for all of your answers! I have run into a problem with my implementation, it's a specific paragraph from the GPU Gems 2 paper which I just can't wrap my head around, this one to be exact, and especially the bolded part:

The choice of grid size n = 2k?1 has the further advantage that the finer level is never exactly centered with respect to its parent next-coarser level. In other words, it is always offset by 1 grid unit either left or right, as well as either top or bottom (see Figure 2-4), depending on the position of the viewpoint. In fact, it is necessary to allow a finer level to shift while its next-coarser level stays fixed, and therefore the finer level must sometimes be off-center with respect to the next-coarser level. An alternative choice of grid size, such as n = 2k?3, would provide the possibility for exact centering

If we take the example image from the paper again:

02_clipmaps_05.jpg

My "understanding" of the way the clip maps were update was that you floor the position of the viewpoint to an int, and such get the center vertex point if this is not the same as the previous center point, you update the entire map. Now, this obviously is not the case - but what I am failing to understand is this:

If you look at the image above, if the viewpoint was to move one unit to the right, then the inner ring (the one just around the view point + white center square) would end up getting a 1 unit space on both the left and right side of itself. But there is nothing in the paper that deals with this, what i mean is that it would end up looking like this (excuse my crummy cut-and-paste editing of the above image):

02_clipmaps_05_updated.jpg

This is obviously not a valid state of the. So, would the solution be that a clip ring (layer) can only move in increments of the ring/layer it's contained within? Wouldn't this end up being very restrictive? I feel like I am missing some crucial understanding of parts of the algorithm, but I have been over both this paper and the original paper from 2004 and I just can't see what I am not getting.

This is obviously not a valid state of the. So, would the solution be that a clip ring (layer) can only move in increments of the ring/layer it's contained within? Wouldn't this end up being very restrictive? I feel like I am missing some crucial understanding of parts of the algorithm, but I have been over both this paper and the original paper from 2004 and I just can't see what I am not getting.


Yes. You update the inner layer when you move two of its units because that matches one unit of the containing layer and the grids can stay aligned.

This topic is closed to new replies.

Advertisement