Rorschach ink blot (aka Psychology test pictures) shader

(source: bonnefil.com)

I want this magnificent pattern to be in my game. So far I have figured out...

1. Draw one side, then render it twice left and right.
2. How do I render this pattern on one side? hmm...
3. I need help.

I need some insight on writing shader for this.

If you think is not shader fitting task, then let me know, hopefully with an alternative solution!

However I see no possible approach to achieve this without gpu. (unless you suggest to store bunch of prepared pictures of rorscach pic)

• What engine/language/framework are you using? – akaltar Jun 22 '15 at 13:18
• @akaltar Unity Shaderlab – Blue Bug Jun 22 '15 at 14:55

To get that authentic inky look, your best bet is probably to assemble a library of images of ink splats, streaks, and dribbles.

Then you can randomly select some number of them to position & rotate randomly over one-half the image. (With a bias toward the seam edge so the middle of the Rorschach test is densest. You might be able to use a particle system to do this scattering)

Render that to a texture with wrap-mode set to mirror, and now you have a symmetrical ink blot you can display without any custom shaders.

Here's an example of the kind of result you can get doing it this way:

If you don't care about those signature inky shapes, you can also do this with a shader that thresholds two noise patterns scrolling past each other. That gets a symmetrical irregular shape, which can be made to change continuously over time if you like, but it won't look quite like ink.

This is the method that dnk drone.vs.drones suggests in another answer, and it can give results similar to this:

Edit: here's a breakdown of how the noise-based approach works...

First we start with some noise. 1/f noise, often called turbulence, works pretty well. You can bake tiling noise into a texture and then sum one or more samples from it, changing their offsets/rotations to vary the shapes you get.

If we threshold this directly, we get an image like the one at the right. The shapes are about correct, but to look like a Rorschach test it should be densest near the middle and thin out toward the edges.

We can make this work by adding a gradient over top (contrast exaggerated here for clarity)

Then threshold it by taking (sum - blackLevel) * contrast

(Here blackLevel is a parameter that controls how speckly vs blobby the result is - higher values mean more solid black - and contrast controls how sharp the edges are)

Mirroring this image will give you the Rorschach example above.

• I am trying to achieve through drones methods. Could you be able to elaborate how its done? I am using traditional perlin noise function but mine looks like rather collection of random dots. – Blue Bug Jun 23 '15 at 0:39
• @BlueBug, I've added a step-by-step breakdown above. – DMGregory Jun 23 '15 at 1:24

You can try perlin noise (using a proper black/white gradient) , and then apply the right/left mirroring

• Is that perlin noise? That looks drastically different from the traditional perlin noise. Wow that does look fatastically alike "cloudy ink" just like the one in the movie Watchmen. – Blue Bug Jun 22 '15 at 14:58
• It all depends on your transfer function from noise value -> pixel value. It looks like there is quite a small window level here which results in the stark contrast between black and white with a small amount of soft edges – MistaGiggles Jun 22 '15 at 15:43
• Yeah just do a high pass filter somewhere around the grey then blow the highs out (ie multiply by a large number and scalp the top off at 255 or whatever max pixel value is) – Shayne Apr 13 '16 at 11:19