15
Jan
08

slideTileTest150108

New FX.
This one is yet another slight variation on the theme of pixellation. In this permutation, the image ’tiles’ are moved around, either randomly, or based on the brightness of the pixel at the centre of each tile, yielding a surprisingly large range of glitchy effects.

slideTileTest150108 02slideTileTest150108 03
slideTileTest150108 04slideTileTest150108 07
slideTileTest150108 08slideTileTest150108 09

Here’s the CI Filter code:

/*
Inputs:
sampler Image: input image
sampler DisplaceImg: displacement image
vec2 Tile: X and Y tile size. Range, image width/height > 1.0
float Threshold: threshold value for Displacement image R and G color value below which image tile is moved. Range 0.0 > 1.0
float Randomise: Mix of noise and original image as displacement value. Rangle 0.0 > 1.0
*/

kernel vec4 tb_slideTile(sampler Image, sampler DisplaceImg, vec2 Tile, float Threshold, float Randomise)
{
// Current pixel pos. in pixels
vec2 xy = samplerCoord(Image);
// Dimensions of input image
vec2 dims = samplerSize(Image);
// Normalised pix coords
vec2 normCoord = xy / dims;

// Centre-point of current tile
vec2    tileCenter = (floor(normCoord / Tile) * Tile) + (0.5 * Tile);
// Displacement image pixel at center of current tile
vec4 displacePix = mix(unpremultiply(sample(Image, tileCenter * dims)), sample(DisplaceImg, tileCenter * dims), Randomise);

// Position of current pixel in current tile
vec2 tilePos = normCoord - (tileCenter - (0.5 * Tile));

// Calculte sample position based on R and G values of displacePix
vec2 samplePos = vec2(displacePix.r,displacePix.g);
// Clamp coords so they remain in screen bounds
samplePos = clamp(samplePos,vec2(0.0,0.0), vec2(1.0,1.0) - Tile);
// Increment coords to draw tile content
samplePos += tilePos;

// Coordinates to sample original input image
samplePos =    (displacePix.r < Threshold) ?
(displacePix.g < Threshold) ?
samplePos : normCoord
: normCoord;
// Denormalise sample coords
samplePos *= dims;

// Output
return sample(Image, samplePos);
}

5 Responses to “slideTileTest150108”


  1. 1 jean poole January 17, 2008 at 12:23 am

    some of those look really cool… still waiting on some upgrades to happen before i switch to leopard and then dive into Quartz learning finally… but your continued experiments and more abstract kinda FX keep me interested : ) keep it up ~! : )

  2. 2 toneburst January 17, 2008 at 8:13 am

    Cheers!
    I’m still just investigating the small snippets of code I’ve managed to work out. Variations on a theme, really, with the odd diversion ;)

    alx

  3. 3 Cat January 18, 2008 at 4:43 pm

    I’m loving the glitch!

  4. 4 toneburst January 18, 2008 at 7:13 pm

    Cheers!

    alx

  1. 1 SlideTile qcFX Uploaded « machines don’t care Pingback on May 9th, 2008 at 12:00 pm

Leave a Reply




 

January 2008
M T W T F S S
« Dec   Feb »
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

Links

Blog Stats

  • 24,716 hits