A Planet Reborn — From Java to Godot

godotdevlogplanet

Remember when I said at the end of my first post that I’m off to work on the game? Well, I got distracted. But in the best possible way.

About 15 years ago, I built a procedural planet renderer in Java using the Ardor3D engine. It was one of those projects you’re genuinely proud of — fly from orbit down to the surface, watch the terrain detail increase as you descend, mountains rising from flat patches. I loved it.

Then Ardor3D died. The project couldn’t even run anymore. It just sat there on my disk, gathering digital dust.

When I picked up Godot, that old planet kept nagging at me. Could I rebuild it? In pure GDScript? No C++, no GDExtensions, no plugins — just Godot and its scripting language?

The Rewrite

Turns out — yes. The core ideas are timeless: cube-to-sphere projection, quadtree LOD, frustum and horizon culling, chunk pooling. The implementation needed a complete rewrite, but the concepts translated beautifully.

The biggest surprise was how far GDScript + shaders can go. All the terrain — mountains, valleys, oceans, snow peaks — is generated by a single GLSL shader. The GDScript side handles the LOD decisions and mesh management, while the GPU does the heavy lifting for visuals. Atmospheric scattering, triplanar texturing, day/night cycle — all running in the browser.

Why Share It?

I designed it as a learning resource. The README is essentially a small textbook — it walks through every technique used in the project, from the math behind cube-to-sphere mapping to why skirt geometry exists. I wish something like this had existed when I was starting out.

The code is intentionally simple and readable. No clever abstractions, no premature optimization. If you want to understand how planetary rendering works, clone it, open it in Godot, and hit Play. Then read the code alongside the README.

Try It

You can fly around the planet right now in your browser — no download needed:

And yes, I’m still working on that game. The planet was a detour, but a good one. Back to ropes now.


Watch the planet in action:

Here’s a glimpse of the planet at different altitudes and times of day:

High altitude view Mountains up close Surface with grass textures Sunset over the planet

And for the archaeologists — here’s the original Java/Ardor3D version from ~15 years ago. Fair warning: YouTube has re-encoded these videos about ten times since then, changing codecs along the way. The quality suffered. A lot. If the wireframe looks like it was filmed through a wet towel, that’s not your monitor — it’s just YouTube doing its thing over the years.

Follow Cuberact for more: