•      Sign In
• Create Account

## Generating spheres with unifrom vertex density

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.

5 replies to this topic

### #1PAndersson  Members

394
Like
0Likes
Like

Posted 30 July 2012 - 12:11 PM

Hi, I'm in the fairly early stages of creating a 4x space strategy game, though it will have a fair bit of ground action as well. For many of the planets, I will need to use heightmapped 3d spheres as the basic mesh. The problem is that the most straightforward method of creating these meshes results in spheres with a non-uniform vertex density with more vertices around the poles. I was wondering if there are any well known methods for generating spheres with a unifrom vertex density, where the density is customizable?

### #2Álvaro  Members

20268
Like
1Likes
Like

Posted 30 July 2012 - 12:27 PM

Search the web for something like `equidistant points sphere' and you'll find lots of information about this problem.

Also, if you use a 3D texture for height displacement, the variability of vertex density becomes much less of an issue.

### #3clb  Members

2143
Like
1Likes
Like

Posted 31 July 2012 - 02:04 AM

If geospheres might be adequate for this purpose, see e.g. this and this.
Me+PC=clb.demon.fi | C++ Math and Geometry library: MathGeoLib, test it live! | C++ Game Networking: kNet | 2D Bin Packing: RectangleBinPack | Use gcc/clang/emcc from VS: vs-tool | Resume+Portfolio | gfxapi, test it live!

### #4David Neubelt  Members

866
Like
2Likes
Like

Posted 31 July 2012 - 02:05 PM

This gives decent results for render able geometry.

http://mathproofs.blogspot.com/2005/07/mapping-cube-to-sphere.html
Graphics Programmer - Ready At Dawn Studios

### #5billconan  Members

200
Like
0Likes
Like

Posted 02 August 2012 - 05:33 PM

I think another approach is giving vertices some repulsion forces and adjust their locations by the forces.

### #6Postie  Members

1459
Like
0Likes
Like

Posted 02 August 2012 - 07:29 PM

Though I've never used the technique myself, I'm a fan of the cube to sphere mapping. It'd be the first thing I'd try if I wanted to render a globe.
Currently working on an open world survival RPG - For info check out my Development blog:

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.