Menu
Baran Kahyaoglu Dev Blog
Baran Kahyaoglu Dev Blog

Random Planet Generator

Posted on 27/12/2014 by brnkhy

So me and my collague found this brilliant blog post; Procedural Planet Generation by Andy Gainey a few days ago. Even though it looks beautiful and stuff, it’s written in javascript which isn’t a popular development platform here, so we decided to convert it to C# & Unity3D.

We’ve only done the icosahedron subdivision part for now, but still working on the rest actively.

 

 

You can find the Unity3D project files below but beware, it’s just a raw translation from Javascript to C# at the moment and looks quite ugly (I mean the coding style). I’ll do the refactoring and beautifying stuff when we’re done with it. That being said, we may not do a 100% conversion either and go on a different way at some point.

Anyway, I hope you guys find it useful, please do notify us about any bugs or issues in the C# version so we can fix it asap. Enjoy!

https://github.com/alprkskn/RandomPlanetGenerator

Share on Social Media
twitter facebook linkedin reddit email

Share this:

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)

Related

4 thoughts on “Random Planet Generator”

  1. Loren Irons says:
    22/03/2016 at 7:04 pm

    Could this be used to randomly “seed” a universe as well? Wondering if you’ve continued work on this as i’ve just recently stumbled on this while searching for a way to randomly seed a huge universe in a 2D top down style game. Looks very interesting!

    Reply
    1. brnkhy says:
      24/03/2016 at 8:04 am

      Hey Loren!
      Unfortunately I gave up on this shortly after posting this blogpost, but sure you can easily generate a solar system and galaxies using similar procedural generation algorithms. You can use this one for planets, then you’ll need one for solar system (to place planets), another one for galaxy (to place systems) etc.
      Please do let me know if you do something like that, I would love to see the results!

      Reply
  2. TJ says:
    11/09/2016 at 2:51 pm

    Hey there! So I know this is an old project but is there a reason the planet comes out looking like it has giant holes all the way to center? Also is there a way I can keep it from generating sooo many triangles?

    Reply
    1. brnkhy says:
      11/09/2016 at 4:49 pm

      Hey TJ!
      If I remember correctly, you get those holes when the center of the polygon is at the center of the sphere. Can’t remember why it did happen though but with center being at the center, you’ll have a cone instead of a polygon and get that weird look.
      Can’t do much about triangles though. As I said, it was using a center vertex, you can remove that and reduce tri count for each poly a bit but won’t be a huge difference I guess. Still worths a shot.

      Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Subscribe to Blog via Email

Follow me on Twitter!

My Tweets

Categories

  • Desktop Development (26)
  • Game Development (39)
  • Mapbox Unity SDK (4)
  • Uncategorized (8)
  • Unity3D (21)
  • Web Development (6)
  • WinRT Development (1)

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
©2025 Baran Kahyaoglu Dev Blog | Powered by WordPress & Superb Themes