1
\$\begingroup\$

I want to create procedural paint splatters on textures. I want somewhat similar effect like in Splatoon 2.

I think I need to modify albedo image - drawing splatters there.

Right now I came up with drawing filled circles and processing them with gaussian blur. But it's far away from good looking splatter.

I want color of splatter to slightly change near the corners.

Also I will need to create the same image but for normal map, but I think it will be the same just with different colors (basically "repeat code with different colors"). I want splatter to have glossy-look like fresh paint.

Unfortunately I know almost zero useful algorithms that will help me with that.

My current level - I duckduckgoed (searched) algorithm for getting circle coordinates - here I draw those circles and then blur them out.

At first I thought it would be easy, but I stopped even at understanding how to draw a line (that's when I discovered Bresenham's line algorithm which helped me a lot).

I can't read math formulas so it will be much appreciated if there are algorithms with code examples (any language).

I also use 3 engines so I can test in one of the engines my approach with algorithms and then transfer it to another. Help with algorithms in gdscript/c++/c# is welcome!

P.S. I'm not looking for a ready-to-go solution like fully fletched library for such things or asset or something. I want to understand and learn.

Thanks!

\$\endgroup\$
7
  • 2
    \$\begingroup\$ How much area do you need to cover? If it's just a single object/surface then your idea of drawing into an albedo/normal texture directly should work. If you need to cover potentially every surface in an entire map — like in the case of Splatoon games (Or Portal 2 / Tag: the Power of Paint before them) then this will start to use an unsustainable amount of texture memory. Games like these instead store a lower resolution "coverage" map, and then in the shader they add fine pixel-scale blobby details to hide the much less granular underlying data. \$\endgroup\$
    – DMGregory
    Commented Jun 30, 2021 at 13:23
  • \$\begingroup\$ @DMGregory for starters I want to draw a splatter on let's take 300x300 RGBA image. \$\endgroup\$
    – idchlife
    Commented Jun 30, 2021 at 13:25
  • 1
    \$\begingroup\$ "I can't read math formulas so it will be much appreciated if there are algorithms with code examples (any language)." -> "I'm not looking for a ready-to-go solution like fully fletched library for such things or asset or something. I want to understand and learn." Yet it's either one or the other. You either intend to learn math and algorithms, or you don't and then you need a fully fledged module to do the work for you. Which is it? Unlikely to find solutions to do something this specific, IMO. Looks like a fairly advanced (set of) algorithm(s) that Splatoon uses for splatting. \$\endgroup\$
    – Engineer
    Commented Jun 30, 2021 at 16:45
  • 1
    \$\begingroup\$ Furthermore, even with the base algorithm, you'd need to map results to complex (non-planar) surfaces, unless you're willing to restrict your game to simpler environments than they do. \$\endgroup\$
    – Engineer
    Commented Jun 30, 2021 at 16:50
  • 1
    \$\begingroup\$ Are you open to solutions that don't shape the blobs from pure math, but instead composite pre-made spat textures together? I've gotten good results doing it that way, and it's easy to art direct by just swapping to a different set of splat textures. \$\endgroup\$
    – DMGregory
    Commented Jun 30, 2021 at 19:45

0

You must log in to answer this question.

Browse other questions tagged .