hpdz.net

High-Precision Deep Zoom

Technical Info - Camera Tilt

Quaternion slerp interpolation is now working. This is way too complicated to explain in detail at the moment. More will come later. Plus, HTML doesn't provide sufficiently complex formatting to allow the necessary equations to be written in a way that is pleasing to look at. Options for dealing with this are being explored. Mathematica may be the way to go. We'll see. It may take some time.

This whole 3D movement thing has been an interesting exercise. I've been familiar with some of the elements since graduate school long ago, but applying those abstract ideas to a concrete problem like this required some additional learning. I have to say that most of the internet resources and even the two printed books I chose to buy were confusing, inaccurate, or terribly oversimplified in some crucial respects. When I have time, I'll write a good explanation of how this works so that others can quickly learn how to do this.

This project now has four different video files, so read on below.

Note: All MP4 videos on this page were encoded with FastStart.

Slerp Demos

This is a series of six demonstrations of quaternion slerp interpolation. The final segment of this video is very nice, but you first have to watch some simple tests of more basic rotational movements I made to isolate bugs.

The first very short animation is the first thing that came out of the software using slerp. It's just a quick 90-degree rotation around the X-axis, pitching up from looking straight down to looking at the horizon.

The next three segments are 180-degree rotations around the three pimary axes.

Then comes a repeat of the second short animation in TiltTest2, below, which started looking north and ended looking east. Interpolating the Euler angles that describe these orientations (at least in the ZYX convention) produces weird results. This shows what should happen.

Next, the same maneuver of "look north, then move to looking east" is performed, but the perspective adjusted a bit so we're looking down slightly. The coloring is also prettier.

Finally, this file has a cool animation showing a complex series of movements and camera angle changes is presented, rendered in 1000x500 resolution. This isn't a particularly stunning animation but it shows the creative potential of having this kind of control of the camera orientation.

This file is 1000 x 500 2 Mbps peak 1 Mpbs average encoding.

SlerpTest.mp4 16 MB

 

Distance Estimator Fly Over

This is another flyover of the western antenna, but this time rendered with the distance estimator method. I like the way the DE gives nice gradients within those gorgeous curved outlines, and I think this flyover is much better with the camera angle than the earlier one in TiltTest1 below.

To give a sense of orientation about what this animation is showing, there's a series of three progressively magnified views of the Mandelbrot set. The first shows the entire set. The spike at the left is what this video flies over. The second picture shows this spike closer up, about 10X magnified. The final image shows this spike at the same magnification as the video does, but looking straight down on it, rather than flying over it at a pitched attitude looking at the horizon. The video flies in from the west looking east (or from the left, looking toward the right, of the images here).

DEFlyBy1 DEFlyBy3 DEFlyBy2

DEFlyBy.mp4 8 MB High quality version: DeFlyBy-HQ.mp4 31MB

The curious effect at the end, where it seems like liftoff from a world, where the horizon seems to curve, is an artifact of the colorizing. Look at the first picture above and you'll see what creates the curved horizon effect in the video, where the purple and black interface. This particular animation doesn't visualize the horizon at all.

Early Tests

First Set - Fixed Camera Orientation

First, the earliest first tests with a fixed camera orientation (just a series of fly-by examples). These are mostly 320x240 tests, but they're encoded at 800x600 because one segment is encoded at that resolution. Plus the annotation text looks better at a higher resolution.

That final 800x600, 40-second test, by the way, is really nice. It's a flyover along the western antenna of the Mandelbrot set, and it's worth downloading the file just to see it.

TiltTest1.mp4 30 MB

These are literally the very first animations my software generated with this technique, and not all the bugs had been worked out.

Second Set of Tests - Euler Angle Interpolation

The next video has two very quick examples of animated camera orientation, just using interpolation in the Euler angles, which is not the best way to do this.

The first animation in this file is just moving the orientation up, to look toward the horizon northward. This kind of motion, just rotation around one of the principal axes, works fine with simple Euler angle interpolation.

The second example in this video was specifically chosen to demonstrate how bad Euler angle interpolation can be. The camera starts pointing "north" with the horizon in sight, and ends pointing "east" with the horizon at the same angle, but interpolation of the Euler angles gives a bizarre motion arcing upwards, rather than a simple swinging around with the horizon at the same angle throughout.

TiltTest2.mp4 4.1 MB

In terms of the Euler angle convention I am using (the ZYX convention), this starts at (90,0,0) [pointing north with no roll and no yaw] and ends at (0,90,90) [rotated 90 degrees around Y, then rolled 90 degrees to level the horizon]. Interpolating the Euler angles will obviously pass through (45,45,45), which is tilted down, and not at all what we are looking for. Quaternion spherlical linear interpolation (slerp) solves this problem by projecting the orientations into a better space for describing them and performing the interpolation on the surface of a hypersphere in that 4-D space.

In the more traditional ZXZ set of Euler angles, this particular motion would not be a problem. This would start as (0,90,0) and end as (0,90,90). But other motions would be a problem.