Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I paint clouds?

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

like image 294
Itay Moav -Malimovka Avatar asked Jul 05 '10 03:07

Itay Moav -Malimovka


People also ask

What colors do you use to paint clouds?

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.


2 Answers

It depends on exactly what kind of clouds you're going for. You can try Perlin noise which is quite popular with game developers.

like image 162
amro Avatar answered Sep 17 '22 04:09

amro


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:

  • http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html#feTurbulence
  • http://commons.oreilly.com/wiki/index.php/SVG_Essentials/Filters
  • http://pilatinfo.org/english/filters/index.htm

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.

like image 32
Erik Dahlström Avatar answered Sep 20 '22 04:09

Erik Dahlström