• Yukkafuzz

Making Planets Pretty

Beauty underlies the wonder of exploring a new place. So it's essential for places one can discover in any game, especially ones focused on exploration, be beautiful.


For many of the early years in games, developers chased photorealism (having the game look like a photo of real life) as the one way to achieve more beauty. But as graphics improved, the challenge of making them realistic required more and more resources. AAA games still, for the most part, have graphics that attempt photorealism (and some of them are quite good at so doing, I might add), but smaller developers were forced to become more creative with the beauty their games contained.


And so, the idea of an art style proliferated throughout indie/small games. Some would go for the nostalgia of 2D and pixellated - since games had now been around long enough for that to exist - some would go with simple, using modern lighting effects with low-fidelity objects and textures, and some decided on a cartoon style (many AAA games have done this as well - Zelda: Breath of the Wild comes to mind). Of course other styles exist I have not listed here as well.


The obvious question is, where does EXO fit in all of this? And the answer has shaped itself and morphed over the course of development, as I imagine it does for many games. I don't want to get caught reaching too far for photorealistic, but I don't quite want something as simple and cartoony as, say, Astroneer (which is a big inspiration for me, by the way). But the exact point in between has been in flux. EXO's planets, as viewed from space, were one of the first features of the game. But they've been slowly changed to arrive at their current (and probably not quite final) form, all in the pursuit of the wonder of exploration.


Take a look at what a planet looked like early on:


Early on, there were only three simple planet visuals you could find.

That's decidedly in the "simple" art style category, but as a space nerd I really wanted to see planets with detail that looked a bit more like the planets we know in our solar system. So I created a tool to generate some textures to use on my colored spheres.


The second iteration of planets had some detail that (I think) added some beauty.

Creating the tool is somewhat more involved than just one sentence and, "Voila!" It generates noise in a three dimensional space so that I can "sample" at a certain position (x, y, z). This sample will give a number between 0 and 1, which is converted to a color according to a gradient I have put in. So, the tool samples the noise at a bunch of points on the surface of a sphere, and stores the resulting colors in a 2D image. To get satisfying results, I slide around a lot of different settings:

Using the texture generation tool involves many sliders.

With the tool in hand, I had created some more detailed and better-looking planets. But there were still only three possibilities. When I'm exploring many systems, the novelty of those three fairly pretty planets quickly wears off, and I lose the wonder felt when finding something new.


Clearly, I needed some added variety. I allowed each planet to randomize its underlying color, with some colors more rare than others. This did create some wonder when I found a planet with a rare color, like the pink ice giant below, but since the variation of color on the surface was always one of just a few possibilities, it still did not really achieve a truly unique feeling.


Randomized color for each of my planet types actually helped a lot, but eventually seeing the same pattern over and over got old.

One of my main tenets for EXO: Perl is that, on average, things you find should "make sense", so that when you find something that "doesn't make sense", it feels cool and unique, rather than dumb. So, for example, if you find a planet near its star that planet should be very hot, generally, so that the one time you find a cold planet near the star you think "Whoa, I wonder what caused that!" instead of "Wow, this game developer really does not understand science." With this in mind, the appearance of planets should, generally, align with the planets' properties. Coupled with the lack-of-variety issue that had become apparent, this meant I needed to create some detail that fit more extreme situations - most obviously, high and low temperatures.


Cold, icy planets and extremely hot, molten planets were previously missing. Notice the bumpiness on the surface on the left, and the way the one on the right emits its own light.

While I was working on these new planet types, I also leveled up my tool to allow creating bumpy and light-emitting surfaces. These look great, as far as I'm concerned, but, varying the underlying color does not work as well with more complex details. The contrast between the brown and the whitish gets muted if a tint is added. Perhaps you can guess the solution I'm using?


I had long avoided trying this because I knew it would involve one of my least favorite things: performance optimization. But EXO now generates a unique texture for every planet, using the tool I had written with some additions. To generate a surface with the detail in the above two planets, it takes my computer about a second. Imagine a system with 100 planets or moons (not an unreasonable amount) - that would be almost a two-minute loading time! So, of course, all surfaces are not generated with that level of detail at first. As you get closer to them, they'll create their surfaces in more detail.


I'm still in the process of fully following my "things make sense" tenet for this new planet texture strategy, but the idea is this: the possible settings for creating the texture (see the above screenshot) will be different for planets with different types and features. So I'll leave you with a bunch of the possibilities.




-Yukkafuzz

One Knight Studio © 2019