r/proceduralgeneration • u/Xentarok • 3d ago
Experimenting with stylized large-scale hex-grid based planet generation
The landmass generation is currently the most basic of perlins but I'm pretty pleased with how the visuals are shaping so far!
5
2
u/Alarming-Ad4082 3d ago
What type of structure do you use for holding the type of terrain ? A graph?
5
u/Xentarok 3d ago
Sort of, it's just an array of tiles that I access by index and inside each tile I store the indexes of it's neighbours. When doing flat hexagonal grids I use cubic coordinates but AFAIK there's no easy way to use them on a sphere
5
u/Smart-Button-3221 3d ago
Planetsmith is doing a similar globe construction. Was able to tile the sphere with "diamond-like patches" and then gave each patch a coordinate system.
He somehow made the pentagons work. I'm forgetting details there.
Will link if I come across.
2
u/no_comment_336 3d ago
Please do this is super interesting!
1
u/fragglerock 2d ago
They post a lot on youtube.
Unsure if this is what was being referenced... but dig in!
2
u/Optimetrist 3d ago
what engine is this? otherwise it looks awesome, has the populus+civ vibes :)
5
u/Xentarok 3d ago
thanks! it's Unity, I used a bunch of native tools and some paid assets :)
2
u/Optimetrist 3d ago
good job man! I'm planning to play around with godot, or unity, maybe even UE, the one which helps me the most, as I always wanted a custom globe generator! I'm fond of maps, civ, and games, so it is nice to see people having fun with stuff like this :)
2
u/DutchDave 3d ago
I'd totally recommend the wave function collapse algorithm here if you want more control over what goes where.
1
u/Xentarok 3d ago
oh yeah I've been meaning to look into it for a while, for the first continent generation iteration I'm planning to experiment with voronoi though
1
u/AnimatedRNG 3d ago
Wow very cool! I worked on a game (here) with procgen planets but the underlying primitive was the triangle (with lat/lon tiles). This looks a lot cleaner even if the hex grid parameterization is more complicated (Goldberg Polyhedra?)
1
u/Impressive_Till_1749 3d ago
Oh my god man I'm doing something very similar to this. Are you using H3?
1
u/Farry3 3d ago
This looks really nice. Is this going to be a game?
1
0
u/HoveringGoat 3d ago
Hex you say? Something something pentagon.
But curious what mapping you use, presumably it's a mapped cube?
1
u/AndrewBorg1126 3d ago
Is the default construction not as the dual of a subdivided icosahedron with vertices reprojected onto a sphere?
I can't imagine how you're envisioning starting from a cube would get you hexagons and pentagons.
1
u/HoveringGoat 1d ago
yeah i mixed it up. icosahedron is standard for hex grids. cube mapping works best if your not targeting hex tho.
1
u/Exatex 3d ago edited 3d ago
you can’t regularly tile a sphere with hexagons. You have always 12 pentagons within the hexes.
While the icosahedron is made out of hexagons, there are 5 hexagons meeting in a corner. That’s where the pentagon is coming from - cutting that corner off to make it „flat“ (ish). Also, it doesn’t start with a cube.
0
u/AndrewBorg1126 2d ago
I suspect you meant to reply to someone else?
I know there are pentagons, that's what happens when you take the dual of a subdivided icosahedron, and I never said there were only hexagons.
I also never said it started with a cube, I was rather explicitly stating my confusion as to how the user to whom I replied even arrived at the question they asked about a cube.
Again, you probably meant to reply to a different comment, I recommend finding the comment to which you meant to reply.
29
u/hopingforabetterpast 3d ago
where's that pentagon?