Status
SteamPeaks
ChartsSalesUpcomingPatchesNewsCalculator
New on SteamEvery app, DLC and depot the minute Steam creates itAppsEvery app on Steam, newest change firstPackagesSubs and bundles, and what each containsDepotsDepots, manifests and install sizesTagsSteam's user tags and the games under themDevelopers & publishersCompanies and their cataloguesTechnologiesEngines, SDKs and anti-cheat found in the filesChange historyEvery PICS changelist as it lands
SignalsNineteen readings of the whole catalogueCompareAny games side by sideRecordsAll-time peaks and the days they were setReportsWeekly and monthly write-upsAlerts & newsroomWatch a game, get told when it movesSteam statusIs Steam up, right nowWeb API explorerTry the endpoints in the browser
NewsSteam's own announcements and the sales calendarCalculatorWhat a Steam account is worth, and its pile of shame
/
Sign in
/
SteamPeaks
The ultimate resource for Steam data.
ExploreChartsSalesSales and festsUpcomingPatchesNewsRecordsTrendingSignals
DatabaseAppsPackagesDepotsTagsDevelopersTechnologiesChange history
ToolsCalculatorCompareSearchAlertsSteam statusAPI
SiteMethodologyFAQDiscordSupportSign in via Steam
Not affiliated with Valve or Steam. Game names and artwork belong to their owners. All times UTC.
PrivacyCookiesFair useStatus
Plan B: TerraformNewsHexagon planet generation
Community

Hexagon planet generation

Plan B: Terraform · published 8 May 2024, 15:12 UTC

All newsPlayers around this dateRead on Steam

v0.8 is progressing well: new ocean generation, basic modding support and new views (one with visible clouds) are done. Don't hesitate to activate the beta branch to test it! Still a few features to work on before releasing it to everyone.

So, in the meantime, I would like to rewrite here an old post from twitter (2019!) that was explaining the hexagonal generation I've developped for Plan B. Here it is:

How to create a sphere made of hexagons? Hexagons of similar size and orientation?

The most common way to do that is to start from a regular icosahedron (solid of 20 of equilateral triangles), then subdiving each triangle (sphere tessellation). Each triangle vertex becomes an hexagon, as you can see in this pic (credits https://twitter.com/AndyGainey ; I'll come back to him):

Here is a sphere with 5 subdivisions (~10,000 hexagons). It's very nice, that's what I initially planned to use... but it's actually bad for a game. Not because of the 12 hidden pentagons, but because of the non-uniformity of the size, shape and orientation of the hexagons.

Here is what you can see at different positions of the sphere ; north pole being on top. Hexagons are of various shape, size, and orientation ; the result would be awful when you scroll in the game, very disturbant.

There are other ways to do this sphere tessellation, like the very interesting Healpix, which garantees the same size for each area, but have non-uniform shape, and squares instead of triangles/hexagons. https://healpix.sourceforge.io http://montage.ipac.caltech.edu/docs/HEALPix/

A very special and incredibly imaginative solution is the one of
@AndyGainey, explained in detail here: http://experilous.com/1/blog/post/procedural-planet-generation
To avoid avoid pentagones and predictable irregularities, he decided to do the total opposite: going full irregularity.

When irregularity (in size, shape and number of edges) is everywhere and random, the surface actually becomes regular - homogeneous in its irregularity. Really brillant, but not what I need for my game, as I really want regular hexagons.

So, what I do is that I divide the sphere in vertical "slices". Inside each slice, the triangles/hexagons are set in perfectly horizontal rows, and are (almost) pefectly equilateral. The non-uniformity is grouped in the links between slice.

One big advantage is that the more hexagons there are, the more regular it becomes. And for my game, I'll have a lot, lot of hexagons. Here is the sphere with a few thousands ones.

And here is a portion of the surface, with a few millions of hexagons. Can you spot the irregular shapes ? Not easy ! They should definitely not be a problem when playing on this field.

The "Icosahedron tessellation" method produces only 12 pentagons. With my method I get much more: 720 for a sphere of 14000 hexagons (5%). But the more hexagons, the better the ratio is. For 10 millions of hexagons, only 0.2% are pentagons or heptagons.
I have calculated the variation in the triangles edge lengths (are hexagons are uniform in shape and size ?): I get a coefficient of variation of 6.5% for the icosahedron tessellation ; but only 1.6% with my method.
The best advantage of my solution is about the orientation of the hexagons (are they "horizontal" ? I check the angles of the triangles edges). I get a coefficient of variation of only 3.8%, compared to the 55% with the icosahedron tessellation!

Here it is. 5 years later, i have no regret using this system, i still can't think of a more suited one. Although, i can say now that i definitely underestimated the technical complexity of using this system in a full game, to properly manage the slices borders.

If I had had more time, i would have loved to research further in this matter. Maybe find a way to avoid the slices. Or something else.
If any of you know of some interesting research about it, i'd be very interested to know about it!

More from Plan B: Terraform

Other announcements

All news
Community14 Aug 2026New DLC + Free Major UpdateHello everyone! It has been a long time, but we are now ready to announce some very big news for Plan B: Terraform! On September 23rd, we will release the " Worlds of Fire and Water " DLC , featuring two new and challenging planets, along with a free major update that brings a lot of new mechanics and items to the game! Here is a summary of the main features of both: $5 Worlds of Fire and Water…In-game event4 Mar 2026Plan B – v1.0.6: clouds fixHi Here is a small 1.0.6 update. It mainly fixes a serious issue we had missed: clouds were no longer slowed down by mountains. This update restores the intended behavior: clouds now produce much more rain when passing over mountains (so they lose their water and disappear faster). Please note: some areas “behind” mountains, depending on the wind direction, may turn back into desert. As a resul…In-game event22 Dec 2025Plan B – v1.0.5: actual production stats, quality of lifeHere is a small unplanned 1.0.5 update. We went through all the old suggestions, sorted them, and found a few small ones that were nice to do now. So here they are. We are now down to 0 "vanilla" tasks left! Now, back to work. A lot more to come if all goes right! To stay updated (no spam, ping only for new EA launches or releases): - Discord: - Mailing list: Plan B - v1.0.5 build 1252 Improvem…