Endless or impossible long zoom

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
slowtiger
Posts: 6245
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Endless or impossible long zoom

Post by slowtiger »

I stumbled over http://zoomquilt2.madmindworx.com/zoomquilt2.swf again these days and immediately thought: how would I do that in AS? So I reverse engineered that thing and had some fun to work out the specifications. Here's what I did.

The whole thing is done with a number of bitmap images, each containing a smaller version of the following one. I made a template (in TVP, but you could use any other bitmal program) so I could exactly select the part of the image which got enlarged by 200% to form the next image: http://www.slowtiger.de/examples/zoom_template.png. Here's a sequence of 12 drawings so you get the idea:

Image

Import these drawings into AS. Now we need to scale them. I decided against animating each image layer separately. Instead I put a number of them into a group because I think it's easier to manipulate one item (the group) in the timeline than lots of separate images. Here's the setup:

Image

In this example there are 9 image layers in 1 group. See the blue square for stacking order and the size of each layer. The largest layer lies on bottom, the smallest one on top - of course. I didn't include smaller scaling values than 0.0625 here because then I'd had to use rounded numbers, which eventually add up and cause visible mistakes.

Now see the timeline (yellow line). I created a key for the group's scale every second which gives the final zoom a nice useful speed (and is easy to set up), but you could use any other interval. The group contains 9 layers, so I had to create 9 keys. In the second frame the bottom layer will fill the frame, which is enlarged 16 times, so I scale the group layer to 1/16 then (which is 0.0625).

All keys are set to smooth. I think the result still isn't really smooth over the whole zoom, but this was the best result I could get. Linear interpolation was horrible. Also it doesn't work at all to have just two keys at beginning and end. I run into this problem every time I want to have a smooth zoom with the scaling tool, if anyone has a better solution I'd much appreciate it.

Once I set up a group like this, it's easier to duplicate it, then go into each image layer and swap the image. (One day I'd like to be able to automate this ... could this possibly be scripted?) I'll eventually end up with several groups, each group having the first and last images identical to the preceding and following group - like this:

- group 1
- - image 1
- - image 2
- - image 3
- - image 4
- - image 5
- - image 6
- - image 7
- - image 8
- - image 9

- group 2
- - image 9
- - image 10
- - image 11
- - image 12
...

Groups are set up, keys are correct - now I arrange the groups in time. The green timeline shows how the groups overlap: key 8 of group 1 and key 2 of group 2 align. The red rectangle at frame # 144 is the point where I switch visibility - here both groups contain the same image. You'll notice that there's a scale key afte that point. This serves two purposes: first, if I don't create another key after that on #144, the zoom movement will have a visible break here. Second, creating that overlap gives me the chance to work with a dissolve instead of a visibility switch. (The same goes for the two keys at start of that group layer timeline.)

The group stacking below shows the setup for a zoom in. For a zoom out you have to reverse everything, or just use this setup and reverse the resulting video file in your video editor.

So how does it look like? This was just a hastily done test:
http://www.slowtiger.de/examples/zoom_in1c.mov (5,5 MB)

Points of possible improvement:
You could paint the images in any sequence, either starting with the zoomed-in end, then scale down each image to 50% and paste it into the center of the next one - that's the way I worked in the coloured video. Or you could start with the zoomed-out end, far away from where you want to end, scaling each image to 200% - that's the way I used in the b/w sketches on top. In a final version I'd work back and forth eventually to make the borders really invisible.

The template has the center of image clearly marked. As you'll note in the b/w sketches, I didn't care to place my skyline to the vertical middle close enough, so I ended in mid-air and had to invent a balloon. But the TV tower was placed close enough to the center and worked nicely.

I didn't include any more visibility switch tricks, but used them already. Each image and group wich was out of sight I switched off, which drastically reduces rendering time.

Of course you could create the images in AS itself, exporting an image, then re-importing and scaling it and work from there.

Why not do the whole thing in vectors only? Besides this being a decision of style, it's just that with a pure vector setup you'll run into trouble with line widths soon.

What I really want to do with this in the end is to replace some or all image layers with quicktime loops, so there's quite some stuff moving everywhere. Should be a very impressing scene when it hits the big screen!

And don't start to experiment with this if you have other more important things to do! You'll end up like me, wasting hours with this!
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

I did an old animation based on same concept (frame inside a frame) and with vectors I ended up quickly with the limits of number accuracy.
See it here:
http://www.youtube.com/watch?v=Yw_7iIwCNr0
Oh dear, the quality of the video!...
-G
User avatar
uddhava
Posts: 318
Joined: Tue Nov 04, 2008 7:24 pm
Location: American back in Hungary

Post by uddhava »

Nice technique and animation example. And a nice explanation. Maybe I would experiment with this. It would be nice to use.

Drawing without vectors how do you get the drawings to fit together nicely?

udd
User avatar
slowtiger
Posts: 6245
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

That's why I don't do it in vector - I found it not being accurate enough. But it all depends on what you're doing - a very fast zoom will work even with sloppy drawngs, a very slow one must be very precisely drawn and set up.
User avatar
Mikdog
Posts: 1901
Joined: Tue Jul 05, 2005 3:51 pm
Location: South Africa
Contact:

Post by Mikdog »

COol.

If you zoom in to that quilt thing, you can see every time the picture changes, the resolution in pixels change, every two seconds or so. I zoomed in way in with the right-click flash 'zoom in' option. Pretty cool that thing.
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Freaky, cool like some kind of Dali/Bosch nightmare.
You'll forgive me if I use this technique sometime eh Slowtiger?
User avatar
slowtiger
Posts: 6245
Joined: Thu Feb 16, 2006 6:53 pm
Location: Berlin, Germany
Contact:

Post by slowtiger »

That's why I posted it - by all means use it!
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

:D
Post Reply