Generating Hamiltonian Cycles in Rectangular Grid Graphs 

Continuing the theme of looking at the process of developing a generator, here’s a post by Pascal Sommer about generating a particular kind of shape. In this case, a Hamiltonian cycle: a loop through a graph that visits each node only once.

I found this process is illustrative: flipping the problem from finding a minimum spanning tree to calculating the Hamiltonian cycle mirrors a common action I find when I’m working on a generator. Often, inverting the problem will reveal new opportunities.

https://medium.com/@pascal.sommer.ch/generating-hamiltonian-cycles-in-rectangular-grid-graphs-316c94ecefe0







Fractals and Visual Effects

Fractals are amazing, but they’re not very flexible. They are, to make up some terms, brittle and rigid. Brittle, because a small tweak can have wide-ranging changes, making a particular look hard to adjust. And rigid, because it’s not obvious what change to make to push the results in the direction that you want. 

Which is why they don’t get used in films that often. “Hard to control” is bad enough. “Can’t make the shape you need” is a show-stopper.

Which is why this article about the visual effects of Guardians of the Galaxy 2 is useful. The techniques they used to tame the fractals are great. Not just because they suggest ways that I can control fractals enough to use in my projects, but because they can be applied to other visual effects with similar problems.

Tools to explore the search space of an algorithmic output, photogrammetry applied to generated images, ways to integrate the generated output within a traditional pipeline: what these all have in common is that they can be applied to other generated things. Not just fractals.

Any generative but inflexible process can be tamed, which opens up a whole host of new applications for existing algorithms. Nesting tools within tools can make generative processes tractable.

https://www.fxguide.com/featured/the-fractal-nature-of-guardians-of-the-galaxy-vol-2







Scanline

“A procedurally generated platformer made for cgajam” - It lives up to the billing. And, of course, the color scheme is gorgeous.

It’s not without its faults–I found it to be brutally hard, which is a common hazard for game jam games. I’m not that great at action games to begin with, and the constant dying made it hard to really appreciate the level generation.

(General rule of thumb for game jams: your game is too fast and too hard. 90% of the games I play from Ludum Dare can be vastly improved by addressing that. Ideally, get someone else to play it and watch them. If you can’t, try giving yourself a handicap, like an off-screen distraction, and see how it affects your performance.)

And it’s prone to lots of rapidly flashing colors, so watch out for that.

Still, putting together a complete, original, procedurally generated platformer in a game jam is quite an accomplishment. It’s the kind of thing that looks easy from the outside, but can be surprisingly tricky to pull off this well. Even research projects that replicate Mario levels take a lot of work, and they’re just borrowing the rules from an existing game.

https://rxi.itch.io/scanline






Smoothgrad

This is the kind of machine learning technique that I want to see more of.

Under the hood, neural networks are complicated things, and it’s often difficult to see exactly why it made a particular decision. Smoothgrad, by Daniel Smilkov, Nikhil Thorat, Been Kim, Fernanda Viégas, and Martin Wattenberg is a refinement of one method for making a sensitivity map.

A sensitivity mask (or feature importance map, or saliency mask) is a visualization of which pixels are important. Or, at least, which pixels the neural network considers to be important. Importance maps have been around for a while, and have been applied to neural networks before. What I think is interesting about this Smoothgrad approach is how human-comprehensible the results are. It’s much more obvious what the machine thinks its seeing and why it went wrong.

And a note for future artists using neural networks: just as edge detection is a useful tool in the visual effects pipeline, I expect that importance maps will be similarly useful.

https://tensorflow.github.io/saliency/

https://arxiv.org/pdf/1706.03825.pdf




CYCLE

You know how I keep going on about using unusual inputs and feeding processes into each other to get unexpected new results? This video by Kouhei Nakama is a really good example of one way that can play out.

There’s a lot of layers here, processes within processes. The theme of the piece–dynamic equilibrium–is something I should talk about more here. Dynamic equilibrium in processes is often a desirable goal for a generative, emergent system, with multiple interacting systems in active motion but a stable enough state. (I’d class strange attractors as being similar in effect.)

Other times, of course, making use of the decay of a system to get your story or meaning across is important. In cinematic visual effects, one time-saving trick is to run a simulation to get the look you want, but trim the shot to only include the part that works, and not the beginning or end where the simulation breaks down.

In a more interactive space, cinematic cutting isn’t always an option. But a system out of equilibrium can still produce an interesting, useful pattern as it decays. Dwarf Fortress’s forts collapsing, an XCOM mission gone wrong, a neural network getting stuck on an image: decay is a generative process too.

https://vimeo.com/176703851

http://kouheinakama.com/cycle/




Video Game Name Generator

There’s apparently some new videogames that you can’t play yet being announced at a conference I’m not at, so what better time to talk about a random videogame name generator?

There’s actually quite a few name generators out there:

https://videogamena.me/
https://github.com/nullpuppy/vgng
https://github.com/nubs/random-name-generator

…and no doubt others.

This particular one has been used for game jams in the past, so some of these games actually exist now. Which is one practical use for generators like this: as a constraint to anchor a project around, boosting creativity.

A name generator like this is a good project to get started with text generation: there’s a structure to the names of games. It’s an approachable start to text generation to find some snowclones to riff off of, and the parody nature gives any combinations that are recognizable but off a purpose.



Scribble Machine

Random output of the automated scribble machine.

Hi! I made a tumblr bot posting procedural generated scribbles. You’re welcome to ask me for more details if you’re interested to talk about it :)




There are a number of art-making bots, but this reader submission has an interesting unity of structure: each piece is built out of closed curves. Unlike art bots that think in pixel grids, or Inconvergent’s accretion processes, these curves and their overlaps are treated as vector objects. The result is an ‘80s-Deco-Revivalism look, a pop-art Memphis Group collection.







Drawing to rules

Procedural generation doesn’t have to be done with computers. Computers open up a lot more possibilities, of course, but there are plenty of examples of non-digital generative processes.

Like this method of drawing to rules, used by Immy Simth. It’s hand-drawn generative art. The constraints the rules set create a very specific feel to each piece, and the similarities between rule-sets (the use of a central black nucleoli, for example) create a unity across the series.

If you’re looking for an easy, artist-friendly way to get started with generative art, reading this will be helpful. Generative art can start by just following a set of rules, and what you learn from this will help you if you want to teach a computer how to follow art rules. Plus it’s an interesting way to make art, in and of itself.

http://imaginingscience.tumblr.com/post/161542546063/drawing-to-rules-01







Oisín: Wave Function Collapse for poetry

Martin O’Leary took some time out from glaciers and maps to experiment with applying WaveFunctionCollapse to poetry. Despite it’s rough state, it’s remarkably effective at mapping text to a rhyming scheme and meter.

It also outputs GIFs so you can watch the process in action.

Digging deeper, the interesting thing here is applying WaveFunctionCollapse to something that isn’t a grid of pixels. It’s a good demonstration of the flexibility of WFC. Of course, it’s not the only algorithm that can be used in non-obvious ways. But it’s a good reminder that your generative toolbox might have more things in it than you think.

https://github.com/mewo2/oisin







Medieval Fantasy City Generator

Oleg Dolya has made generators before, but this top-down generator of city layouts has become pretty popular.

In addition to producing nice, organic looking city layouts, it’s a good example of how simple geometry can be used to make something that looks convincing. It uses a top-down approach: Voronoi cells are used as a base, some of them are merged, types are assigned from the inside out, and then the blocks are subdivided into buildings.

It’s simple but gets the right feel, even though it doesn’t even begin to attempt a bottom-up simulation of city growth. And sometimes that’s the right call: if something looks right and feels right, it can work just as well as a more meticulous simulation. Maybe even better, if doing it the hard way takes too much processing time, or the generator needs to be looked up on demand.

https://watabou.itch.io/medieval-fantasy-city-generator