mike(and others who are interested aswell

) :
http://en.wikipedia.org/wiki/Cellular_automatashockie and taj: well, i've been doing some hobbie coding(in pascal

) for several years so i have LOADS of stuff laying around, for example my fully functional texture generator.. now, since i recently started dabbling with delphi which gives me access to virtually unlimited amounts of memory and a nice RAD i can have a tool like this up and running in a matter of hours.. except for the texgen since that damn interface with the million sliders and calls for buttons etc took ages to code and was oh so boring... and no, it isn't differential in the abs(buffer2-buffer1) sense.. try it out in photoshop and you will see the difference

wham: yeah i like that picture alot aswell, its a wonderful face to wake up next to in the morning.. provided i wake up first, she has horrible mood swings in the morning lol.. (better hope she dosnt catch me writing this.. haha)
ok, so i'll explain how it's done(i figured it wasnt neccessery at first, since i will be releasing the code, but since my code can be pretty rough to understand, here we go

)
basically, what it is is a simple water effect, you know the boring blurred ones where you see virtual drops creating wave interference on whatever background you choose. explained here:
http://freespace.virgin.net/hugo.elias/graphics/x_water.htmim too lazy to write up an explanation on Cellular Automation, check the link up there

but ok, so we have a grid of cells(in this case a 256x256 texture with pixels) in 2 buffers. the third buffer in my program = image1 = for show, to let us see what we are working with. that one is never modified.
so, let's see here, we have 2 buffers.. for each frame we modify them both, finally we add or subtract them together and wack em into buffer2(which we then render to screen), rinse and repeat..
here's the procedure my innerloop is using to render the 2 images:
Procedure ripples(multiplier:byte);
var x,y:word;
temp:single;
begin
for x:=0 to 255 do
for y:=0 to 255 do
begin
temp:=(buff1^[byte(x)+byte(y)shl 8] +
(((buff2^[byte(x+0)+byte(y-1)shl 8] +
buff2^[byte(x-1)+byte(y+0)shl 8] +
buff2^[byte(x+1)+byte(y+0)shl 8] +
buff2^[byte(x+0)+byte(y+1)shl 8]) /4)-
buff2^[byte(x+0)+byte(y+0)shl 8]) /2)*(multiplier/256);
if temp > 127 then temp := 127;
if temp < -127 then temp := -127;
buff1^[x+y shl 8]:=round(temp);
temp:=buff1^[x+y shl 8]+buff2^[x+y shl 8];
if temp > 127 then temp := 127;
if temp < -127 then temp := -127;
buff2^[x+y shl 8]:= round(temp);
end;
end;as you can see, we start by adding upp the center pixel of buffer1 with the top/left/right/bottom pixels of buffer2 and divide that by 4(basically what we have here is a standard blur, only exception is that we use data from 2 buffers). we then subtract the center pixel from buffer 2 and divide that result by 2 and finally we multiply it by a value ranging from around 0.80 to something closer to 2.0 or so. the reason why i use a division up there is to give it a range much easier to work with in the interface(0-255, even though i floor it at around 210 since anything below gives shitty results, ie a greyed out image).
then we do some range checking to make sure shit isnt over and/or underflowing and then we pop the result into buffer1. and finally we add the result of buffer1 and buffer2 together, perform some range checking here aswell and pop it into buffer2 which we then render to screen. even though i render both buffer1 and buffer2 the data in buffer2 is the final result, i just decided to re3nder buffer1 aswell only since it look cool when rendering..
now, the reason i use the temp float up there is because when i wrote this(modified more likely, sadly i dont remember who wrote the original so i cant give credit

) i was working in 16bits turbo pascal and didnt have access to large arrays of integers(256x256 for example) since real mode wont let me allocate chunks of memory larger than 65535 bytes, and thus i had to find a way to work around that, so i used an array of shorts instead and performed all my adds/subs/rangechecking in a single float variable(gg i made a pun, i win at wordgames

) and then wacked the final result into the buffers.
i hope that cleared most of it up, im not very good at writing tutorials and whatnot, especially not coding tutorials since im not 100% set in the lingo department, i mean come on, after all i AM a 2d artist lol.. anyways, if you need some further explanation just let me know.. and also, if you want some information on how i generate some of my textures in my texgen feel free to ask me in the DEMTEX thread.. or check out the quick tutorial i whipped up by request, after winning a texgen competition over at cgempire.com..
http://www.cgempire.com/forum/tutorials-101/tutorial-procedural-texture-generation-basics-1121.htmlfinally, thanks for your feedback, and for "completion" i'll give you an exe to play around with.. keep in mind that it isnt finished so it lack certain functionality, like saving bitmaps, the neat zoom i have in my texgen etc.. but i'll get it in there eventually..
