enter image description here

enter image description here enter image description here
(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)

  • \$\begingroup\$ What engine/language/framework are you using? \$\endgroup\$ – akaltar Jun 22 '15 at 13:18
  • \$\begingroup\$ @akaltar Unity Shaderlab \$\endgroup\$ – 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:

Inkblot assembled from library of splat images

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:

Inkblot thresholded from noise

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.

Turbulence Thresholded

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)

Edge mask Mask added to noise

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.

  • \$\begingroup\$ 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. \$\endgroup\$ – Blue Bug Jun 23 '15 at 0:39
  • \$\begingroup\$ @BlueBug, I've added a step-by-step breakdown above. \$\endgroup\$ – 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

enter image description here

  • \$\begingroup\$ 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. \$\endgroup\$ – Blue Bug Jun 22 '15 at 14:58
  • 2
    \$\begingroup\$ 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 \$\endgroup\$ – MistaGiggles Jun 22 '15 at 15:43
  • \$\begingroup\$ 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) \$\endgroup\$ – Shayne Apr 13 '16 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.