Creating Procedural Planets in Unity
Subscribe:  iCal  |  Google Calendar
Moscow RU   16, Oct — 18, Oct
Helsinki FI   17, Oct — 25, Oct
Minsk BY   17, Oct — 19, Oct
London GB   22, Oct — 23, Oct
Singapore SG   23, Oct — 25, Oct
Latest comments

To be honest? What was Star Wars? George Lucas!!! It was cool back then in the 70 ties! Nothing ever before was like it..and it had character! 2 little shiny robots that behaved like humans! The n th sequal of something that was major in the past...! My advice? Start something new dont copy Star Wars...and give it some heart again! Put the industry to shame!!!😉 my 2 cents..

by Thomas Guillemot
9 hours ago

Well that's a lot of hats !

by Thomas Van Fossen
14 hours ago

So why not finish the project but making it super generic? Strip all star wars terms out. Then when the game is finished, allow for modders to make a conversion mod that will reinsert the star wars material? That way he can finish it and we all can get what we want and no one has to give up on their dreams.

Creating Procedural Planets in Unity
20 September, 2017

A little over a year ago Peter Winslow started procedurally generating low poly planets as a part of his Poly Universe project. The project is a now a full-fledged civilization building game set in a universe of tiny worlds. The developer decided to share some of the lessons he learned from the development process. The tricks here are about writing the code for Unity, using C#, but you could also use the techniques for other engines.

Here is a piece of the first part to get you interested:

Step 1 — Generating a sphere.

The first step in procedurally generating a planet will be to create a round ball that we can mold into the shape of a planet. There are (at least) two good ways of going about doing this, and each one has its own advantage:

Creating a round ball, either by subdividing an icosahedron, or a square.

In the picture above, I’ve taken an icosahedron (that’s it in the upper left corner — you might recognize it as a twenty sided die), and I’ve broken each triangle into four smaller triangles. Then I did that again for each smaller triangle, until I ended up with a nice round sphere.

Below that I’ve done the same process, but starting with a square. Each face is broken into four smaller squares, the vertices are pushed and pulled until they are all equally distant from the center. That process is repeated until I again have something that looks like a sphere.

So which way is better? If you’re looking to use this in your own game, here is where you need to make a choice about aesthetics. If you start with a square, you end up with a sphere that is extremely easy to cover with a tiling texture. The sides of the cube have been pushed outward to make it look like a sphere, but it’s still possible to paint a tiling texture onto each original ‘face’ and have a seamlessly textured planet.

The downside of this method is that the geometry is ‘pinched’ around where the cube’s original faces met, and some of the polygons on the sphere are noticeably bigger than others. Since I’m pursuing a textureless style for my own project, I was able to avoid these problems by starting with an icosahedron, which generates a sphere with nearly uniform polygons (albeit one that would be more difficult to texture seamlessly).

Peter Winslow

Make sure to read the full guide here


Leave a Reply

Be the First to Comment!