Sign in to follow this  
ZealousEngine

GPU GeoClipmaps - One question...

Recommended Posts

ZealousEngine    100
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 this post


Link to post
Share on other sites
dave j    681
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 this post


Link to post
Share on other sites
ZealousEngine    100
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 this post


Link to post
Share on other sites
ndhb    246
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 this post


Link to post
Share on other sites
ZealousEngine    100
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 this post


Link to post
Share on other sites
NineYearCycle    1538
Quote:
Original post by ZealousEngine
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.


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 this post


Link to post
Share on other sites
ZealousEngine    100
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...

http://download.microsoft.com/download/b/f/b/bfbf25d4-a62b-4a28-8b4a-dbc3939ccad3/geomclipmap.wmv

...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 this post


Link to post
Share on other sites
dave j    681
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 this post


Link to post
Share on other sites
ZealousEngine    100
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]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this