How to pan along a curve at linear speed?

Comments

johnmeyer wrote on 8/23/2013, 10:36 AM
The track motion X/Y approach is very solid. Just make sure that all zooming is done in pan/crop, since zooming stills using track motion degrades the image. [edit]Actually, I'm not sure that this approach can work since, for this map, you have to zoom in.[/end_edit]

BTW, much of this was discussed seven years ago, and I actually DID write a script to address the problem. However, in that case the person wanted control over the movement acceleration, rather than constant speed. You might get a few more ideas by skimming these old threads:

Keyframe Interpolation problem

Keyframe acceleration script

Keyframe smoothness NOT only spatial

The last link proves that Rory is right: the keyframe interpolation always worked this way, at least since the time that the smoothness setting was added.
TheHappyFriar wrote on 8/23/2013, 11:23 AM
I think I've requested biezer curve support for all keyframe supported stuff since Vegas 6. :) They're going that way with the newer UI, but for these old features I'd imagine it's taking more work.

A useful script would be one that has a UI, one that lets you "draw" how you want the motion to be and it automatically applies the keyframes. It could be a plugin (better idea) so it could be applied to anything that accepts plugins (tracks, events, project, etc). Wonder how hard that would be to code. :?
NickHope wrote on 8/23/2013, 12:42 PM
The map in the first post is at 20% scale. The pale rectangular viewports are really 1920x1080px. So actually the Rory method is difficult anyway because I can't explicitly define that 1920x1080 viewport like I can in event pan/crop. In track motion it can only really be approximated. I tried a modified version of Rory's method whereby the zooming is done in event pan/crop but can't get that to work.

As discussed in those old threads that John linked to, there's clearly a serious issue here with the smoothness setting, and it's impossible to do any accurate movement along a curve unless smoothness is changed to stop interfering with the temporal smoothing. Ideally it would be nice to be able to draw a path that you'd like motion to travel along.

Here's a more detailed account of how I did it the long way via Adobe Illustrator:

1. Place the map in Illustrator (I used CS3) and snap it to an artboard of matching size.
2. Draw a smooth path from start to end with the pen tool (in this case just 2 points with tangents dragged to suit). Give it a thin stroke.
3. Calculate the number of frames for the full motion (in my case 14secs*25fps = 350). Let this be "x".
4. Decide a keyframe increment (gap between keyframes) you can get away with while retaining smoothness. I chose 5. Let this be "y".
5. Select path > Filter > Distort > Zig Zag > Size=0 > Points=Corner > Ridges per segment = x/y. In my case 70. If it's over 100 you'll have to choose a higher keyframe increment.
6. Delete alternate segments of the "smooth zigzag" with Illustrator's white arrow tool (easiest if you select View > Outline).
7. Export a png file. I did this with File > "Save for web and devices" so it was easy to make the output resolution match the original file.
8. Temporarily replace the original map in Vegas.
9. Open event pan/crop and make sure "Sync Cursor" is selected.
10. Size the viewport for the first keyframe and align it over the start of the first "dash" of the dashed path.
11. Move along the timeline 5 frames with 5 presses of the right arrow key.
12. Visually position viewport over the end of the first dash.
13. Repeat all the way along the spline. Can skip keyframes for straightish sections of the path.
14. Replace media or copy>paste event attributes onto the original media.

I left all keyframes as "linear" with smoothness 0. I suppose you could experiment by adding some smoothness but it would probably do the opposite of smoothing.

It's obviously a long-winded approach but it wasn't that painful.

If you haven't got Illustrator I expect you could construct the dashed spline with a CAD program such as DraftSight (excellent and free AutoCAD imitator).

Here's the map with the dashed spline (reduced to 20% scale):

Gary James wrote on 8/23/2013, 2:39 PM
I took the above map, imported it into BluffTitler, added the letter "x", then laid out the "x" position over the dashed lines on the map. I added 6 keyframes from start to end then selected an Overhauser Spline track. Total time about 10 minutes.

Note that the first 3 keyframes are closer together than the last 3. So the movement is slightly faster at the first half of the curve travel than the second half.


NickHope wrote on 8/24/2013, 12:22 AM
Thanks Gary. The ironic thing is that I have a Bluff Titler licence. In fact I've had it for years but never really used it. It didn't even cross my mind for this job.

Actually the desired result is a "zoomed in viewport" panning across the map, as per the pale rectangles in the first post. Do you think Bluff Titler would be able to do that, as opposed to superimposing moving stuff on a stationary map?
Gary James wrote on 8/24/2013, 12:35 PM
I'm not exactly clear on what the difference is, could you give some examples of what you mean? BluffTitler can move objects on screen with Panning as I did with the letter "x". But it also has a very powerful "Camera" feature. For complex 3D rotations all you need to do is "fly" the camera around the target objects, instead of rotating and adjusting them. Objects have a position in virtual space, so you simply move and point the camera around in that space.

Here's an example of a BluffTitler intro I did for a movie trivia game DVD that a buddy of mine and I put together. The 3D viewpoint was done by flying the camera around the text by establishing several keyframes in the flight. Curve smoothing was added to the track, and the results are pretty impressive for a program that costs less than $30. ( I did this in an early version that was $29.95 )


NickHope wrote on 8/24/2013, 11:31 PM
Gary this is what I mean. This was visually aligned to the dashed curve every 5-10 keyframes as detailed above.

It sounds like BlueTitler could probably do it, if it's possible to specify a 2D curve for the camera to move along.

[url=