Jump to content

  • Log In with Google      Sign In   
  • Create Account


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 fholm   Members   -  Reputation: 262

Like
0Likes
Like

Posted 24 October 2013 - 07:21 AM

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?


Edited by fholm, 26 October 2013 - 05:08 AM.


Sponsor:

#2 Ohforf sake   Members   -  Reputation: 1797

Like
0Likes
Like

Posted 25 October 2013 - 02:29 AM

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).

#3 TheChubu   Crossbones+   -  Reputation: 4075

Like
0Likes
Like

Posted 25 October 2013 - 03:07 AM

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


#4 fholm   Members   -  Reputation: 262

Like
1Likes
Like

Posted 25 October 2013 - 04:00 AM

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



#5 L. Spiro   Crossbones+   -  Reputation: 13291

Like
0Likes
Like

Posted 25 October 2013 - 08:52 AM

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
It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#6 fholm   Members   -  Reputation: 262

Like
0Likes
Like

Posted 26 October 2013 - 05:04 AM

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 = 2k1 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 = 2k3, 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.


Edited by fholm, 26 October 2013 - 05:06 AM.


#7 dave j   Members   -  Reputation: 588

Like
0Likes
Like

Posted 26 October 2013 - 05:24 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS