• 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
FredrikHolmstr

GeoClipMaps - splitting geometry into smaller meshes or using fewer large meshes

6 posts in this topic

Check the post further down for another question on GeoClipMaps.

 

I am in the process of implementing GeoClipMaps (for the second time, first attempt never finished), and I have been looking through the online resources on terrain rendering to see if something new has popped up since my last try. 

 

So i found this post http://electronicmeteor.wordpress.com/2013/02/10/big-progress-on-geo-clipmaps-and-terrain/, to cut things short - in the post the author explains that instead of doing it like in the GPU Gems article, where they split up each level of geometry into several parts allowing just a few vertex buffers to be allocated for the entire terrain, the author instead pre-allocates a mesh for each clip level, see screenshots:

 

GPU Gems:

02_clipmaps_05.jpg

 

Blog Author:

clipmaps2.png?w=605&h=339

 

The above screenshot from the blog is a work in progress and still has gaps, etc, but I am thinking about the pros/cons of these approaches. The approach in the blog seems a lot easier to build, but I am thinking there could be some major drawbacks to doing it like this (memory requirements, needing one separate vertex buffer per clip level, etc).

 

Anyone willing to weigh on this?

Edited by fholm
0

Share this post


Link to post
Share on other sites
One vertexbuffer per level is not necessary.

I did s.th. similar. I have one central mesh, one ring mesh and one transition mesh (also a ring but thinner), the latter two being rendered multiple times with different scales. The memory impact is negligible but since all meshes are always visible, you loose the ability to frustrum cull the terrain behind the camera. On the up side, you have fewer drawcalls.

If I find the time, I'll try to rearrange the indices in the indexbuffer in a way, that I can render only specific index ranges in each ring, where each index range corresponds to one section of the ring. That way, I should gain the ability to frustrum cull the terrain, but without needing significantly more draw calls (at least when the index ranges can be merged).
0

Share this post


Link to post
Share on other sites

One vertexbuffer per level is not necessary.

I did s.th. similar. I have one central mesh, one ring mesh and one transition mesh (also a ring but thinner), the latter two being rendered multiple times with different scales. The memory impact is negligible but since all meshes are always visible, you loose the ability to frustrum cull the terrain behind the camera. On the up side, you have fewer drawcalls.

If I find the time, I'll try to rearrange the indices in the indexbuffer in a way, that I can render only specific index ranges in each ring, where each index range corresponds to one section of the ring. That way, I should gain the ability to frustrum cull the terrain, but without needing significantly more draw calls (at least when the index ranges can be merged).

 

Ah yes, of course - one vertex buffer is only needed + one for the center. But yes, of course - you loose the ability to do frustum culling. Interesting idea bout the index buffers tho and to do frustum culling through that.

 

I can't notice how much different this approach is from, say, a quad tree based LOD. Unless I am missing something...

 

Well, compared to something like a quad-tree based geo mipmapping which is usually done on the CPU, this has a few benefits:

 

1) All of the heavy computation is done on the GPU

2) A lot less draw-calls

1

Share this post


Link to post
Share on other sites

but I am thinking about the pros/cons of these approaches

The pro is that it is a small bit easier to conceptualize. Once you realize the only difference is in scale, which simply doubles, making things pretty easy to understand, you would not be willing to make such a trade-off. Using multiple buffers takes more memory and is much slower to process. Plus you are limited in the number of levels you can have, which could otherwise be dynamic.
There is very little (no) reason not to use the same buffers for every level.


L. Spiro
0

Share this post


Link to post
Share on other sites

Thanks for all of your answers! I have run into a problem with my implementation, it's a specific paragraph from the GPU Gems 2 paper which I just can't wrap my head around, this one to be exact, and especially the bolded part:

 

The choice of grid size n = 2k?1 has the further advantage that the finer level is never exactly centered with respect to its parent next-coarser level. In other words, it is always offset by 1 grid unit either left or right, as well as either top or bottom (see Figure 2-4), depending on the position of the viewpoint. In fact, it is necessary to allow a finer level to shift while its next-coarser level stays fixed, and therefore the finer level must sometimes be off-center with respect to the next-coarser level. An alternative choice of grid size, such as n = 2k?3, would provide the possibility for exact centering

 

If we take the example image from the paper again:

 

02_clipmaps_05.jpg

 

My "understanding" of the way the clip maps were update was that you floor the position of the viewpoint to an int, and such get the center vertex point if this is not the same as the previous center point, you update the entire map. Now, this obviously is not the case - but what I am failing to understand is this:

 

If you look at the image above, if the viewpoint was to move one unit to the right, then the inner ring (the one just around the view point + white center square) would end up getting a 1 unit space on both the left and right side of itself. But there is nothing in the paper that deals with this, what i mean is that it would end up looking like this (excuse my crummy cut-and-paste editing of the above image):

 

02_clipmaps_05_updated.jpg

 

This is obviously not a valid state of the. So, would the solution be that a clip ring (layer) can only move in increments of the ring/layer it's contained within? Wouldn't this end up being very restrictive? I feel like I am missing some crucial understanding of parts of the algorithm, but I have been over both this paper and the original paper from 2004 and I just can't see what I am not getting.

Edited by fholm
0

Share this post


Link to post
Share on other sites

This is obviously not a valid state of the. So, would the solution be that a clip ring (layer) can only move in increments of the ring/layer it's contained within? Wouldn't this end up being very restrictive? I feel like I am missing some crucial understanding of parts of the algorithm, but I have been over both this paper and the original paper from 2004 and I just can't see what I am not getting.


Yes. You update the inner layer when you move two of its units because that matches one unit of the containing layer and the grids can stay aligned.
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