November Ramblings

After the first four weeks at my new job, we’re now finally out of what can only be called crunch. The reason why there’s anyone hiring gardeners to start in November is that our company is doing the Christmas decoration for the Lübeck Christmas market and several very major companies in the city. And all the stuff had to be up for the opening of the Christmas market last Monday, no matter what. And unsurprisingly, with a total of three days off between the 2nd and 28th, not much work was done on Iridium Moons. But that’s now finally done, and there might even be a whole week of vacation time in December already. Yay, me!

Coming back to the game after a break always has me reflecting and reorienting myself on what I’m actually trying to accomplish by making a game at all. Remembering the broad strokes and basic outline is easy, but the real vision of what the game is meant to evoke and be really about is always much more like a feeling I have than a specific concept. And that always takes a bit of time to find again and rekindle.

And that confused fumbling in the dark always ends with the same discovery: I can’t make something like Morrowind or KotOR all by myself. But even with my limited means and experience, I should be able to make something with the scale and scope of Fallout. And if Fallout can be a classic that is still famous and highly regarded three decades later even as its own game and not just the start of a much bigger series, then there is a chance that I could make something long lasting too.

And it’s becoming more clear over the last year that this is really what my dream of making a game myself is about. Not to make a game that is famous. Not to make a game that makes a lot of money. Both these things seem very unlikely and frankly unrealistic. But what I really hope to be able to accomplish is to make a game that is seen as highly meaningful and memorable at least to a small odd niche of people. To make something that people randomly remember again 10 years later and want to play again. Or that still gets mentioned in recommendations for weird niche games three decades later. The chances for that might be even slimmer than creating a game that generates a considerable income. But that is the dream that motivates me.

Following that thought, I’ve been spending some time thinking about what things are shared in common by games that are still swooned over decades later and that make people replay them even after knowing everything there is to find in them, rather than play something new. And I think there are two main traits that most of the games that I perceive as forever classics from the 90s have.

First, they all have a unique world that is highly evocative and has considerable depth. Worlds that might not be pleasant, but that are compelling in a way that makes people want to simply spend more time in them, even after having seen all there is to see. Morrowind, Knights of the Old Republic, Command & Conquer, Thief, and Fallout all come to mind.

Second, most of these games revolve around sets of fairly simple and straightforward rules that come together into a system that is surprisingly complex. They are games where the players always have something to do and several things that are already on the to-do list to deal with once there is a good time for it. And because there are so many moving parts involved, the situations are always somewhat different and unexpectedly changing so that the players always have to keep adjusting their plans all the time. Knowledge from previous playthroughs helps a lot, but you’re always managing your plans for your next steps at any point during the game. Great examples of that being System Shock, Master of Orion II, Daggerfall and Morrowind, Jagged Alliance 2, and again Fallout.

And fortunately for me, those are the two fields where I am having the strongest inspirations, and where I have the greatest confidence in my skills as a game designer. Unique evocative worlds and systemic gameplay are the things about game development I find the most fascinating and compelling. And it seems very likely that this is what makes me see the games that I consider timeless forever classics as such.

The chances of reaching that lofty dream are still looking slim. But that doesn’t deter me from trying. And in some way, I feel that the world of famous and highly profitable indie games doesn’t really focus on these types of games very much. It seems that most surprise breakout hits are smaller games that mostly focus on being games, rather than works to take people into their worlds. So maybe, the odds to make a lasting impact in that space are not that slim after all?

Now we are getting somewhere!

The roughly four months that I’ve spend almost full time with Blender and Godot this year were mostly occupied with learning how to use the primary tools I am going to be using to make my game and what they are for. For a good while I felt like I was impulsively running from one thing to the next, never really applying the new skills I had just learned. But the last two weeks in particular I have been discovering that this has actually been a really good approach, as it turns out there are a lot of things that really only start to fully make sense when you can see them in the context of the other tools they will be working together with. I could have made a big library of assets over the course of this year, but probably would have ended up doing everything over from scratch because my understanding of how I will be lighting the game has changed a lot. And plenty of other things like that.

But I feel that at least in the graphical department, I do have all the skills that I was planning to use, and I also have worked out the exact specifications for the textures that will go into the game, and the process of how I can produce more as they become needed quickly, without causing a big disruption of what I am working on. Scripting game mechanics is of course still a very different story, but fortunately the Cogito template already has most of the functions I am going to need. And diving into it to see how they work will be a lot easier than learning how to do all these things from scratch.

But I am now very confident about starting work on the main asset library, and not having to come back later and completely rework most of the models and textures. And first impressions are looking highly promising. I am absolutely happy with this level of graphical fidelity and quality, and it is exactly what I’ve been envisioning for over a year now. I do think this is probably going to be the art style of Iridium Moons pretty much locked in already.

A (new) way to create large area retro textures

One of the biggest and most frustrating struggles I’ve been having with developing my techniques for creating the assets for Iridium Moons since the very start was how to make the kinds of textures that I want for the game. There are loads of guides on “How to make PS1 textures”, but none of them really do the specific kind of texture I am having in mind, or really work in a way that I think makes everything vastly more complicated and inefficient than it should be. I had a pretty good idea for what I wanted to do, but not knowing the technical terms for the various steps I had in mind made it extremely difficult to search for information on how to do them with Gimp and Blender. But every time I spend half a day trying and failing to find the answers I was looking for, I did pick up a few pieces of knowledge about image editing and the functions of these two programs, which now finally have given me the ability to actually develop the whole process to get what I want by myself.

There are three different sections on making late 90s pixelated textures that I am going to cover here: Pixelation noise in hand-drawn textures in Gimp, converting PBR materials to single image files in Blender, and breaking up repeating texture patterns of small textures on large environment surfaces.

Adding Pixelation Noise

This one is super easy, and it’s also just dumb how long it took me to get here.

When you draw a low resolution texture with few colors by hand, it can often look very flat and dull. One thing that makes the textures on 3D models on PlayStation and early PC games with texture mapping look the way that they do is that you almost never have two pixels of identical colors sitting next to each other. It’s also very prominent in Minecraft and other games that replicate its style. It’s what causes the graininess in the textures that basically defined this visual style.

Really all that is needed is a way to randomly change the Hue (color), the Value (brightness), or the Saturation (greyness) of every pixel on the texture by just a little bit. Over the past half year, I’ve come across numerous guides that explain how to do this by creating shaders in Blender that go over the source texture, or how to make custom grunge brushes for Gimp, and all of them either were way more complicated than it has any right to be, left out some crucial step on where to get a necessary resource, or just didn’t look right.

But somehow, and it is really completely inexplicable how such a thing could even be possibly, none of these literally dozens of guides ever mentioned once that Gimp has an HSV Noise filter. Which isn’t under Filters > Render > Noise like all the other noise filters that regularly come up in instructions, but under Filters > Noise.

It’s not really hidden, but all the instructions using Solid Noise, Perlin Noise, or Plasma Noise got me locked into that area of the Filters menu and blind to there being a whole second Noise section in it.

This does exactly what I always wanted to do, and it is exactly as quick and easy to do in Gimp as I always thought it should be. How I never found any information or mention of this in any guide on retro textures will forever remain a mystery for me.

Converting PBR Materials to Single Texture Files

This part is fairly simple and intuitive, but because it’s an integral part of what’s covered in the next section, I’m including it here for completeness, for anyone who comes upon this guide to make textures like these without prior knowledge.

When looking for free textures for a game, there’s actually not a lot of sources for simple low-resolution generic surface textures. But there a loads and loads of modern, high quality, free PBR materials. These materials consist of typically six or more different files that are combined by 3D rendering or game engines for various advanced visual effects and come at minimum sizes of 1024×1024 pixels that often come in at 10 to 20 MiB each. But they can easily be converted into a single 128×128 pixels .png file with a size of 30 KiB using Blender. You could simply just use the color texture from the PBR material and call it a day, but that leaves it without any shadows, which can look very boring and bad on many materials. But getting a texture file that combines both the basic colors and shadows is easy enough to do:

  • Create a new Blender file.
  • Go into the Output Properties on the right side of the screen, and under Format set the resolution to a square resolution of a power of 2, like 1024×1024.
  • Go into the World Properties on the right side of the screen and under Surface, set the Strength to 0 to remove ambient light from the scene.
  • Delete the cube and add a new plane mesh.
  • Position the camera directly above the plane and have it look straight down at it by setting all rotations to 0°.
  • Go into camera view to see what the camera is seeing by pressing 0 on the NumPad. In the camera’s Data settings change type from Perspective to Orthographic and change the Orthographic Scale so that the edges of the camera image match the edges of the plane. (If it’s a default new plane and the camera is 1m above is, the scale should be 2.0.)
  • Select the default light source or create a new sun (make sure it’s the only light source) and go into its Object Properties on the right side of the screen and set the x-rotation to -45° and the y-rotation to 45°. This will bring out the shadows that will add a perception of depth to the texture, and 45° angles is a good middle ground between all the possible directions a light could hit a surface from.
  • In the light’s Data Properties on the right side of the screen, set the Strength to 3. (Actually the correct value is pi, and you can either type in “3.142” or just “pi” instead of a number, and Blender will convert it automatically.)
  • Select the plane and go into its Material Properties on the right side of the screen and assign the material that you downloaded to the plane. (If you’re completely new to Blender and don’t know how to assign materials, I have to direct you to look for one of the many, many guides that explains that.)
  • In the Material Properties, Blender sets the IOR (Index of Refraction) for every new material to 1.5 by default. For most materials, this will produce a white sheen over the surface of the plane causes by the light from the light source coming in at an angle and bouncing off, that we do not want. Set this to 1 instead. Except for textures of natural stone and probably some other cases! For natural stone, I have found that an IOR of 1.5 almost always looks way better than changing it to 1. Try which value looks best depending on each material. This is the one step that will have to be manually repeated for every new material applied to the plane. If your finishes texture comes out looking either desaturated or too dark, check the IOR setting on the material.
  • Now that everything is set up, go into Render > Render Image at the top of the screen. In the new window that opens, go Image > Save as… to save your new texture file.
  • Optional: If you want to modify a texture to break up repeating patterns for large surfaces, as will be covered in the next section, and you have a material with a very uneven surface that produces a lot of strong shadows, create a second version of render image but with the light source turned 90° on the y-axis. The two will then be combined into one image later.

Breaking up Repeating Patterns on Large Surfaces

PBR Materials are almost always made and labled as “seamless”. Which means when you put two copies of the image next to each other, there will be no visible line where the two images touch. But unfortunately that doesn’t mean you can repeat that texture 10 times on the same surface without getting ugly visual artifacts.

You can not tell where the edges between the tiles are, but you can definitely see that there are repeating tiles. It looks bad enough on the wall of a building, but just awful on the side of a mountain. While textures like these are indeed “seamless”, they are completely unsuited for surfaces where they will repeat more than two or three times.

One common method to break up this repeating pattern in Blender or Godot is to use a shader that breaks up the surface into irregularly shaped pieces and randomly rotates the texture on each of these pieces. Which often looks pretty good on higher resolution textures where you can’t see the individual pixels. But in low-fidelity retro styles where texture pixels are very visible as individual squares, this makes the edges between each piece quite visible and looks pretty bad close up. And if there are strong shadows in the texture, as in many rock faces, it will look even worse. Getting the edges between these rotated areas to disappear took me a long time, but now I finally have it worked out how to do it in Gimp, without having to deal with any kind of shaders.

The numbers in the example below are based on using a 1024×1024 pixels source image that gets downsampled to 256×256 pixels and then repeats 16 times on the output image. Calculate whichever values apply for the scale you want to work with.

  • Open the texture file in Gimp.
  • In the top menu go on View and select “Show Grid” and “Snap to Grid”.
  • In the top menu go to Image > Configure Grid and set the grid spacing to 256 pixels horizontal and vertical.
  • Scale the active layer down to 256×256 pixels. To get the crisp pixelation look of old games in your textures, set Interpolation to “None”. Otherwise the image will get blurred in the downscaling process, losing the defining feature of this visual style.
  • At the bottom of the Layers docker, click “Duplicate Layer” until you got 16 copies of the downscaled layer and move them to the 16 squares of the grid. With snapping to grid enabled, they will align with each other automatically. Then at the bottom of the Layers docker, click “Merge” until all the layers are combined back into one.
  • Duplicate the new 4×4 image layer again, and rotate the new layer by 90 degrees.
    • Optional: If you are working with a texture with strong shadows, and you rendered a second image of the material with the shadows rotated by 90 degrees as explained below, don’t duplicate the layer and instead go into the top menu File > Open as Layers and select that second image. Then do the whole process of scaling it down, repeating it across the 4 by 4 grid, and merging it back into one layer, and then rotate it by 90 degrees.
  • To better see what’s going on, hide the lower of the two layers in the Layers docker by clicking on the eye icon.
  • Right click on the upper layer and select “Add Layer Mask.” Pick “White (full opacity)”. There are now two images for the layer in the Layers docker. One showing the image of the layer, the other currently just a white square. You can click on them to select which one you want to work with.
  • With the layer mask selected, go to the top menu and go Filter > Render > Noise > Solid Noise. You can pick whatever Size or Detail you want, but I like to go with size 8 and detail 4. Check the box “Tileable”. Every part of the layer that is under a dark pixel in the noise mask is now transparent. The darker the pixel, the greater the transparency.
  • With the layer mask still selected, go to the top menu Colors > Levels. Below the top slider bar, set the black value to 64 and the white value to 128. Or whichever other values you prefer, but those always work well for me. This will result in most of the noise being turned either completely white or completely black, and the layer being either completely opaque or completely transparent, but it leaves a blurry gradient of transparency on the edges of the regions, which will hide the seams.
  • Turn visibility on the bottom layer back on. If you combined two images with different shadow directions, check if the shadow directions match and rotate one of the two layers if they don’t.
  • As a final touch, go into the top menu and go Image > Mode > Indexed… and pick “Generate optimum palette” with a maximum number of colors of 16. This will make the crisp, grainy pixelation pop even more, and also reduce file size significantly. For a texture with many different colors, maybe try setting it to 24 or 32 if too much detail gets lost.
  • The image can now be exported as a .png and is ready to go.

The keen eyed may have noticed that this is a different texture than used in the example above. Even with this technique, the source image needs to be somewhat homogeneous in its color and brightness. It can break up a pattern in the source image to make it less visible, but when there’s a clear line between a light and dark area, this just becomes impossible to hide unless you go in and do fine color adjustments. Which is fiddly work and requires some skill, that I personally don’t want to bother with. And the whole point of developing this process was to have something that can be quickly repeated on a large number of textures.

Of course, a texture modified like this will still produce a repeating pattern. But instead of having 64 repititions on a 2048×2048 surface, we now only have four. And if you really want to, you can make the new texture on an 8 by 8 grind instead of a 4 by 4 and increase the distance between repetitions even further.

But I think it looks really good in action.

Especially compared to the rocks in Half-Life, which were a crime on the eyes even 28 years ago.

Day and Night Cycle over Palan

Really not a lot to say about this. This is what I’ve been doing over the past three days.

This scene is build with the Terrain3D plugin for large outdoor maps, the Sky3D plugin for the sky colors, clouds, sun, and moon, and the Cogito template to move around it as a player.

The rings and the space station cube are all mine. The geometrically correct shadow on the ring at midnight is particularly cool.

The only thing that’s not yet quite perfect about it is that the clouds appear behind the rings. Which is something I have not figured out how to set in the sky shader, but since the moon is behind the clouds where it’s supposed to be, I expect this to be relatively easy once I have some understanding of shader code.

Here comes the Sun!

I noticed some weird shadow colorations on the ceiling of my Oligarch Palace elements when importing them into Godot. And on my search to fix it and make the shadows at the top of vaults look more natural, I discovered the Global Illumination feature.

A difference like Day and Night!

This obviously looks nothing like the way 3D games were lit in 1999, or even in 2003. This took me four clicks and is much more advanced than anything that they had back then.

But one of the very first decisions that I made when I had the idea to make a game two and a half years ago was that I want it to have retro-styled models and textures but with nice modern lighting and shadows. So this is still entirely according to plan.

This might actually be a bit too realistic though. But I think once I really get into the entire lighting thing, adjusting the settings to make things less realistic probably shouldn’t that much of an obstacle.