ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Hair overshoot for a character

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Zoltán Riskó
Hair overshoot for a character
on Sep 13, 2017 at 7:32:02 pm

Hey guys,

I would like to add an overshoot effects for my character's hair by expression. I found Dan's awesome keyframe overshoot script which is awesome but i would like to modify it a little bit.

Here is my result now, but not perfect:
https://1drv.ms/f/s!AlEKHWwr-X-pgc9wK17TctDux98GAw

Now the hair has 3 puppet pins which are linked to 3 null objects. The null objects have a hierarchy by code so i need to move the parent only.
But i can only achive the overshoot if ad keyframes to the second and the third null objects too but i want to avoid it.

Is there any trick to add a parent or something like that to the code so i don't need to add keyframes to the second and third null object but achive an overshoot effect?

For example: ( sorry I'm not too good with expressions :P )

freq =thisComp.layer("Settings").effect("Freq")("Slider");
decay = thisComp.layer("Settings").effect("Decay")("Slider");
myparent=thisComp.layer("1").transform.position;

n = 0;
if (myparent.numKeys > 0){
n = myparent.nearestKey(time).index;
if (key(n).time > time) n--;
}
if (n > 0){
t = time - key(n).time;
amp = velocityAtTime(key(n).time - 0.01);
w = freq*Math.PI*2;
thisComp.layer("1").transform.position + value + 15*(amp*(Math.sin(t*w)/Math.exp(decay*t)/w));
}else
thisComp.layer("1").transform.position+value


Thanks guys (and sorry for my english )


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]