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

GeoMipMap Calculations

5 posts in this topic

Hey all,

I've searched a while and most of the topics on GeoMipMap terrain lead to dead links, so I'll start a new one. Sorry if it's beating a dead horse.

For the equation A = n / |t|

He says n is the near plane, but I'm assuming he means n is the distance from the eye to the near plane? Also, I am calculating |t| as tan(FoV/2), is that correct?

It seems that the variable tau is the only variable that we get to freely pick. In his paper he suggests a tau of 4 pixels. Anyone have recommendations on a good tau value? I'm sure I'll have more hold ups as I go along but that's all for now =)

Edit:
One more question, for each mipmap level, am I suppose to construct new VBO's for vertices/texcoords/indices, or just make a new indices VBO and still pass the mipmap level 0 vertices/texcoords (which is wasteful, but so is storing multiple copies of the data for each mipmap level)

Thanks!
0

Share this post


Link to post
Share on other sites
[quote name='Darkbouncer4689' timestamp='1315610963' post='4859793']
Edit:
One more question, for each mipmap level, am I suppose to construct new VBO's for vertices/texcoords/indices, or just make a new indices VBO and still pass the mipmap level 0 vertices/texcoords (which is wasteful, but so is storing multiple copies of the data for each mipmap level)
[/quote]

You have one set of vertex data and shouldn't need more than one index buffer per lod (it would be mostly pointless to have different buffers per chunk, because the same index buffer works for all if you just correctly offset into your vertex buffer). Since you should try to store your vertex data in video memory, there is nothing wasteful about it (unless you intend to somehow update and deform your entire terrain every frame).
1

Share this post


Link to post
Share on other sites
Thanks for the reply.

My design has a unique vertex, texcoord, and normal buffer for each block of terrain, but one index buffer that is reused (and one index buffer for each mipmap level). I'm assuming you mean one set of vertex data for each block and not one set of vertex data for the entire terrain, right?

As for the questions about calculating |t| and picking a value for tau, do you have any suggestions?

Also one more question to add.
de Boer states that delta is the change in height from a mipmap level and epsilon is delta's length in screen space pixels. How can you convert delta to screen space pixels (i.e. how do you compute epislon?)
0

Share this post


Link to post
Share on other sites
[quote name='Darkbouncer4689' timestamp='1315638145' post='4859903']
My design has a unique vertex, texcoord, and normal buffer for each block of terrain, but one index buffer that is reused (and one index buffer for each mipmap level). I'm assuming you mean one set of vertex data for each block and not one set of vertex data for the entire terrain, right?[/quote]

Technically you should be able to store a single vertex buffer for the entire terrain, a single index buffer per level and just store the offset into the vertex buffer for each chunk. But you shouldn't try to be overly clever and efficient in every tiny aspect right from the start.

[quote]
As for the questions about calculating |t| and picking a value for tau, do you have any suggestions?
[/quote]

Nope. I was simply calculating the max. error per chunk and lod, scaled it by the chunks distance to the camera and used the lowest lod still below a given threshold. Obviously it makes sense to keep those values variable and preferably you should be able to set them at runtime to find whatever value works best with minimal popping.

However, I remember some thread talking about a terrain of 256x256. If that was you then: screw lod and fancy nonsense. You're wasting your time and are better off just brute force rendering that tiny bit of terrain.
1

Share this post


Link to post
Share on other sites
Interesting. How could one use a single vertex buffer for the entire terrain? For a terrain larger than 256X256 you would have to have an unsigned int index buffer instead of unsigned short. I think any gains from having a single vertex buffer would be at the cost of a lot of extra memory.

I agree that for a 256X256 LoD is pointless. I would like my engine to be able to handle larger terrains if necessary, but if the scene only requires a smaller terrain I will just send it all to the gpu. My code is segmented enough to not use GeoMipMaps with just a few comments.

As for anyone else out there, I could use some help with calculating the constants.

Is the top coordinate of the near plane (|t| in Boer's paper) equal to tan(fov/2)?
What are some optimal tau values? (Boer suggests 4 pixels)

Thanks!
0

Share this post


Link to post
Share on other sites
Not sure if anyone is interested in this topic, but I have continued implementing GeoMipMaps and am getting towards the end. My algorithm for computing the maximum change in height (delta) uses the previous mipmap level, (not the level 0 mipmap, unless computing for mipmap 1). Using this algorithm I have a mipmap level 3 that has a lower delta value than a mipmap level 2. I'm not sure what to make of this. Does it mean I can jump from mipmap level 1 straight to level 3 and elimate 2 all together, or am I making some mistake in my calculations.

Any help is appreciated.
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