Jump to content
  • Advertisement
Sign in to follow this  
Cristian Decu

Planet rendering: From space to ground

This topic is 944 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello fellow game programmers,

 

For quite a while now i'm trying to create a planet renderer, just for fun. The fun seems to be taken over by frustration however since i can't really solve the LOD problem for spherical terrains.

 

The thing is, i read almost everything i found and i'm still having troubles understanding the concepts behind some of the techniques.

 

1. Most of the techniques i hear are using quadtrees.

    So they use 6 quadtrees forming a cube. Question is, how is that cube mapped to the actual sphere?

 

2. How can i make it fast?

    Some techniques use the old school glVertex* and some use VBO.

    Using the deprecated features of OpenGL is out of question, so how can i

    use the VBO here?

    Do i really have to create a VBO for all of my children quads down to the lowest recursion level?

    If so, that could take a hell lot of VRAM space.

    Or do i have to constantly update the VBO and IBO, thus abusing the glBufferData every time i need to update a quadtree?

 

3. Cracks in the ground.

    How is this issue solved when using the VBO/IBO?

    From what i've learned, it's all a matter of checking whether our neighbours have a lower LOD than us, and if they do, cut some edges

    and weld some vertices.

    How do i do that using VBOs and IBOs?

 

4. Are there any documented open sourced projects that i can use for reference?

    I know about proland, but i can't really find my way inside it's source code.

 

 

Thank you!

Share this post


Link to post
Share on other sites
Advertisement

1. we just had a nice topic about it http://www.gamedev.net/topic/677700-planet-rendering-spherical-level-of-detail-in-less-than-100-lines-of-c/

2. you rather update the VBO with what is visible. You'd not fit all LODs in one go into vmem.

3. I've told one solution in the topic from 1. the thread started implemented it, I think the source is public, check it out, it's easy.

4. :) http://www.gamedev.net/topic/677700-planet-rendering-spherical-level-of-detail-in-less-than-100-lines-of-c/

Share this post


Link to post
Share on other sites

If you plan to spend most of your work on close to ground, don't try and use a cube map. I've done a few planet to ground's and you can pregenerate a torus, which will allow you to pregen stitching. If you just do a grid by VertexID, you can stitch different sized grids, stitching by passing in a stitch flag to the constant buffer. So, similar to weighting bones in animation, each grid chunk can be passed a scale and position value to tell it where to go with a flag to say which edges are stitched. The height is set (on a 2D plane) by a monolithic height map. Each tile or chunk in the height map is scaled differently, depending on the grid size. Alternatively, you can multisample like in Microsoft's  geo clipmap example. Either way then just wrap the grid by a spherical equation. 

 

If you want random terrain, you can do rolling hills etc easy enough. The problem is pathing water for rivers. That and an endless world of boring. I'm a fan of random terrain with predetermined major geography (ie a continent sized height map) and crafted points of interest.

Share this post


Link to post
Share on other sites

There is a book that I think covers the topic in detail. I have the book on my bookshelf, but I've done little more than crack it open to see what's inside. There are about 20 books ahead of it on my 3D game programming reading list right now. But if that's what you are working on, it's probably worth the read I'm guessing. "3D Engine Design for Virtual Globes"

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!