• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ekba89

chunked lod

14 posts in this topic

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.
0

Share this post


Link to post
Share on other sites
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[list=1]
[*]Small organic patches: brute force
[*]Generic terrains: hierarchical geomipmapping
[*]Large/streaming/infinite terrain: geometry clipmaps
[/list]
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.
0

Share this post


Link to post
Share on other sites
Thanks for the reply and sorry I forgot to mention it. [url="http://tulrich.com/geekstuff/chunklod.html"]Here[/url] is the page for it and [url="http://tu-testbed.svn.sourceforge.net/viewvc/*checkout*/tu-testbed/trunk/tu-testbed/docs/sig-notes.pdf"]here[/url] is the paper T.Ulrich wrote. Also you can download his code [url="http://sourceforge.net/projects/tu-testbed/files/demos/chunkdemo-2002-08-06/chunkdemo-2002-08-06.zip/download"]here[/url]. 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.
0

Share this post


Link to post
Share on other sites
As a start, when you read stuff about [i]chunked LOD[/i], 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 [url="http://tulrich.com/geekstuff/siggraph02-slides/img22.html"]preprocessing[/url] 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]
2

Share this post


Link to post
Share on other sites
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. Edited by ekba89
0

Share this post


Link to post
Share on other sites
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
0

Share this post


