Posted October 22, 2022 by Christopher A. Summer
#ai #artificial intelligence #art #stable diffusion #comparison
To create graphics for my game “The Nymph's Laugh” within the short time-window that I had for the game-jam (which was effectively about a week, far less than the two jam’s two-week time-window, because so is life), I utilized ai-generated images (via Stable Diffusion) for the backgrounds and for the protagonist’s closeup-portrait.
Of course, it is not as simple as pressing a button and having a functional game-asset being created for you – there are still varying amounts of manual editing involved. It is just fitting to make a small exposé showcasing the original ai-images and which parts of them were manually edited.
The first step is to create some images via text-to-image prompt, for which there are multiple websites on which you can do that for free. If I recall correctly, I generated most of the elements that I used for this game on https://thumbsnap.com/gen. Finding good prompts can be tricky, but a good prompt for this game’s images looked something like this:
a landscape of mystic marshes with cyan mist with twisted trees in Iceland Ireland Scotland Dartmoor, Giant's Causeway cliff, realistic oil-painting by brian froud and alan lee
Generating an image takes a few seconds, even up to a minute, but after a while, you can accumulate a whole lot of images which you can select from – here is only a tiny selection of images that I generated as possible backgrounds for the game:
Once I had selected a handful of images, I started to edit them in GIMP and Krita. I will now briefly point out the often rather subtle changes I made to each image.
The start-screen as well as the first and the last scene of the game combines several images, notably a flat but detailed ground which is necessary in all scenes for the player to walk on. The cliff and vista beyond the elven gate had to be edited quite heavily. A subtler edit is on the staircase, for which I had to accentuate the steps of the stair a little more clearly via pixel-art.
The center-scene’s ground had to be flattened, with the grass being less green, the stones being re-arranged, and the contrast further back in the fog being evened out a bit. Note that the final image is slightly stretched, to fit more of the image onto the screen, which I had to do with most background-images.
The north-west scene did not require much editing, since I decided not to animate the water for the game-jam, since I wouldn’t have had the time to check whether a new custom shader for a water-mask would render correctly on y-inverted graphics-cards. I increased the contrast, made the grass and path-stones a bit browner, and replaced a rather unintelligently artificial looking part in the background.
The west scene required a flatter ground, very different colors, and different rocks in the lower left and right corners.
The south-west scene has some of the most noticeable edits. Aside from the flattened ground, I had to insert edited stones from a different ai-image in the lower left corner, as well as a tree on the right side which both to account for the trees in the next image and to better differentiate the two exits in the scene. The rocks and grass in the foreground of the original image were very nice, so it was a shame that I had to sacrifice those for the ingame version.
The south scene originally had a painting-frame in the ai-generated image – this sometimes happens, and for this game’s format it is actually a good thing because it means that there is less useful stuff at the top and the bottom that I have to sacrifice. This scene contains several noticeable edits: I had to flatten the ground (of course), make the upper right corner darker and less foggy, hint at paths left/right/top, neutralize some of the odd details in the background that stood in the way, and add some rocks from another image at the bottom to signify that there is no path there. Note a subtle detail: The left and right sides of the screen have the grass-texture smoothly transition into the grass textures for the scenes neighbouring west and east.
The south-east scene’s edits are fairly subtle. The flatter grass is using a slightly different texture, and the cliff to the right has an admittedly rather sloppily edited blue mist for a smoother transition into the water. Most importantly, however, the sky has been changed completely, so that it would be more in line with the sky mood in the other scenes along this game-world’s east-coast.
The east scene has different grass on its flattened ground, a different cliff to the right, and a more strongly accentuated mist emerging from behind the rock-wall further back in the scene (to subtly signify that there is an exit over there). Note that the sky and the mountain silhouette in the distance are smoothly transitioning between the previous scene’s sky and the next scene’s sky.
The north-east scene only needed a flattened ground, some subtle editing at the top, and a brown rocky path to the left in order to hint at the neighbouring gate-scene having such a ground.
Last but not least, here is the closeup of the protagonist Avon. I prompted the AI to give me a realistic oil-painting of a handsome young man in somewhat medieval clothing with a neutral but skeptically thoughtful expression on his face. As you can see, I gave him less saturation, stubbles, sideburns, a different hair-line, stronger eyebrows, subtle changes in the lighting and shading, and very different clothes. One of his eyes was also squinting a little too much, but having only so few pixels to take care of made that easy to correct.