Generate a map:

Then roll it into a ball, and you have a planet:

While I am quite proud of this planet with procedural terrain, 3D mountains and glitchy clouds, better minds have made more graphically impressive planets. I realised this halfway through the project and had the idea to not just create Earths over and over again. Variety is the spice of life.



Importantly, I found out how much one can do with limited functions and creative use of colours. Here, on Earth above, there is a "biome-system" which interpolates between humid deep greens, lime green plains, and arid orange. But the system is flexible enough to be used for other purposes, too.

Just compare the shape of continents from this picture with the above. The difference is not just in colour.

Enter the Exo planet. All the parameters - hue, water levels, atmosphere randomized freely. While Earth-like planets always have the same makeup of continents and islands, Exo-planets can have either fragmented or contiguous masses. Sometimes, and perhaps most interestingly, it creates planets that are almost like Earth, but not quite.

Randomness and curation are two things that go hand in hand. So while Exo planets are alright, they don't capture the imagination like finely crafted planet types will. So the program has many types of planets. Thus began the planetary zoo - a thousand species of planets.













In the program, they quite often have rings around them, but, er, can't fit rings in with four planets in one picture. Also, the rings had to be really low-resolution because my computer does not have a graphics card.

Gas planets, our good friends. These were made by removing water and mountains, picking more vivid and contrasting colours for the terrain, and, quite simply, stretching the Perlin noise in the horizontal axis to create the lines known from our kind Jupiter.

From the very biggest planets to the smallest. Now, how does one show that a planet is just a dusty ball of rock, a meteor of sorts? I tried to emulate size by increasing the size of mountains and substituting continents with irregularities in the planet's shape. The craters, which are added post-generation, add a nice touch - especially the gigantic ones as seen in the center of the planet, which looks quite marvelous in 3D.

















Lava planets go a bit beyond just being Earths with red oceans - the oceans, for instance, are lit even on the dark side of the planet. Technically speaking, it is done by drawing thousands of sparkling triangles which disregard the shadow. What you can't really tell is that the light is animated, too. It is quite a simple effect, though sometimes very effective.



So, magma planets - are they just terrestrial planets with tomato-soup coloured oceans, that also, as mentioned, happen to shine? On top of that, to create that feeling of chaos, a lot of craters are added, and the Perlin noise for the terrain is much more fragmented than usual.













The type of planet is not completely random. Planets close to the sun will almost always be Magma planets, for instance. Each solar system has a random amount of planets, randomly spread - though a lot of systems have no planets at all, and this system with just one planet is not rare either.





The day/night cycle of the planets are in sync with their orbit around their star. I chose to have the speed of orbit linked to how closely you are zoomed in, so that a) you can see that they orbit and b) they don't zip around when you are trying to look at them.





















The stars themselves work just like planets. They have some obscene corona, made from a lot of triangles rotating at different speeds. I really like triangles.



They are similar to gas giants, without the horizontal stretch and by having the two far ends of the biome spectrum mirror each other. This leaves the effect of a white web only where the Perlin noise is close to zero. Oh, they also all have just one hue, and then blend that with white. Two colour stars? Not here at least.



















Ice planets are made by colouring the ocean white and lowering the limit of when mountains become snow-tipped. This means that only a narrow band of altitudes are not snowy. On top of that, I also made this really nice web-looking texture, that they almost always have applied to them.





It is made by generating a single Perlin noise value, and putting it through two different functions where X, Y and altitude is multiplied by some or other; if either of them land close enough to zero, the area is coloured differently. That means it is basically two layers of the web from the star above put together. It also interacts with altitude to some degree. The difference in colour is made to be most visible the few places that the planet's surface is barred.









The function of the web is illustrated best with a full map. By the poles, where altitude is close to zero, the pattern is quite regular.





























Most types of planets have rare varities. This is the crystal sybtype of ice-planets, which is one of my favourites. The colours are more saturated, and the oceans shine with the colours of the rainbow.

















The Metro planet type is a good way to show off cities. All planets can have cities (though more often with terrestrial than gas, etc.), but Metro planets have a ridicolous amount. As the planet is generated, an algorithm searches for spots on the surface that are a) above the waterlevel (if there is a waterlevel), and b) below some certain altitude.









Then, from that point of origin, a couple of thousand triangles are placed. Their distance from the centre is sometimes rounded to the nearest integer, creating rings. Their direction from the centre is sometimes rounded to the nearest of 7 spokes that rotate as their distance increases, creating a spirally pattern. The effect has been tuned to be subtle, but it adds a feeling of structure to the cities instead of just being random blobs.





The cities light up at night - if there were fewer and the planet colour was less dark, it would only really be visible on the dark side of the planet.













The Marble type planet is another example of a subtype, which uses a custom colour palette - two dark colours with a light colour in the middle. This effect sometimes fails - like on the big planet, but other times works well, like on the three planets on the right side.







Evaluation

This project was from the outset all about the visual results. While working on the project, again and again, I had the idea to use it for something, to turn this into an engine for a real game. But I do not quite know what that might be. Exploring planets is fun, but it takes as long a time to generate a planet (at least on my rundown laptop) as it is able to keep one's attention. Whatever sort of gameplay one decided to put on top of the planetary zoo, having to wait for a planet to generate could only be detrimental.



Graphically speaking, the planets are alright. There will always be some more technically minded people who can create much more impressive planets. I think the strength of this project does not lie in resolution and number of polygons. Instead, the planetary zoo, all the different species of planets, is what really makes this unique. Some of the designs turned out very well, like Sulphur planet s with garish yellow oceans and black terrain, and Crystal planets, which I showed off above. So while this project started off being about graphics, it ended up being about aesthetics - and I am thankful for it teaching me my first lessons on how to work with colours and randomness.