chunked lod

Started by
13 comments, last by Krohm 11 years, 9 months ago
Hi I am trying to implement chunked lod for a while now and I am not successful so far. I read the paper about chunked lod and understood the main system but it doesn't have anything about implementation. And I looked the code he published but it was missing how he ensures every child chunk has half of maximum geometric deviation of its parent. He is reading that value from terrain files. So should I read/know other things before understanding chunked lod or am I missing something? Also there aren't any implementations of chunked lod other then his. Is it because there are better ways for large terrains now or it is implemented by commercial products so they don't want to share their code publicly? Thanks.
Advertisement
What paper are you reading in particular? Nothing of your message makes sense without pointing out the exact paper. The code he published... who is he?
My opinion on terrain algorithms, condensed to be as simple as possible

  1. Small organic patches: brute force
  2. Generic terrains: hierarchical geomipmapping
  3. Large/streaming/infinite terrain: geometry clipmaps

In GeoMipmapping the deviation is simply a function of the distance between the interpolated value and the missed sample.
Geometry clipmaps don't care about the deviation, they exploit Nyquist Theorem so nobody really cares.

Previously "Krohm"

Thanks for the reply and sorry I forgot to mention it. Here is the page for it and here is the paper T.Ulrich wrote. Also you can download his code here. And as I mentioned before I don't think there are any resources other than this one for chunked lod technique. People say chunked lod is easy to implement but I don't know if they are saying this just by reading the article and without actually implementing it. Because as I mentioned he is loading one of the most critical value from his terrain files or maybe it is really easy and I am missing something.
As a start, when you read stuff about chunked LOD, it's probably about stuff that fits in RAM. Most people just assumes terrain data will fit. I have myself tried an algorithm which blew 150+ MiB of RAM with no remorse.
The algorithm you pulled out is quite old but still good at its core. I think you might be missing part of the picture, it appears the deviation is a result of a preprocessing step. I'm not going to look at the code, but I suspect he's doing something like:
[attachment=10178:terrain_error_maybe.png]
That is, the error is probably the length of either the blue lines or the yellow lines. I general Discrete LOD starts from finding an error we want to allow for each mesh level and removes every vertex which contribute to correctness less than we want. That is something like
[source lang="java"]foreach vertex
if(abs(value - LinearNeightbours()) < EPS) discard;[/source][font=arial,helvetica,sans-serif](that would evaluate the length of blue lines, this code is just food for thought). The biggest error is stored in the .CHU file (I'm guessing that's the "terrain files" you're referring to). If you think at it, you might see this is not really as easy as it seems. [/font][font=arial, helvetica, sans-serif]For this reason, I suggest to look at either more modern approaches OR easier approaches. [/font]In particular, I suggest to look at geomipmapping, which works in reverse: instead of selecting vertices to drop based on a error metric, it drops vertices using a simple logic (every odd vertex) and obtains a deviation from there. For densely tessellated height fields that works rather well. The various chunks can still page to disk or assembled in hierarchical fashion (albeit most people using geomipmapping does not seem to be aware of that. [font=arial, helvetica, sans-serif]Geomipmapping is older than your paper but I think it provides better value as it probably takes less to implement and avoids dealing with not-quite-regular grids. Think at it.[/font]

Previously "Krohm"

Thanks again for the reply, I didn't see that slides page so I'll look it now if it has any different information than the paper. Also I looked geomipmapping but as you said it can still be used but a little outdated. And as far as I know chunked lod allows you to create bigger terrains than geomipmapping and I really like games with large terrains. Currently I don't have any purpose I am just trying to learn some populer techniques about game programming and I have never worked on terrains before thats why I started to learn chunked lod. What I don't understand about his error metric is he says every successive lod level has half of its parent error. Meaning Error(L+1) = Error(L)/2. How does he ensure that or does he just assume that it is like that for simplicity? At first I thought he is trying to find the first child which has smaller-equal error to Error(L)/2 and assign it as L's child and discard other children between L and the child he found. But with this technique it is virtually impossible to get exact error value of Error(L)/2, you can only get close to it. And I really appreciate if you have any suggestions about other modern approaches.
If you want something BIG and modern I'd suggest taking a look at this: http://www.slideshare.net/DICEStudio/terrain-in-battlefield-3-a-modern-complete-and-scalable-system
For first I figured out I've written something really wrong in my previous message. Meshes are progressively refined from coarsest to finest and not vice versa (I wrote this hoping it would help you understand the process but I guess it's not valueble).

  1. I looked geomipmapping but as you said it can still be used but a little outdated.
  2. And as far as I know chunked lod allows you to create bigger terrains than geomipmapping
  3. What I don't understand about his error metric is he says every successive lod level has half of its parent error. Meaning Error(L+1) = Error(L)/2. How does he ensure that or does he just assume that it is like that for simplicity?
  4. And I really appreciate if you have any suggestions about other modern approaches.


  1. No. I said it is old. Not outdated. No discrete LOD system producing static geometry is truly outdated. By contrast, most continuous LOD schemes are outdated in my opinion. Let me be clear: Geomipmapping is NOT better, it's just easier to deal with IMHO.
  2. This is a common misconception. Again, most people will never have to deal with the paging problem. Nothing prevents geomipmapping from being paged to disk. Terrain clipmaps suffers from a common misconception: the algorithm itself is based on "fitting a grid on the terrain signal", while the paging is a basically orthogonal problem but if you ask around everyone will say terrain clipmaps are natively paged. They are not completely wrong either as this is what the term "clipmap" is typically used for.
  3. (I assume you're talking about Geomipmapping) It's a direct consequence of doubling the sampling frequency. Draw it on paper on 1D.
  4. I already listed three methods in my 1st message. But I'd add one. The possibility of traversing the heightmap with raycasting.

Previously "Krohm"


If you want something BIG and modern I'd suggest taking a look at this: http://www.slideshar...scalable-system

Thanks I added it to my favorites, I'll look it later.



For first I figured out I've written something really wrong in my previous message. Meshes are progressively refined from coarsest to finest and not vice versa (I wrote this hoping it would help you understand the process but I guess it's not valueble).
[quote name='ekba89' timestamp='1342872438' post='4961641']

  1. I looked geomipmapping but as you said it can still be used but a little outdated.
  2. And as far as I know chunked lod allows you to create bigger terrains than geomipmapping
  3. What I don't understand about his error metric is he says every successive lod level has half of its parent error. Meaning Error(L+1) = Error(L)/2. How does he ensure that or does he just assume that it is like that for simplicity?
  4. And I really appreciate if you have any suggestions about other modern approaches.


  1. No. I said it is old. Not outdated. No discrete LOD system producing static geometry is truly outdated. By contrast, most continuous LOD schemes are outdated in my opinion. Let me be clear: Geomipmapping is NOT better, it's just easier to deal with IMHO.
  2. This is a common misconception. Again, most people will never have to deal with the paging problem. Nothing prevents geomipmapping from being paged to disk. Terrain clipmaps suffers from a common misconception: the algorithm itself is based on "fitting a grid on the terrain signal", while the paging is a basically orthogonal problem but if you ask around everyone will say terrain clipmaps are natively paged. They are not completely wrong either as this is what the term "clipmap" is typically used for.
  3. (I assume you're talking about Geomipmapping) It's a direct consequence of doubling the sampling frequency. Draw it on paper on 1D.
  4. I already listed three methods in my 1st message. But I'd add one. The possibility of traversing the heightmap with raycasting.

[/quote]
Thanks for the reply. And for 3th question I was talking about chunked lod. Anyways I gave up chunked lot and started cdlod, what do you think about cdlod? You said most continuous LODs are outdated but this seemed good after running the code and seeing the results. And here is the paper about it if you have never seen it before.
My experience with CDLOD was terrible. The algorithm takes more preprocessing time than anything else I know about as well as more runtime resources. At that cost, the benefit over well-estabilished algorithms is not clear to me. The paper is written in such a way one wonders how much of it is true, how much is snake oil, how much I couldn't understand and how much is written with no clear understanding of the notions involved. Last time I moved those objections I experienced consistent fanboyism (mainly by a single user, who clearly didn't read my messages, let alone explain anything). In my opinion, its usefulness is unproven. You can use the search functionality to find what I have written (keyword VTF) I must admit however that it had quite some sarcasm in it, in retrospect, that was an error by my side.

Previously "Krohm"

As I said I am very new to terrain rendering stuff so it is hard for me to compare a lot of techniques because I don't know most of them yet smile.png but I think the best advantage of this over chunked lod is you don't have to worry about cracks. Also it seems fast, I tried the demo terrain that is included with 1920*1280 resolution, near 180k triangles and I got ~550fps and I tried chunked lod it was nearly the same. I've added screenshots. First one is from cdlod and the other two are from chunked lod.

This topic is closed to new replies.

Advertisement