Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
mpowers

Cut up photo mosaic Quickly

Tue Jun 16, 2009 10:48 am

This is a quick way to cut up a photo mosaic into an image sequence:

1. Place the large image a comp that is the size of the tiles you want to cutup.
2. The comp should be this many frames in length: (thisLayer.width/thisComp.width)*(thisLayer.height/thisComp.height).
2. Add the expression below to the image's anchorPoint.
3. Render out an image sequence.

xTile = thisComp.width; 
yTile = thisComp.height;
xCompsize = thisLayer.width;
yCompsize = thisLayer.height;
numXpicts = Math.floor(xCompsize/xTile);
numYpicts = Math.floor(yCompsize/yTile);
f = timeToFrames(t = time + thisComp.displayStartTime, fps = 1.0 / thisComp.frameDuration, isDuration = false);
xLine = (f%numXpicts)+1;
yLine = Math.floor(f/numYpicts)+1;
x2 =(xTile*xLine)-(xTile *0.5);
y2 = (yTile*yLine)-(yTile*0.5);
transform.anchorPoint = [x2,y2];


I just got a photo mosaic without the source photos...so I thought if this ever befalls any of you, this could save some annoyance.
 
Yenaphe
Posts: 84
Joined: Tue Feb 03, 2009 6:30 pm
Location: Paris - France
Contact:

Re: Cut up photo mosaic Quickly

Wed Jun 17, 2009 3:58 pm

Nice, thanks for sharing this.

Who is online

Users browsing this forum: No registered users and 1 guest