Link to post
Share on other sites
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'][list=1]
[*]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
[*]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?
[*]And I really appreciate if you have any suggestions about other modern approaches.
[/list]
[/quote][list=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.
[*]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.
[*](I assume you're talking about Geomipmapping) It's a direct consequence of doubling the sampling frequency. Draw it on paper on 1D.
[*]I already listed three methods in my 1st message. But I'd add one. The possibility of traversing the heightmap with raycasting.
[/list]
0

Share this post


Link to post
Share on other sites
[quote name='Frenetic Pony' timestamp='1342915463' post='4961798']
If you want something BIG and modern I'd suggest taking a look at this: [url="http://www.slideshare.net/DICEStudio/terrain-in-battlefield-3-a-modern-complete-and-scalable-system"]http://www.slideshar...scalable-system[/url]
[/quote]
Thanks I added it to my favorites, I'll look it later.


[quote name='Krohm' timestamp='1343027559' post='4962166']
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'][list=1]
[*]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
[*]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?
[*]And I really appreciate if you have any suggestions about other modern approaches.
[/list]
[/quote][list=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.
[*]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.
[*](I assume you're talking about Geomipmapping) It's a direct consequence of doubling the sampling frequency. Draw it on paper on 1D.
[*]I already listed three methods in my 1st message. But I'd add one. The possibility of traversing the heightmap with raycasting.
[/list]
[/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 [url="http://www.vertexasylum.com/downloads/cdlod/cdlod_latest.pdf"]here[/url] is the paper about it if you have never seen it before.
0

Share this post


Link to post
Share on other sites
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). [b]In my opinion, its usefulness is [u]unproven[/u][/b]. 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. Edited by Krohm
0

Share this post


Link to post
Share on other sites
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 [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img] 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.
0

Share this post


Link to post
Share on other sites
[quote name='ekba89' timestamp='1343148207' post='4962656']I think the best advantage of this over chunked lod is you don't have to worry about cracks.[/quote]That is an over-approximation. Crack fixing is implemented in the algorithm via morphing. Again, this is a rather orthogonal problem. No terrain algorithm in wide use has demostrated to be incompatible with crack-fixing so far. Therefore, take any possible algorithm and put in crack-fixing: no cracks will occur as well!
The statistics you got mean nothing: I know nothing about your hardware, but it's worth noticing you have said performance is similar. Perhaps it's just me but I think there are some similarities between your original chunked LOD paper and CDLOD.

Additional considerations:
[quote]Page 14.
In the case of older graphics cards (Shader Model 2 or lower), the heightmap sampling in the vertex shader can be too costly or even impossible due to the lack of hardware capabilities.[/quote]It should read: In the case of older graphics cards (Shader Model 2 or lower), texture sampling functionality in the vertex shader is not supported. Therefore the algorithm cannot run.

But of course I am still open to check it again. Did you use the default settings or did you made your own configs? In the latter case, could you please send them to me for testing?
By the way, I still don't understand from where the "Continuous" in "CDLOD" comes from. Interpolating discretized signals don't make them continuous, although it might appear so.

I want to make clear. I am open on that. If I'm wrong, I will have no problem in admitting it. One of the reasons I write there is to check what I know. If somebody helps me understand and considers my points good. Until that happens, I'm sorry but I'll remain on my position. This algorithm usefulness is unproven for me. What does it buys over other methods? I don't know in theory and I cannot observe consistent advantages in practice. So I have no real reason to support this.
0

Share this post


Link to post
Share on other sites
[quote name='Krohm' timestamp='1343203115' post='4962853']
That is an over-approximation. Crack fixing is implemented in the algorithm via morphing. Again, this is a rather orthogonal problem. No terrain algorithm in wide use has demostrated to be incompatible with crack-fixing so far. Therefore, take any possible algorithm and put in crack-fixing: no cracks will occur as well!
[/quote]
Chunked lod uses morphing too and it uses skirts to fix cracks. But with cdlod you don't need to create skirts.

[quote name='Krohm' timestamp='1343203115' post='4962853']
I know nothing about your hardware
[/quote]
My specs are: geforce gtx 580, i7-2600k and 8gb ram

[quote name='Krohm' timestamp='1343203115' post='4962853']
Did you use the default settings or did you made your own configs?
[/quote]
Yes I used codes that are provided by the owner of papers and used the default settings on both(With one difference that I mention below). And I should mention this too. There are two cdlod projects one is using paging and one is not(which are both belong to Filip Strugar). I am using the one without paging and his tests in the paper are from the one that uses paging. He mentions that he is using more compressed node structure for paging one so its performance might be different.

And one last thing to add. I used binaries for chunked lod but I used debug build from the visual studio for cdlod so before posting this I compiled a release build for cdlod and its performance was a lot better. I got 630fps for the same scene.

Again, I am not an expert so I am not defending either one. I started implementing cdlod just because I had problems implementing chunked lod and I just want to know if I am making a mistake :).
0

Share this post


Link to post
Share on other sites
[quote name='ekba89' timestamp='1343205905' post='4962859']Chunked lod uses morphing too and it uses skirts to fix cracks. But with cdlod you don't need to create skirts.[/quote]I don't care about how the cracks are fixed. Use a morphing scheme, use skirts, it's no problem for me and saving a batch does not save much until profiling proves so. I don't see any added in not using skirts. And again, who says you have to use the original morphing scheme for chunked?

As a side note, the chunk LOD paper you originally noted uses morphing as a way to reduce popping from a node changing into its children, not to deal with adjacent chunks. It's called the same but it involves fairly different concepts. CDLOD many years later can afford to do per-vertex operations and uses them to deal with adjacent chunks. It then basically designates a set of vertices (odd) to be "movable" and uses a vertex attribute to move those vertices{1}, relying on texture fetch to perform the interpolation halving sampling frequency at bounduary{2}. I had some quite bad experience with this method in the past (way before CDLOD surfaced) due to variable-frequency sampling issues. I am thus reluctant to recommend this algorithm and again, I have some yellow lights about possible overhype.

[quote]My specs are: geforce gtx 580, i7-2600k and 8gb ram ... its performance was a lot better. I got 630fps for the same scene.[/quote]Awesome. We can now safely assert CDLOD reaches high performance on high-end hardware.
630 fps --> 1.58ms (87.2%)
550 fps --> 1.81ms
I don't see anything being "much higher" (the algorithm is GPU-driven). Any measurements above 200fps is to be taken with extra care. As a side note, on your hardware simple bruteforce will likely exceed 400fps as well (my geforce4 on an Athlon 1800+ used to churn along 64*1024 unique vertices at over 80 fps even in debug mode).

I'm afraid you might be focusing too much on those. I want to warn you because I spent close to a year on this, and it has been wasted effort for me.
[quote][i]John Carmack on Quake Wars[/i]
John Carmack: Level of detail wise, the terrain does not render with any sophisticated geometry morphing situation. That's one of those things that for years I think most of the research that's gone into has been wasted. Geometry level of detail on terrain.. there have been thousands of papers written about it, and I honestly don't think it's all that important. The way the hardware works, you're so much better off setting down a static mesh that's all in vertex and index buffers, and just letting the hardware plow through it, rather than going through and having the CPU attempt to do some really clever cross blended interpolation of vertices.[/quote]So don't spend too much effort on it. Optimize your life. For another metric of how interesting terrain algorithms are, see the number of third-party opinions we collected. To say it again: I am willing to (re)consider any algorithm as long as I can have an articulated discussion of the pros and cons.
As a side note, the only project in which I have been requested terrain has been shut down prematurely. As it stands now, my current system still has no integrated terrain system, so my effort has been completely wasted.

[size=3]{1} to be completely honest, I think having the morph function work in world space is not the best option. But I guess that's personal preference.[/size]
[size=3]{2} sounds like interpolated geomipmapping? so much for your previous doubt about sampling frequency![/size] Edited by Krohm
0

Share this post


Link to post
Share on other sites
When I mentioned skirts I meant it is good for me that cdlod is not using skirts so I don't need to work on another thing :). Also from now on it is too late for me back down, today I worked on it all day so hopefully it will be good when it is finished. But what I understand from my little performance experiment is that cdlod is faster than chunked lod as long as you have good gpu to support it. Also cdlod example is in DirectX 9 and I am implementing it in DirectX 11 so I expect a little bit more performance if I manage to implement it well. I'll share my results as soon as I finish implementation if I manage to finish it of course :).
0

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  
Followers 0