Rabu, 25 Maret 2009

Animating a Butterfly

. Rabu, 25 Maret 2009


Movie link Project sit Project zip

---Creating the Butterfly in Photoshop---


At this season in Paris there are no butterflies and I wanted my butterfly in red so I needed to ask the permission to use an existing picture.

It comes from Liang-Wu Cai , he took this wonderful butterfly picture at Great Meadows National Wildlife Refuge, Concord, MA. in August 2, 1997" .
The link to his page is here :http://web.mit.edu/cai/www/jpg/closeup/butterfly.html

In Photoshop I used a rulers guide, (blue vertical line)
that will make up the axis of symmetry (left-right)
and will serve later as reference to spread out a little bit the wings of butterfly as I had separate them from the body.

After erasing the background, I've created 3 layers which holds separately: body, left wing, right wing.

As you see on screen shots on the right, wings were spread out with rubber stamp to "stick" to the blue line of symmetry.


---Importing the Butterfly into After Effects---

In After Effects, import "butterfy.psd" file as "Composition" (see right screen shot)


After the import, we end up in Project window
(see screen shot above), with a folder with 3 stills related to 3 layers in Photoshop file and new After Effects composition that holds already these 3 layers in time line (see screen shot below.)



---Setting Up the Butterfly Comp---

Go to the composition settings (see screen shot to the right) and make more room for the butterfly , let's say: 600 x 400 pixels (for flying butterfly needs more space ) and make the duration of composition to 1 second (we will see after how to expand the "life" of butterfly to ANY duration we need)



In timeline (see screen shot below) make all 3 layers "3D" clicking in 3D box column, also check high quality display.




shutter angle = 0 = no motion blur at all
Go again to the composition settings and choose "Advanced" tab (see screen shot below) . In rendering Plug-in choose "Advanced 3D" and specify 360 for "shutter angle" as we want high motion blur


shutter angle = 360 = highest motion blur

---Setting Up the Butterfly Wings Anchor Point---

As we are going to rotate wings in space to make them fly, we need to shift their anchor points toward the axis of symmetry. In After Effects we can use "rulers guides" (thanks Adobe). Select left wing layer in time line. Using "Pan behind Y" tool (see screen shot), move it with mouse towards "center of gravity". Redo the same for right wing. Now we are ready to animate the butterfly


Before

After

---Animating the Butterfly Wings---

We are going to rotate butterfly wings in 3D space along Y (green arrow) axis so the better view to work with is Top view.
Enable Y-axis key-frames in timeline for wings. We need only 3 key frames during 1 second. See screen shots below.


WINGS KEY FRAMES for Y-rotation
at time code 00:00 and 00:24
WINGS KEY FRAMES for Y-rotation
at time code 00:12


As wings overlap the body, we need to shift body position in Z direction about 10 pixels (see blue highlights on screen shot below).Enable motion blur and make preview in custom view. Butterfly flies already, sure in place, we are going to let it fly using trajectories and the camera in the next step. We could also animate the body by rotating it in X or Z axis.




---Looping the Butterfly in Time---


Now we have a flying butterfly during 1 second and we will use it in the new composition during let's say 15 seconds.
There is a trick to loop a composition (thanks to Dan Ebberts here at COW forum) :

Pre-comp the comp you want to loop into a new comp that is long enough to hold all the loops you want. Enable time remapping for the new comp. Type "rr" to reveal the keyframes. Set a keyframe at the last frame of the loop. Delete the keyframe at the end of the comp. You should now have keyframes at the start of the loop and the end of the loop. Enter this expression in the time-remapping property:

loop_out("cycle",0)

That should do it.

If you use the method I described, you'll lose the first frame of your loop after it plays through once. If that's important, you need to add one more keyframe after the one at the end of the loop and set its value to zero. loop_out("cycle",0) behaves better if the last keyframe is identical to the first one.

I've found a work around to this solution: (see the screen shot below), I don't have 100% of speed but I'm close to it and I manage with 2 key frames. From now, I've created a new composition with duration of 15 seconds and thanks to expressions I could layout the 1 second butterfly animation to any length, simply by dragging its right handle in timeline.




Explanation: loop_out("cycle",0)


In order to understand what really does loop_out("cycle",0) I'll try to explain it here: If we convert an expression to key frames we will see periodical "use" of frames from 1 second composition within "outlasting" composition.







---Animate the Butterfly in 3D Space and in Time---


From now there are 100,000 possibilities to animate the butterfly comp within After Effects 3D space. Here, I've just added a camera without animating it, instead I've animated position and rotations of butterfly. Butterfly flies with the constant speed defined in its composition of 1 second.



For more fun, I've duplicated previous "comp1" of duration 15 seconds into "comp1*" for which I've extended duration to 25 seconds, so I was able to do some time remapping. In "comp1*" I could speed up or slow down the butterfly in order to achieve another result.



0 komentar:

 
Namablogkamu is proudly powered by Blogger.com | Template by o-om.com | Power by blogtemplate4u.com