Logo by kr0mat1k - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. October 01, 2018, 04:26:59 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: How do I make a geodesic height map?  (Read 3225 times)
0 Members and 1 Guest are viewing this topic.
teoma
Guest
« on: April 04, 2007, 12:18:34 PM »

I'm working on a space exploration game with procedurally generated content.  I want to make height-mapped planets, but I can't seem to find a good way to encrypt an array that can cover a sphere.

So far, my best solution is to use an octahedron and turn that into a geodesic sphere.  I can make a simple tile array that covers the whole figure using four squares, but setting this up for a fractal heightmap (such as a diamond-square algorithm) becomes difficult because the squares connect in strange ways that are counter-intuitive if you're used to working in 2d space.

Any help would be greatly appreciated - I've searched the net - I know it's been done several times before but I can't wrap my brain around it.
Logged
lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #1 on: April 04, 2007, 06:16:09 PM »

here's an article by a good friend: http://freespace.virgin.net/hugo.elias/models/m_landsp.htm (although it doesn't use maps, since any 2d map on the sphere will suffer from distortion)

btw, "encrypt" means something quite different from how you use the word wink ditto for geodesic. if you're just looking for a good spherical parameterisation (bearing in mind the limitations given by the hairy ball theorem: http://en.wikipedia.org/wiki/Hairy_ball_theorem), then peter shirley has a good post on his blog about that: http://psgraphics.blogspot.com/2007/03/environment-map-formats.html
« Last Edit: April 04, 2007, 06:27:27 PM by lycium » Logged

teoma
Guest
« Reply #2 on: April 04, 2007, 11:21:13 PM »

Thanks - I'm not sure if I descibed my method very well  (bear with me - i have no formal math training outside of high school geometry)

In my game - from space the planets are spheres with real time rendered cyllindrical maps based on a heightmap - but when you land on them they will appear 'flat' - I know that gives me a bit of a hairy ball problem (they really need a better name for that) - but i think my octahedron method could work to some degree.

I think your first link - 'spherical landspcape method' is great - though i don't think i'll use it as intended.  As I said before I'm using a set of four squares (8 triangles when folded in half) as four 2d arrays to map a imaginary octahedron - this map is then stretched (the diamonds become squares - if you can picture this) into a cyllindrical map and then applied to the sphere. (there is a little distortion around the poles but for the most part it works fairly well - I may still end up using peter's projection)  It would not be difficult (i don't think) to split the octahedron about an arbituary plane and determine which points fall on which side of the plane. 

Like I said there are two views - the prerendered cyllinder-mapped sphere from space, and a close up view for when you land on the planet which is rendered in realtime.  I'll try both methods and see what works - thanks for the help
Logged
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
Height-mapping based on Julia Sets Let's collaborate on something! Timeroot 0 885 Last post January 25, 2010, 12:14:45 AM
by Timeroot
Mr. Green (hdr height map) Images Showcase (Rate My Fractal) thargor6 4 480 Last post August 14, 2012, 04:47:02 PM
by thargor6
Height Map experiments Mandelbulb3D Gallery 0Encrypted0 3 449 Last post February 15, 2013, 10:52:26 PM
by LMarkoya
Apo7x scripting - Flame.height ? Help & Support barsichou 2 147 Last post May 16, 2013, 06:26:42 PM
by cKleinhuis
Height map experiment Images Showcase (Rate My Fractal) alij 2 491 Last post September 01, 2013, 04:39:14 PM
by alij

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.194 seconds with 25 queries. (Pretty URLs adds 0.01s, 2q)