Sign in to follow this  

Best way to create spherical terrain?

This topic is 1818 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,

 

What is the best method to create spherical terrain?

 

Thanks

Share this post


Link to post
Share on other sites
I'm doing this for a current project and my approach has been to create my terrain as a cube, then warp that cube into a sphere.

Because a cube is constructed of squares, you can use standard terrain generation and lodding techniques and it's easy to texture.

There is a lot of warping (the grid shape and area is smaller at the corners of the square than at the centres), but that is tolerable for my particular project.

An alternative with less warping is subdivide an icosahedron (will give you triangles), or to truncate a subdivided icosahedron to give you a buckyball (hexagons and some pentagons) Edited by C0lumbo

Share this post


Link to post
Share on other sites

My favorite is a sculpty tool, which every good 3D program has. This makes work fast and accurate with some practice.  I have occasionally been forced to use a plane mesh and begin with extrusions - sometimes even having to measure altitudes - and refining that with the sculpty tool.  For each terrain element to look completely unique and finish the map in a reasonable time, then a sculpty type of tool is a must, preferably within a terrain editor.

 

Doing simple work by coding is doable but takes more time initially. Once you get a noise algorithm going, then it can actually be very effective visually, especially if you are skilled in shaders.  It can also cover many square miles (or kilometers) in short order. However, highly detailed work is many multiples more time consuming to make terrain, especially if it must be hard edged ( can handle full physics ), by coding instead of using a 3D program such as a terrain editor.

Edited by 3Ddreamer

Share this post


Link to post
Share on other sites

[quote name='C0lumbo' timestamp='1358954593' post='5024738']
There is a lot of warping (the grid shape and area is smaller at the corners of the square than at the centres), but that is tolerable for my particular project.[/quote]

Are you using the improved equation, to minimise warping?

Share this post


Link to post
Share on other sites
This article from GPU Gems 3 explains how to construct terrain on the GPU (and has a paragraph on spherical planets), but this can also be done offline (it uses basic marching cubes). Edited by eppo

Share this post


Link to post
Share on other sites

There is a lot of warping (the grid shape and area is smaller at the corners of the square than at the centres), but that is tolerable for my particular project.

 

Are you using the improved equation, to minimise warping?

 

Nope, I'm just doing the obvious normalise-to-distance.

 

Will give that a go, thanks!

Share this post


Link to post
Share on other sites

There is a lot of warping (the grid shape and area is smaller at the corners of the square than at the centres), but that is tolerable for my particular project.

 

Are you using the improved equation, to minimise warping?

 

Just tried this out. The linked article didn't have a side-by-side comparison of the naive approach (normalising each vertex) and their improved approach so I'll post a couple of screenshots so the improvement can be seen in case it's useful to anyone.

 

Here's the naive approach:

 

6Ys3R36.jpg

 

And here's the improved method:

 

CyU2LDz.jpg

 

 

So I'm quite happy with that result!

Share this post


Link to post
Share on other sites
If you start with a D20 shape (20 sides, all equilateral triangles), you can subdivide the sides into four triangles at the midpoints (and push those points out to the radius). Repeat that a couple of times, and you'll have a smooth high-res sphere. Then you can run normal fractal / asteroid impact / plane splitting / weathering / whatever algs on the vertices. And you won't have the polar distortions.

Share this post


Link to post
Share on other sites

This topic is 1818 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.

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