Jump to content

  • Log In with Google      Sign In   
  • Create Account


Best way to create spherical terrain?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
13 replies to this topic

#1 ynm   Members   -  Reputation: 169

Like
0Likes
Like

Posted 23 January 2013 - 04:54 AM

Hi,

 

What is the best method to create spherical terrain?

 

Thanks



Sponsor:

#2 Inuyashakagome16   Members   -  Reputation: 835

Like
0Likes
Like

Posted 23 January 2013 - 06:15 AM

What language / engine are you using? You haven't given any info and there aren't any tags on your thread.



#3 C0lumbo   Crossbones+   -  Reputation: 2133

Like
0Likes
Like

Posted 23 January 2013 - 09:23 AM

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, 23 January 2013 - 09:38 AM.


#4 3Ddreamer   Crossbones+   -  Reputation: 2977

Like
0Likes
Like

Posted 23 January 2013 - 09:43 AM

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, 23 January 2013 - 09:44 AM.

Personal life and your private thoughts always effect your career. Research is the intellectual backbone of game development and the first order. Version Control is crucial for full management of applications and software.  The better the workflow pipeline, then the greater the potential output for a quality game.  Completing projects is the last but finest order.

 

by Clinton, 3Ddreamer


#5 Aphton   Members   -  Reputation: 231

Like
0Likes
Like

Posted 23 January 2013 - 10:02 AM

How about running perlin noise on

9e32cf9af726870981af4cf154ea874b.png

3f44e350a2d0f0a9dd636b4e0049375a.png

9261110138f668d178f1f9f03630111a.png

(src: wikipedia - sphere)

?



#6 swiftcoder   Senior Moderators   -  Reputation: 9658

Like
3Likes
Like

Posted 23 January 2013 - 10:12 AM

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?


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#7 eppo   Crossbones+   -  Reputation: 2312

Like
1Likes
Like

Posted 23 January 2013 - 10:20 AM

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, 23 January 2013 - 10:23 AM.


#8 C0lumbo   Crossbones+   -  Reputation: 2133

Like
1Likes
Like

Posted 23 January 2013 - 10:39 AM

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!



#9 ultramailman   Prime Members   -  Reputation: 1558

Like
2Likes
Like

Posted 23 January 2013 - 10:53 AM

Have a look at this: http://freespace.virgin.net/hugo.elias/models/m_landsp.htm
It describes creating a randomly shaped planet.

#10 Aardvajk   Crossbones+   -  Reputation: 5279

Like
0Likes
Like

Posted 23 January 2013 - 02:38 PM

Have a look at this: http://freespace.virgin.net/hugo.elias/models/m_landsp.htm
It describes creating a randomly shaped planet.

What a fascinating article, got me very intrigued for a while there, thanks. :)



#11 C0lumbo   Crossbones+   -  Reputation: 2133

Like
0Likes
Like

Posted 24 January 2013 - 04:13 AM

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!



#12 swiftcoder   Senior Moderators   -  Reputation: 9658

Like
1Likes
Like

Posted 24 January 2013 - 09:26 AM

So I'm quite happy with that result!

Aye. It's a fairly subtle change, but it is a very big improvement in reducing distortion.


Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]


#13 CC Ricers   Members   -  Reputation: 623

Like
0Likes
Like

Posted 24 January 2013 - 11:40 AM

Have a look at this: http://freespace.virgin.net/hugo.elias/models/m_landsp.htm
It describes creating a randomly shaped planet.

 

I have to try that one out sometime. What I have to wonder is with all the resizing of the slices, how does it take care of the problem of empty spaces that are exposed from resizing the slices.


My development blog: Electronic Meteor

#14 Katie   Members   -  Reputation: 1285

Like
0Likes
Like

Posted 24 January 2013 - 01:20 PM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS