Background Caves. No-AI Image Generator

A side-view generated with my tool. Any generative AI can now generate this, and much better-looking images too. But the beauty of procedural generation is in its parameters and its continuity.
A side-view generated with my tool. Any generative AI can now generate this, and much better-looking images too. But the beauty of procedural generation is in its parameters and its continuity.

While playing around with another game idea, I wanted to add a background image. Something that would represent fantasy-looking underground caves. I often procrastinate on making more impactful progress (say, creating a vertical slice with mechanics) by lurking around itch.io or OpenGameArt. As always, I found a lot of inspiring art ready to be used in almost any project.

One art piece by Blarumyrran looked almost like what I wanted. But not quite.

Caves by Blarumyrran that inspired this little journey.
Caves by Blarumyrran that inspired this little journey.

I wanted a higher-res version and a landscape-oriented background. First, I tried simple crops, squeezes, and mirroring. All simple steps to try and match what you have with what you want. But after that, I thought that what I wanted has a simple structure with some noise. That should be perfect for procedural generation algorithms.

A quick search gave me some ideas, but not a tool I would be satisfied with1. However, Claude knew some algorithms from memory, and produced an interesting demo of what I thought was basically what I needed.

A layered cave generated by the first iterations of the algorithm.
A layered cave generated by the first iterations of the algorithm.

I got interested in using that algorithm, based on noisy spectral synthesis2, and added several post-processing features I wanted: palette support, different illuminations, and pixelisation functions.

Screenshot of the released tool, with a preview of the generated image and the UI for controlling the generator. You can use the sliders to correct the image on the fly — the generator is fast enough to process the canvas on your phone in almost real time.
Screenshot of the released tool, with a preview of the generated image and the UI for controlling the generator. You can use the sliders to correct the image on the fly — the generator is fast enough to process the canvas on your phone in almost real time.

All of this looked more like a tool that could be used outside of my small project, and I know at least some tabletop enthusiasts are looking for procedural generators for their games. This is why I decided to add some polish and publish it as a tool on itch: Background Caves.


This post is part of my #100DaysToOffload challenge.

Footnotes

  1. But there are some amazing repositories with texture generators I want to link. This is an old collection of different shaders that run generators based on different noise functions, as well as post-processing. Another repository is about a specific method of generating textures. ↩

  2. Perlin, Ken. “An image synthesizer.” ACM SIGGRAPH Computer Graphics 19.3 (1985): 287-296. As a side note, you can see some amazing demos in SIGGRAPH presentations — here is an overview of some of the technical work presented this year. ↩

← All posts