Dev Diary: Procedural Planet Art
Today’s episode of our dev diary is about how we’re generating our procedural planet art. It’s a big task, but we want to share the journey so far and highlight some of the amazing work we’ve been doing in what is our biggest, most collaborative undertaking so far.
Our process for planet art is following the general model from
The Ur-Quan Masters which we loved. Planets serve a particular purpose in our game, and we want to be able to satisfy that big goal by being able to make many of them. First, let’s start with what
The Ur-Quan Masters did.
What’s Our Goal?
We like to think of planets as characters unto themselves. Though space is largely empty of actual life, we want the universe of
Free Stars: Children of Infinity to have things which our living player will appreciate and have emotional reactions and relationships with. Planets, first and foremost, have
types. Some of them are mundane, disappointing, and maybe even unappealing, but others may be more fantastical in name and appearance, like a gem world. We want players to be happy, disappointed, frustrated, and have myriad reactions to meeting these recurring characters over and over, so they need to have a little character to begin with.
Images of all the planet types from
The Ur-Quan Masters. What a lineup!
Similar to
The Ur-Quan Masters, there will be thousands of planets to explore in
Children of Infinity. And similar to how we didn’t actually don’t know how many there were until
The Ur-Quan Masters was finished and Fred wrote a program to calculate it way back in 1992, we actually have no idea how many are currently in the game despite the hundreds of stars in our galaxy. But we know the player is going to be seeing a lot of them.
Creating thousands of planets by hand would be disastrous for our budget and probably drive at least most artists insane. Procedurally generating the art is the only way, but far from piles of random planets is our actual goal: piles of planets with a distinct character. How have we gone about this?
From the Web to Godot
The short version of this story is that we forked
a procedural planet toy which someone else had made, explained why we liked it and thought it might be a suitable start for our game, and asked if anyone was interested in trying to learn about it and mold it into something we could actually use.
The UQM Planet Generator web toy.
Several members of our community just had fun making planets they thought had interesting features. A few expressed interest in trying to understand and shape the tool further. After some time spent iterating on the web version combined with
announcing our shift into using Godot as our viewer solution, we asked if the planet art team wanted to make the jump with us instead of just proving more things in the web app for us to port later.
Since I had a bit of a Godot head-start, I started by building them an extraordinarily simple Godot test project which we could use as an
addon in Godot, meaning it could be built and maintained on its own, and integrated later in
Children of Infinity. I passed it off to the team actually doing the hard stuff, and they set about trying to rebuild the techniques they liked from the Javascript version while expanding on them or altering things to work better given the technological capabilities of Godot and the realities of how we wanted to use it in our game.
Test of a gray noise texture on a sphere.
Test of a gray noise texture on a sphere.
Test of a gray noise texture on a sphere.
If you’re unfamiliar with procedural texture generation, I can give you a very high-level overview. If you’ve ever seen fun, mathematically driven artwork like the
Mandelbrot set of fractals, we use algorithms plus randomness to generate what we call
noise textures. By tuning the mathematical inputs of the noise, we can create interesting curves, dots, and shapes. We map the outputs to color values, height values, and material properties (i.e. is the surface shiny, rough, etc.), and we wind up with art as a result of controlled, designed chaos. Computers are doing what they’re good at, and our artists can hand-craft things to share the space with the generated objects.
A simple noise texture making different shapes and grayscale values.
The last step is simply mapping it to a sphere properly for views in space while also supporting mapping it to a rectangular plane for Planetside. The team developed some of their own techniques on that, and we worked together to integrate it into
Children of Infinity. The initial project went just as planned and was a success! The art team proved out how to make planets with base types, artistically (e.g. a rocky, mars-like planet but with different colors), how to create a planetside texture which matched the spherical view, and our workflow for integrating their changes while giving them a mini-planetside test bed where we could tune.
A test texture mapped to a rectangle and a sphere, showing how the texture can be projected to either.
Beyond the First Steps
Rainbow world experiment, with rainbow rings. Color overload!
In the beginning phase, the planet art team was mostly figuring out just
how to get things off the ground, proving how it would be done and making something good enough. While the non-procedural art crew was learning how to build and light art in Godot, we eventually wanted to merge forces. Ben, our art consultant, worked with me to actually figure out an in-engine
look for Planetside, which is, as far as our game is concerned, the place players will be spending the most time looking at the planet textures.
We had enough experience so far building ship art that we weren’t concerned about that, but what about this new, procedurally generated texture? As the only non-space gameplay experience, how would it sit alongside the necessary gameplay components of Planetside like creatures, minerals, and hazards? We didn’t just need to develop a Planetside texture but also a general aesthetic for Planetside, with representative lighting, camera angles, and strategies for supporting the fun we want players to have.
A few prototype dynamic elements help us understand light and scale against the planet texture.
Down on Planetside, there’s a lot going on besides the texture! Putting it all together taught us a lot about what we needed. Lighting helped the most, including different lighting configurations for different planet types. We imagined being able to play with the lighting values as well, adding bits of nuance to different Planetside experiences.
Even the same type of planet being lit differently gives the experience unique character. Spoooooky.
Beyond that, we learned an important lesson: the planet texture which looked good in Orbit did not look good on Planetside. Put simply, Planetside is an
abstraction of sizes done to satisfy its arcadey gameplay. It has an illogical size (it’s a rectangle) and objects are not represented at
true sizes relative to one another. Having a very
real feeling planet texture in Orbit didn’t make sense when we went to Planetside. Improving this is our current focus, but we only were able to learn what we needed to improve by bringing everyone together.
We’re by no means done, but we have our course charted!
Some of the proof-of-concept planet textures being generated so far.
Our Destination
On this project, we’ve often used the phrase
One Awesome <Insert Blank> as a goalpost. If we can prove that we can make one awesome planet texture, which is part of one awesome Planetside experience with all the components we’re using, we’ll know where the mark is. By actually trying to put all the pieces together, we truly see what works, what we need, and what we can consider polish or nice to have. This is crucial for game development, and it is always an iterative process to learn just what we have.
Working with an artistic sense of making something stylized, abstract, and emotional on Planetside alongside the programmers’ knowledge of what can actually be done and how is going to give us the best result. It helps to have many eyeballs and many disciplines contributing.
Back to the original goal: we want players to feel emotional connections with the planets. They’re exploring space, full of the unknown and surprises, but with familiarity in the different types and discovery in new ones. If each star system is a mystery candy box, the planets are the individual candies. Our game has a
lot of candy boxes to unwrap, and it’s important to remember that, just like candy, they’re not supposed to be sustenance. Players will be scanning, landing, and taking off in rapid succession, all while trying to accomplish their own open-world goals driven by their own desire. Planets are a bite-size experience, and we want that experience to be satisfying in aggregate, with knobs to twist and progression on both the visual and gameplay sides to keep it interesting.
The same planet noise with randomizing material settings for interpreting it.
With the goal in mind, once we have the setup for one planet, we’ll be able to move on to making Many Awesome Planetside Textures because we have our benchmark. The planet team has already done some of their own explorations on how to do more than just we originally wanted. They’ve built things like a crater-stamp generator, rings for planets in orbit, and even proofs of concept for how to do some of our more unusual worlds like Emerald Worlds. We’ve done experiments with other layered, procedural elements in-engine which will add variety like lights and fog. But we have to have our single benchmark before we can evaluate what’s really effective!
A test of crater ‘stamping’ on a planet’s surface to add even more variety.
Last but not least, one of the special things about the procedural planets work is that it’s almost entirely community-sourced! We’re looking forward to releasing it as its own standalone addon so people can use it even in their own projects or add to it themselves. We are extremely grateful to our community team of just three folks who have been involved in pushing this forward and will be part of taking it across the finish line. It’s really fun for us to work with them on this piece, and we wanted to take a moment to highlight their amazing work. Look forward to another episode when we get further along!
Join us on
Reddit,
Patreon, or
Discord and let us know what you think!