Jump to content
  • Advertisement
Sign in to follow this  
Black Knight

Thoughts on geodesic sphere rendering and editing

This topic is 4050 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

Hi there. I have been reading throught the forums for two days for information on geodesic spheres and planets etc. Now here is what I get.I can construct a geodesic sphere by starting with an icosahedron and divinding that recursively.This will give me a nice sphere. Now to make hills mountains etc the height values need to be offseted from the origin.But i have no idea where to get those offsets if it was a regular 2d map it can be taken from a texture file for example.But its the surface of a sphere so I guess it needs something else. Anyway on to my other problem.Lets say I want to create a geodesic sphere and in my world editor I want to edit the sphere manually,adding mountains and rivers.And save the world data.Now this would break the procedural generation of the sphere?Or is there anyway to procedurally generate the sphere and apply the modifications.I have no idea on how to save the modifications though.Because the modifications are made on the lets say the highest level of detail. Another thing that makes me think is how to render the sphere efficiently.In an icosahedron structure the root has 20 triangles.Should I recurse in them and draw triangles inside the nodes.Or is there anyway to stripfy the sphere into bands.What about culling?First I thought i could check each of the 20 triangles agains the frustum and cull all of it if its not in the frustum but then a child triangle inside the root triangle can be visible but the parent maynot.So I should modify the parent triangles AABB according to the child triangles to encapsulate all the childs.I guess its safe to pass triangles whose facing away the camera(backfacing).But again can a child be visible if its parent is facing away the camera?Very confused here O_O So all in all what I want to do is have spherical game maps.They dont need to be uber huge.I want to be able to modify them in a world editor(adding objects,hills npcs etc.)Cull,render them efficiently. What are your ideas?

Share this post


Link to post
Share on other sites
Advertisement
Look at http://www.zib.de/clasen/download/SphericalClipmaps_Electronic.pdf.
It is based on GPU geometry clipmaps algorithm and ships all the work to the GPU. I`m currently using this solution. For modifications I have quick lookup table for indexes of patches(modificated terrains) and I just use them as offset from procedurally generated terrain.

Share this post


Link to post
Share on other sites
Quote:
Now to make hills mountains etc the height values need to be offseted from the origin.But i have no idea where to get those offsets if it was a regular 2d map it can be taken from a texture file for example.But its the surface of a sphere so I guess it needs something else.


No you can still use a 2d map, in fact I doubt you'd find a better alternative.
The key point though is not to expect it to represent you finest level of detail. On plantary scale you'd want to lok at filling in fine detail with procedural algorithms and have the hieghtmap represent the rough overall features

In order to apply the heightmap you'll need to use a mapping system of a point on a sphere to a point in the heightmap. Paul Bourke has some useful code to do this. Actually his whole site is a great resource including stuff on building Platonic solids


Quote:
What are your ideas?

When I was playing around with modelling planets I went through the process of looking at platonic solids and Icosahedrons. Although facinating (and well worth coding up just for the experience) when I moved on to using a cube as the basic primitive instead it became much more of an attractive option, although work commitments meant I never had a chance to pursue it further.

You can easily morph a high tessalted cube into a sphere. There is a very useful forum post on the Infinity website run by Ysaneya about how to do that. His Journal is well worth a look too.

Here's a collection of links that might be useful

Real-Time Procedural Universe, Part One: Generating Planetary Bodies and Part 2
Planetary Terrain Rendering
Planet Rendering: Part 1 - The Basics
and Part 2 - Generating The Data
Fuller's World Maps
V Terrain
Hipparchus Geopositioning Model
Procedural Planets Part 1 - Structure

Infinity Forums
Technical forum, Developmentforum, Quadtree



[Edited by - noisecrime on May 16, 2007 6:02:07 PM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!