I need an algorithm to paint clouds, or cloud like shapes. Obviously, I wouldn't want them all to be similar.
What should I use to generate the relevant series of X,Y coordinates to paint the clouds?
I am going to implement this either in SVG or Canvas
Clouds reflect colors and may include reds, mauves, yellows, grays. Concentrate on the shadows, which give the clouds shape. Suggested colors include alizarin crimson for pink tints; yellow ochre and cadmium orange for golds; Payne's gray or burnt sienna mixed with one of the blues used in the sky, for shadows.
It depends on exactly what kind of clouds you're going for. You can try Perlin noise which is quite popular with game developers.
You can use the SVG feTurbulence filter primitive to generate Perlin noise, which can be used to create cloud-like textures.
Some help and examples:
The Inkscape vector graphics editor also has a big collection of predefined svg filters, see here for an example using just a few of them on some text. The "noise fill" one is using feTurbulence, and is probably quite easy to tweak. Inkscape also has a GUI for tweaking the parameters of each filter, select any shape, then select "Filter > Filter Editor..." in the menus.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With