Thursday, March 14, 2013

Walk cycle loop speed tied to layer position



This is an experiment, not super polished but it seems to work. A looped walk cycle's speed is controlled by the a layer's position so that the legs move at the right speed to more or less match the speed of the character's movement (in my bad example above the feet slide a bit but you get the general idea)

I bodged it from a couple of expressions (including the 'Wheel' from in the superb Duik IK and animation script tools,) so it includes some 360° rotation stuff even tho nothing is rotating! :-S I think this might be somewhat redundant but it works and I can't think how to optimise it right now.

The "stridelength" is the length, in pixels, of the walk cycle's stride; you have to just manually measure it somehow until i think of a cleverer way. ?!

walkcyclepos = thisLayer.toWorld(thisLayer.anchorPoint); // the position of the walk cycle layer
stridelength = 110; // the length in pixels of the walkcycle's stride
wheel = -(value + radiansToDegrees(walkcyclepos[0]/stridelength))%360*-1; // i took most of this from an expression to tie rotation to position, and then connected the rotation to time remap. :-S
if (wheel < 0) wheel += 359;
framesToTime(wheel)


A smoother and higher frame rate walkcycle would be better for testing this but I just downloaded some random Muybridge gif.

I guess the higher the frame rate of the walk cycle, the less sliding there would be. At low speeds there'd always be some of course. When i actually try and do something with this I'll probably somehow posterize the time of the position animation and maybe the timeremapping too? that might help. or make it worse. Anyway this is going to be most useful for deliberately rough collagey animation so probably doesn't matter too much :)

Wednesday, October 03, 2012

AE drop shadows that stay the right way up

I googled it and found an amusingly simple tutorial on youtube which i didn't even have to watch. As it says in the description:

"Check it out. Or you can just put the expression "value-transform.rotation" in the direction property of your drop shadow effect and save yourself the bother of watching the video. Up to you!"

http://www.youtube.com/watch?v=WRBrTJ2xCQU

Tuesday, September 11, 2012

Orient 3D layer to camera properly

Auto-Orient 3D layers towards the camera in After Effects doesn't really work properly since they point towards the camera object itself rather than being parallel to the camera plane, so they can still look like they're at an angle. I found this expression, (like nearly all expressions, it's by Dan Ebberts) to do it properly. Put it on the Orientation of a 3d layer:
 



L = thisComp.layer("Camera 1");
u = fromWorldVec(L.toWorldVec([1,0,0]));
v = fromWorldVec(L.toWorldVec([0,1,0]));
w = normalize(fromWorldVec(L.toWorldVec([0,0,1])));

sinb = clamp(w[0],-1,1);
b = Math.asin(sinb);
cosb = Math.cos(b);
if (Math.abs(cosb) > .0005){
 c = -Math.atan2(v[0],u[0]);
 a = -Math.atan2(w[1],w[2]);
}else{
 a = (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]);
 c = 0;
}
[radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]

Found at: http://forums.creativecow.net/thread/227/21917#21917

Monday, September 03, 2012

YouTube playlist of my animation/shorts

I just made a playlist of my animated shorts/music videos/films because they were kind of lost amongst the endless youtube poops, impromptu technique experiments and footage of live noise shows that makes up the rest of my channel. Mostly really old, hopefully some new work in the not too distant future tho:



http://www.youtube.com/playlist?list=PL8CB4627688BDCD7D&feature=plcp

BONUS: I found some old disks at the weekend and uploaded some random outtakes and early animation test fragments from my 2000 film 'Remarkably Bold Venture of the Rabbit':