Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Rob James, posted on July 20, 2001

Image Description, by Rob James

Latest pics from my Procedural Planet Demo. Some of you may remember my last IOTD about 3 months ago. Things have got better since! The code is now much faster thanks to some almost decent recursive culling - both horizon culling and view cone culling. The whole planet is held as a bintree, with the initial (level 0) structure containing a simple octahedron. This is split down using a ROAM-type algo with splits based on min distance to tri plus some split tri difference metric. The height of each vertex is set by a call to a multifractal function. The same multifractal is used to generate the terrain texture at the start of the demo (which can take a minute or so).

Tri's are merged when they fall outside the viewcone or fall beyond the horizon. A tricky bit is ensuring you dont try and merge tri's which,in turn, will merge child nodes which you want to keep split.

The wireframe show what happens if you turn merging off and zoom back out.

The bintree depth can get down to 30 or so and still remain interactive. If you apply that split level to the whole planet you'd get 8^30 triangles!

The cloud layer is fake volumetric (10 slices of blended perlin noise).

Still to do - a decent ocean (working on GF3 per-pixel environment bump cube mapping).

demo soon ;)


Rob James

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

July 20, 2001, 05:45 PM

Looks very cool! Are you gonna make a simearth type game with that?

Patrik Kudo

July 20, 2001, 05:48 PM


You're definitely the man!


July 20, 2001, 05:59 PM

Simply Brilliant!

I bet there's a lot of calls to srqt in there or something. How much time have you spent optimizing it?

Navreet Gill

July 20, 2001, 06:06 PM


Question about the textures: So, are they purely height based?

Richard Garand

July 20, 2001, 06:27 PM

It looks great from far... how close can you go?

Evil Bill

July 20, 2001, 06:36 PM

Jeez... now thats impressive. How far in does it zoom? and whats the fps count at min & max dist?



July 20, 2001, 06:40 PM

At farthest level away, a simple octagon:)

Just imagine what this could do for space games! Imagine a whole system of planets created using this method... :)

Is it possible for you to populate this planet? Like, could you put a enemy base or something down on the ground? I know that this planet is represented as a fractal and everything, but are you able to do things like at certain parts of the planet use terrain data that you created?

If you could, you could make a whole planet for exploring and stuff, but still be able to design levels (assuming this is a game... if you just want to simulate a universe or solar system, there isn't much need).

Lars W.

July 20, 2001, 06:48 PM

And you do not even need to model some part of the Land it self, i mean, you can let an algorithm determine to put a Base on to a specific location, and even create a city dynamicaly (maybe just some Boxes of different sizes). But that would create i very realistic World.

I always wanted that kind of Spacefighter game where you could fly to the surface of a planet...

It shouldn't be a problem to tesselate the Triangles more and more, to get very fine details on low altitudes. But is your texture dynamically changing, or is it just one big texture created once ?



July 20, 2001, 06:52 PM

A minute at the beginning of the demo - I take it that is for generating your multifractal triangles for your ROAM algorithm?

Is your perlin noise cloud algorithm based on the height of your terrian? (source code would be good here!!)



July 20, 2001, 08:27 PM

Have you considered abstracting the generation of the planet into real world terms? I believe the original Civilisation for DOS back in 1990 allowed you to do a limited version of this. You chose how old the land was, the climate on the planet, and the chance for the ground to be mountanious or flat, and it generated a world on those parameters.

If you're doing a whole universe, you might be able to define parameters for galaxies instead.

Lars Birkemose

July 21, 2001, 08:44 AM

Very very cool

Any chance of seing any sourcecode on this ?



July 21, 2001, 09:26 AM

Nice! BTW, would you mind sharing how you generated the textures? I really really like the texutres, and mine look so bad it's not funny.
If can, could you drop me a line( or post here?


July 21, 2001, 09:37 AM

sqrts aren't that bad.. a cache miss or two is usually worse. That sqrts are REALLY EVIL is a common misconception among coders. They aren't as long as you only use them where you really need them. Sqrt approximations are usually unnecessary. There are some special cases though. Type "verlet physics hitman" into Google (without quotes) and check out the article you find.


July 21, 2001, 11:32 AM

Freaking sweet! Will you be releasing this algorithm anytime soon?

The Wolf

July 21, 2001, 01:18 PM

Very nice work!


July 21, 2001, 01:41 PM

for problems with fast sqrts, try this:

a very, very fast approx, and a very fast, much bether approx.. somewhere around post 75 or something;)

Rui Martins

July 23, 2001, 08:26 AM

A Very Well Done Work.
Congrats to your succesfull efforts on achieving this.

As a sugestions, foraa planetary scale, you could provide some properties to the planet, including the Land Base Testures, from which you derive the actual planet texture, so that you could do different types of planets (unlike earth), for example: Mars, Saturn, Tantoine(StarWars).

And what about Moons, asteroid belts (Saturn like), Commets, etc...

I bet ideias are easy to come to mind, but actually implementing them, like you did with the Planet Demo is the Hard Part.

See ya

This thread contains 17 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.