# GPU GeoClipmaps - One question...

## Recommended Posts

Im implementing gpu geo clipmaps based on the article here... http://research.microsoft.com/~hoppe/gpugcm.pdf So lets say you have a SQUARE image of the united states (like the one used in most of these articles). My question is, what happens when the geometry of your SQUARE clipmap rings reach the edge of your united states image / 'the edge of the world'? For example, in section 2.3.4 they show a picture of view frustum culling shown from above, which demonstrates exactly what im talking about. Starting at the viewer, you have SQUARE rings that grow larger and larger. HOWEVER at the EDGE of the image, you have a NON SQUARE area. How is the geometry for these NON SQUARE areas handled? A simple solution would be to have the geometry extend out into space, and just consider the height '0', but according to the pictures it looks like the geometry just magically gets cut off. I ask because im trying to adapt gpu geo clipmaps to a 'spherical world', by running SIX individual clipmaps, one for each side of a cube. The trouble is I have no clue how to handle the geometry when a clipmap extends over one of the edges (short of using a lot of 'partial pieces' to fill in the non square areas. a small dynamic vertex buffer perhaps). Thanks for any insight!

##### Share on other sites
Remember they'll be doing frustum culling on each of the regions shown in figure 2-5.

Of course there will be some part that goes off your terrain area when you get near to the edge. I think the simplest thing for your sphere thing would be to set the heights of the geometry over the edges to be lower than any point on the surface of the sphere.

As long as you draw the clipmaps in near to far order, you'll get Z culling and, if you have backface culling enabled, some triangles won't get that far. You could even get sneaky in your pixel shader and cull fragments that are 'below' the minimum surface height which would cheaply discard any fragments that that you know you won't want to draw.

##### Share on other sites
I guess my real question is - So you have the 'ring' structure as shown in figure 2-5, you must also have a simple 'square' patch for the finest detail (to go inside the finest ring), but what goes on the OUTSIDE of the coarsest ring? There has to be a THIRD geometric 'structure' (which doesnt seem to be mentioned in ANY of the papers) that goes OUTSIDE the coarsest ring, in order to fill in the remaining non square areas.

This all assumes that the geoclipmap CAN represent the ENTIRE image/dataset (and not just a specific square portion centered around the viewer). Is that assumption wrong? Are clipmaps only supposed to be able to visualize a local area around the viewer, and beyond that is just empty space? In all the videos/pictures it sure loooks like they zoom all the way back, revealing the ENTIRE image/dataset is represented with some form of geometry.

I have a video from the original (non gpu) clipmap article, and in that video they show view frustum culling form above, and once again, the geometry seems to go right the 'end of the world'. It looks like after the 'coarsest ring', they are just filling in the remaining portions of the dataset with square patches...

Can any geoclipmap expert help shed some more light on this topic?

##### Share on other sites
Hi. The size of the concentric rings in screen-space are roughly the same regardless of your position. This means for instance when far above the terrain the rings occupy more in world-space (coarser geometry). Maybe it becomes clear if you download the demo from the same page and play around? The geometry can extend beyond the terrain dataset but it does not look really good - in a real-world application one would probably perform some clipping when reaching "the end of the world" (for instance in the VS or with custom clip planes).

Maintaining 6 individual clip-planes sounds a bit drastic on the CPU load but maybe I don't really understand your approach. Have you looked at the paper Spherical Clipmaps (http://www.zib.de/clasen/?page_id=6)?

kind regards,
Nicolai de Haan Brøgger

##### Share on other sites
Quote:
 in a real-world application one would probably perform some clipping when reaching "the end of the world"

This is the whole point of my question, HOW is this clipping handled? There doesnt seem to be any mention of this 'handling' in any of the papers.

Just look at the 'top down view frustum culling' pictures found in the gpu clipmap article, and others. The center square patch, thats simple. The concentric rings that surround the center square patch, thats simple. The geometry BEYOND the coarsest outter ring, thats a mystery.

##### Share on other sites
Quote:
 Original post by ZealousEngineThis is the whole point of my question, HOW is this clipping handled? There doesnt seem to be any mention of this 'handling' in any of the papers.Just look at the 'top down view frustum culling' pictures found in the gpu clipmap article, and others. The center square patch, thats simple. The concentric rings that surround the center square patch, thats simple. The geometry BEYOND the coarsest outter ring, thats a mystery.

The "geometry BEYOND the coarsest outter ring" isn't there. I'd guess that there's no geometry to be drawn. NOT drawing things, in this case, is quite simple.

Basically if you take two clipmap terrains and put then "next" to each other you'll see the centre square and concentric circles appearing on the second clipmap terrain as you travel from the first terrain onto the second. When you wrap this onto a sphere you should see the same thing happening as you travel over the horizon (figuratively speaking) of the sphere because you'll be travelling from one clipmap to the next.

I'd try and draw a picture to illustrate but I'm replying from work.

Andy

##### Share on other sites
Quote:
 The "geometry BEYOND the coarsest outter ring" isn't there

Of course thats the 'easy' way to do it, however, take a look at this video...

...at 1:10 you can clearly see that they ARE rendering areas 'beyond the coarsest ring'. Im curious as to the technique they are using, because it would really help me with my spherical implementation (since it would be nice to work with SQUARE clipmaps that cover the entire cube face).

##### Share on other sites
Quote:
Original post by ZealousEngine
Quote:
 in a real-world application one would probably perform some clipping when reaching "the end of the world"

This is the whole point of my question, HOW is this clipping handled? There doesnt seem to be any mention of this 'handling' in any of the papers.

Just look at the 'top down view frustum culling' pictures found in the gpu clipmap article, and others. The center square patch, thats simple. The concentric rings that surround the center square patch, thats simple. The geometry BEYOND the coarsest outter ring, thats a mystery.

They don't do clipping when near the end of world data. I think they just use zero for the height beyond the "end of the world". The bit where Canada would be in figure 2-7 in the GPU paper is blue, the same as the sea elsewhere.

Using clipmaps when drawing planets as you want to will complicate things. Clipmaps are only useful when you are nearish the planet's surface - the rest of the time a smooth sphere will do. This guy seems to have implemented something similar to what you are aiming for. Look at this video in particular. It shows having a smooth sphere when far away and using a clipmap for extra detail when close to the planet.

##### Share on other sites
Wow really cool videos! Anyone have any details on how he managed to blend a clipmap ONTOP of the sphere (*perhaps just render the sphere first with zwrite off?)? Also how did he handle data parameterization involved with mapping his height data to the clipmap... Was he using 6 square heightmaps, one for each face of a cube, or was he doing something else?

*Gah I keep watching those videos, trying to figure out - how on earth could you move a single square clipmap around a sphere wihtout having to rotate/twist it?

[Edited by - ZealousEngine on April 23, 2008 4:47:40 PM]

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628365
• Total Posts
2982273

• 10
• 9
• 13
• 24
• 11