The last few posts have been about scripting GIMP. Let's put that scripting to use and create some soothing ocean water.
- Create a new image, and fill it with lightish blue.
- Add a new layer, and set its blend mode to 'addition'. Fill it with height-16 diagonal noise, and apply a Gaussian blur of 8x4 pixels with RLE set.
- Equalize your blurred noise, and apply a colour curve. You want the curve to look something like an inverted V, with a sharp point at the middle, fading to black on either extreme. This will hopefully give you a few disconnected sparkly pixels, and some rippling waves. (You may need to regenerate the noise a few times in order to get a sample that produces good results.)
- (Optional)Merge your visible layers, and set your image mode to indexed. Use an optimum eight-colour palette. Then turn your image mode back to RGB. Reducing the colour depth is a matter of personal taste. I do it because I want my tiles to have a distinct, sixteen-colors-per-8x8-tile look that you would get on SNES hardware. I use eight colours for the water because I will eventually need to create more tiles that allow me to seamlessly connect water tilse to other tile types. More on that later.
The procedure outlined can lead you to water nice enough looking to want to swim in:

Nice effect! Is the algorithm outlined above your own invention?
ReplyDeleteMore or less. The idea for the colour curve came from Perlin's slides on Perlin noise, where he said that taking the absolute value of noise leads to cusps that look good as waves. Other than that, it was just experimentation.
Delete