Adam Gyenes

Portfolio website


Stained glass generator

Going with the theme of gothic cathedrals, I decided to make one of my finals for my procedural material development class a stained glass material. Except, I added a twist where I wanted to make a fully procedural generator that takes just about any image as an input.

This is a difficult goal since the input image can be anything from a simple vector image composed of clearly detectable lines to a complex photograph.

After experimenting with various techniques for a while, I decided that Anisotropic Kuwahara Color was a good starting point that will simplify more complex images by preserving shapes within, but at the same time leave simpler images relatively unaffected.

The next step was to extract shapes from the image, which I spent a lot of time trying different methods on. After trying separating color channels, slope blurs and extracting slope angles from normals, I realized that more simplification was necessary. I discovered Reaction Diffusion, which was exactly what I needed.

I then colorized the result using the source image, and extracted shapes using Mask to Path, and combined all of them at the end.

I could use this to apply a “fragment” pattern characteristic to stained glass, as well as other effects for a more realistic look.

Final results

Substance Designer