Archived

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

Chaucer

chunked lod

Recommended Posts

I was hoping someone could point me to a good chunked lod tutorial or article. I''ve really only found one(http://tulrich.com/geekstuff/chunklod.html) and it''s pretty difficult to understand. Thanks.

Share this post


Link to post
Share on other sites
That's one of the better sites on this subject. Here is a link of pretty much all of them out there.
LINKY

Word of warning. As far as difficulty goes, they are all pretty complex. I find it works best to skim it, read it carefully, get a drink or a snack or something to get your mind off it for a few minutes and then come back and read it over twice more. After that it's a few iterations of confused staring at the screen, head scratching, hair pulling and then sometimes it clicks.

It still hasn't fully clicked for me either but don't feel bad. The reason there aren't more links and tutorials on this is because it's bloody complicated and those who have gotten it right in code are either under NDAs and can't tell us or are too dumbfounded that they accomplished it in the first place to be able to enlighten us

YannL is great in this field as his work is quite nice and he's very open with his ideas.

Cheers YannL

Hope the above links help,
Webby

[edited by - websitewill on October 16, 2003 10:00:32 PM] ** EDITED HYPERLINK

[edited by - websitewill on October 16, 2003 10:02:06 PM]

[edited by - websitewill on October 16, 2003 10:03:46 PM]

Share this post


Link to post
Share on other sites
Chunked lod itself isn''t THAT hard. What is hard is to do the trianglulation so that there aren''t any cracks. I myself just can''t justify the use of vertical skirts. So until I find a way to build indices for triangle patches so that I can connect them to other indices of different patches I''m .

Share this post


Link to post
Share on other sites
Thanks WebsiteWill. I actually spend alot of time at that site. I currently have a quadtree (rottger) implemented but I''d like to use chunked lod. The paper there is hard for me to follow but I guess I''ll keep trying .

I have another question. How do you go about stripifying your triangles in a terrain? I currently have index buffers for each texture layer (a layer is made up of all the triangles that use the same textures), but the triangles can be spread across the entire terrain.

I''m having trouble thinking of a way that I can use strips instead of lists, since the triangles have gaps between them. Thanks

Share this post


Link to post
Share on other sites
What do you mean?

This code produces a patch of triangles in a triangle strip with degenerated triangles:

void buildIndices(const int width, const int mapSize){
int x = 0, idx = 0;
int dx = 0, dz = 0;
int degenerate = 0;
for (int z = 0; z < width; z++){
if(z % 2 == 0){
for (x = 0; x <= width; x++) {
indices[idx++]=(z)*(mapSize)+(x);
indices[idx++]=((z+1))*(mapSize)+(x);
degenerate = ((z+1))*(mapSize)+(x);
}
} else {
for (x = width; x>= 0; x--) {
indices[idx++]=((z+1))*(mapSize)+(x);
indices[idx++]=(z)*(mapSize)+(x);
degenerate = (z)*(mapSize)+(x);

}
}

if(idx >= numIndices){
break;

}
indices[idx++] = degenerate;
indices[idx++] = degenerate + (mapSize);

}
}


Now changing x-- x++ and z++ to x-=increment and so on, you can change the population of the patch and make it more dense. Just remember that x++ is the lowest level and x+=increment[maxLod-1] is the highes density of triangles. This WILL produce cracks.

Share this post


Link to post
Share on other sites