Making a butterfly.
Posted: August 26th, 2007, 4:25 pm
I've posted this on the AE forum over at Adobe, but I'd love to see what you guys can come up with (though many of us are regulars over there already).
This one suddenly got a lot more difficult than I thought. I'm animating a butterfly's wings. So, I used a cosine function to drive the flapping, and attached it to two expression controls to keyframe both amplitude and frequency.
(Math.cos(time*comp("Comp 1").layer("B_Controls").effect("Flap_Freq")("Slider")*6)*comp("Comp 1").layer("B_Controls").effect("Flap_Amount")("Slider")/2
Actually, this is part of a more complicated expression which has two additional controls to allow me to ease out of the pre-programed flapping and begin controlling the wings directly with the master Fold_Wings slider. However, the second portion works fine.
(Math.cos(time*comp("Comp 1").layer("B_Controls").effect("Flap_Freq")("Slider")*6)*comp("Comp 1").layer("B_Controls").effect("Flap_Amount")("Slider")/2+comp("Comp 1").layer("B_Controls").effect("Flap_Amount")("Slider")/2)*comp("Comp 1").layer("B_Controls").effect("Flap Permit")("Slider")+18+comp("Comp 1").layer("B_Controls").effect("Fold_Wings")("Slider")+random(.5)
Unfortunately, the first portion was never meant to be so easy. Changing the frequency does indeed make the wings move faster or slower, but because it's picking a value for the position of the wings based on a completely new sine curve, the period where the frequency value is changing is an incomprehensible blur of wings.
If anyone can help me modify the original expression, I would be extremely grateful.
This one suddenly got a lot more difficult than I thought. I'm animating a butterfly's wings. So, I used a cosine function to drive the flapping, and attached it to two expression controls to keyframe both amplitude and frequency.
(Math.cos(time*comp("Comp 1").layer("B_Controls").effect("Flap_Freq")("Slider")*6)*comp("Comp 1").layer("B_Controls").effect("Flap_Amount")("Slider")/2
Actually, this is part of a more complicated expression which has two additional controls to allow me to ease out of the pre-programed flapping and begin controlling the wings directly with the master Fold_Wings slider. However, the second portion works fine.
(Math.cos(time*comp("Comp 1").layer("B_Controls").effect("Flap_Freq")("Slider")*6)*comp("Comp 1").layer("B_Controls").effect("Flap_Amount")("Slider")/2+comp("Comp 1").layer("B_Controls").effect("Flap_Amount")("Slider")/2)*comp("Comp 1").layer("B_Controls").effect("Flap Permit")("Slider")+18+comp("Comp 1").layer("B_Controls").effect("Fold_Wings")("Slider")+random(.5)
Unfortunately, the first portion was never meant to be so easy. Changing the frequency does indeed make the wings move faster or slower, but because it's picking a value for the position of the wings based on a completely new sine curve, the period where the frequency value is changing is an incomprehensible blur of wings.
If anyone can help me modify the original expression, I would be extremely grateful.