Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BlueChip

different ways to avoid geo-mipmapping cracks

This topic is 5267 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi... I hope that this is the last question about "terrains".. ^__^ I''ve implemented my terrain simulation with geo mip-mapping technic... I like it, but a terrible problem are the cracks... The only solution that I''ve found with google, is the Willem H. de Boer''s solution, but perhaps there is another way.. more fast and easy... You know it? On gamedev I''ve read that many people use geo mip-mapping method, but none say how they resolving this problem.. Do you want share your knowledge? bye bye =)

Share this post


Link to post
Share on other sites
Advertisement
If you restrict the LOD of a chunk so that all adjacent chunks are within 1 LOD, then you have some options. How about this (I''ve never tried it)?

In geomipmapping, you are not required to always use every other vertex in the next lower LOD (though that is the normal method). You want the edge vertexes of each chunk to match those of adjacent chunks. Since the adjacent chunks are all within 1 LOD, you can arrange it so that there are 16 possible combinations (2x2x2x2). The only difference between each combination is the number of vertices along the edges (and the resulting triangles). So, each LOD has 16 index buffers (one for each possible combination), and you use the appropriate one depending on the LODs of adjacent chunks.


John Bolton
Page 44 Studios
Current project: NHL Faceoff 2005 PS2

Share this post


Link to post
Share on other sites
I've implemented that one and it works just fine! ( FarCry uses it as well FYI ). Remember you have a TOTAL amount of indexbuffers of 16 per LOD... not 16 per Chunk!

Heres a screen if you'd like to see it in action:
Clicky

[edited by - Dtag on June 6, 2004 3:24:57 AM]

Share this post


Link to post
Share on other sites
JohnBolton .... Dtag.... thanks very much...
I''m happy.... this way is more easy than Willem H. de Boer''s solution.

But in this way, for each chunk, I must know the LOD of adjacent chunks ... true?

how you manage this?

Share this post


Link to post
Share on other sites
Yes, you have to... I did it by storing 4 pointers to the 4 adjacent chunks for each chunk, NULL if there is no chunk.

Share this post


Link to post
Share on other sites
There is another very simply way, one which does not even restrict you to using only 1 LOD difference between adjascent levels (somethig I have still have not figured how to enforce, would it not cascade like mad?).

Simply draw triangle fans between two patches. The number of fans = number of vertices on the side of the lower LOd. Number of vertices on each fan = number of vertices on the side of the higher lod + 1 or 2 extra ending vertices. This works pretty nicely and is fast. No pre-computed storage is required.

Another far better technique (though I have not yet implemented it yet myself, am in the process of doing it, but I believe could work), is to stitch using a tri-strip. First you pre-compute a tri strip between same LODs. Yes, same LODs. This means when you will render it, it will just generate all degenerate tris. This is ok. (You can chose not to render these when LODs are same). Now, For 1 difference in LOD, jsut adjust the indice of every alternate vertice to next vertice. For 2 differnce in LOD, nudge next two vertices to the third vertice index. and so on.

I believe it would work. Though honestly have not yet tried it out myself.

Share this post


Link to post
Share on other sites
Hi again..

yes... trianglefan patches are good ( like Boer's solution ), but make some problem with my world manager...

I've followed the old method, and it works very fine.
Now cracks are only a bad nightmare...

But....
with method my memory is killed..

see


- Why?
+ becouse my world is made from 10X10 chunks ( vertexes 129x129 - each chunk is a vertex buffer)..
each chunk is splitted in 4X4 patches ( vertexes 33X33 - this is an index buffer)..
each chunk has 4 LODs....

So, before I had (10*10)*(4*4)*4 = 6400 index buffer
now I have (10*10)*(4*4)*4*16 = 102400 index buffer !!!!!!

These are too many...
so, If I can't to load a big big world in one shot, how do I get a big big world without loading during the game?
( as in a mmorpg )



[edited by - BlueChip on June 8, 2004 1:36:52 PM]

Share this post


Link to post
Share on other sites
Blue Chip .. I really do not undetstand why you are needing to make so many VBs or IBs.

here is what I am doing. This is not optimized but it is definately not using these many vertices.

I can presently easily do 1k * 1k .. and for some reason it is failing on larger size which I need to look into but it is definately not memory becasue even with 1k * 1k my memory consumption is below 100 MB.

Anyways, I am dividing the whole height map into 33 *33 or 65 *65 pathces. So there are are only about 100 ~ 400 patches in all. For each patch I have one VB and 1 IB. I call my IB as a multi-resolution IB as I use the same IB for successive LODs.

This leaves the problem of stiching. For stitching I use a convention and that is, I stich only to the right and to the bottom. This way I only need to pay attention to two sides. For each of these sides I just need two extra index buffers per patch to draw fans. My pathces overlap by 1 so that the neighbouring pathes edge vertices are already in my current VB. So I effectively just query the neighbour about its LOD. I kow my lod, and know what edge vertices are enabeld for me. From enighbours LOD I know what edge vertices are enabled for it. Since these edge vertices are already in my own VB, I just draw fans between the last column and the seoncd-last column vertex.

Actually I do skirts (rather than strips) and just use the last column twice, once as last column of left patch and once as the first column of the right patch.

You can download a demo of my technique from http://www.wiu.edu/users/muaiq/projects/terrain1/terrain1.zip
to get an idea!

Let me know if more explanation is required and I will be glad to do that.

[Edited by - AQ on June 16, 2004 11:41:23 AM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!