Vacation Thassos Greece 2009

•2013-01-07 • Leave a Comment
Advertisements

fractBG – perfect IFS genetic images

•2012-11-09 • Leave a Comment

get the app:
fractBG for iPad

150k particles (openCL+openGL)

•2011-04-15 • Leave a Comment

I played a little bit (first time) with OpenCL and Java bindings. I just love it. Now I can you Java for the “high-level” stuff and OpenCL for fast native code :-)

Sorry for the hangs, but my Macbook was busy with processing the particles and had a little left for recording…

Recorded demo movie:

Another recorded demo movie:

Images (screen shots):

– syphobia

curl noise for particles

•2011-04-12 • Leave a Comment

Almost every particle system needs some kind of noise added to the movement of particles.

Usual you just alter the velocity (add some weak force) to every particles every frame like this:

particle[i].force.x+=random(-0.1,0.1);
particle[i].force.y+=random(-0.1,0.1);

If you need a wild random wobble of particles without clustering and flows this is the way to go. But I want to act particles like driven from a fluid, with smoorh movement and clustering.

Recorded demo movie:

What you need is a 3d perlin noise class. I do not want to describe perlin noise here, as there is a lot of stuff the then net like (perlin noise).

Basic implementation of curl noise:

particle[i].force.x+=perlin(particle[i].x*scale, particle[i].y*scale,1.352+time);
particle[i].force.x+=perlin(particle[i].x*scale, particle[i].y*scale,12.814+time);

What happens is, we pick out a perlin noise (-1.0,1.0) from particle position with some scaling to give us a smooth transition. Note that for x and y I used a different z coordinate orherwise x and y would be the same. At last you add a time to alter the noise field over time.

– syphobia

procedural flares

•2011-04-11 • Leave a Comment

If you are using particle systems you always need different types of smoke, flares and other “cool” textures. As I am not going to draw something in Photoshop I want them the procedural way, as usual.

The process is very simple actually. First we create a new empty image to use it as a final texture or for saving it to the disk. After the image is created programmatically we are iterating each single pixel and evaluate a final color for it. Then we load it as texture or store it to disk.

Here is a simple example loop:

for(y=0;y<imageSize;y++)
{
	for(x=0;x<imageSize;x++)
	{
		//prepare the vector from center
		vx=(imageSize/2.0f)-(float)x;
		vy=(imageSize/2.0f)-(float)y;
		vector.set(vx,vy);

		//get distance
		distance=vector.length();

		//get flare intensity
		intensity=clamp(1.0-distance/imageSize,0.0,1.0);

		//add some noise
		noise=perlin(x,y);

		//prepare color
		color.set(intensity,intensity,intensity,intensity);
		color.clamp();

		//set pixel
		image.setPixel(x,y,color);
	}
}

You could add streaks with using the angle from center, etc… I create a class with a lot of parameters to setup. Here are some examples of the outcome:

– syphobia

useful mathematic curves

•2011-04-07 • Leave a Comment

If you do a lot of procedural stuff you need curves and functions all the time. Use them for procedural imaging, shaders, falloff, etc… Here is a short list of the most common functions I use:

squared

hard and fast falloff (light)

1/x2

log

useful for long range falloffs

1/log(x)

scatter

useful for in scattering and nice distance falloffs

1/(offset+factor·distance)power


smooth

transition from 0.0 to 1.0, non-linear, smooth start and end

x2·(3-2x)

interpolate

transition from a to b (input 0.0 – 1.0)

a+x·(b-a)

– syphobia

2d IFSs

•2011-04-06 • Leave a Comment

generated procedural art with iterated function systems and modifiers