ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

360 Panoramic Loop

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Aaron Wiesen360 Panoramic Loop
by on Dec 9, 2016 at 9:21:09 pm

First off, I should clarify that I've already done what was needed for this particular project; but I'm pretty certain I did this the "wrong" way - and that I might be able to save myself some future headaches by learning a better method now. I'll also go ahead and preface that I'm well outside my typical After Effects depth here, as I think expressions are just about a requisite for what I'm trying to do.
--- --- --- --- ---
Here's the goal:
-- I have a full, 360-degree view image that I've stitched together using Photomerge in Photoshop. (If you were to bend the image into a cylinder, it is seamless. No top or bottom though.)
-- I want to create a video panning (horizontally) across the entire seamless image that can be looped (so that I can shorten/extend the final duration to whatever might be necessary).

Just a big, old, never-ending pan.

Basically, I figure something should exist out there that makes this image into a seamless, curved cylinder. Then there should probably be a (relatively) simple expression that just allows me to keep panning left/right indefinitely at a given rate of speed. If you know how to do this, skip the rest of this post - it's kind of long.
--- --- --- --- ---
So, here's what I actually wound up doing:
-- Pull image into a standard FullHD comp (called "panoramic").
-- Scale to comp as needed for fit
-- Duplicated the image
-- Positioned the images so that the right side of image 1 and left side of image 2 were seamless
-- Linked the images (parented img2 to img1)
-- Using Position keyframes, created one full "rotation" over time - ensuring that I started and ended on the same frame
-- Trimmed the comp to this duration (in this case, 20 seconds)
-- Pre-comped so my full rotation was now in its own composition (so I now have "stitched" inside "panoramic")
-- Took my "stitched" layer inside "panoramic" and enabled time remapping
-- Alt/Option-click the Time Remap stopwatch and added the expression [loop_out("cycle",0)] without brackets
-- Increased my comp duration (40 seconds - so 2 full rotations) and extended the layer out to match the new duration
-- Keyframe "trick" to remove loop-generated black frame (add keyframe one before last and delete the last keyframe)
--- --- --- --- ---
It works. And don't get me wrong, that's a good thing. But before doing this, I had tried using a few other methods to achieve this effect that I thought looked nicer (maybe because they attempt to warp the image into the correct shape?)...I just couldn't actually get them to work.
--- --- --- --- ---
First, I tried using the cool-looking "pt_Panorama" script from aeScripts. This created my infinite cylinder (well...12 flat image panels all cleverly rotated to approximate a cylinder very well), no problem. But I couldn't figure out how to properly control the motion. Attempting to attach a null to move the camera (as I am accustomed) left me pulling around a 2D image - only the part currently visible to the camera seems to "exist". Panning in any direction left me with empty background as if I were using any typical still image.

Using the camera position controls directly allows me to see the full extent of the panorama - but it's a bugger to animate. All I want is horizontal motion, which logic tells me falls on the x-axis. But due to the nature of the script and the "panel" images it creates, it looks like there's also some y-axis motion involved. Moving the camera via mouse seems to compensate for these changes as you move around, but it makes inputting direct values almost impossible - as I have no clue how or when the y-value changes short of playing the whole thing back and looking for problems.

Could I move the camera position by hand and keyframe that way? Yes. But then I am at the mercy of my mouse-hand to be perfectly steady as I try to create a straight, horizontal, 360 panning motion. My confidence in this process and its ability to be replicated are less-than-stellar.
--- --- --- --- ---
I also have access to Trapcode Horizon, so I figured I'd give that a shot (having never used it before). After some initial stumbles (needed a separate layer to apply the effect, needed to point the effect to the panoramic photo layer, etc), This also created a very nice and smooth looking 360 photo. I could easily pan around its entirety with the AE camera, and small motions/shifts in perspective felt natural; thanks to the way Horizon naturally curved the image into a cylindrical shape.

Once again, things fell apart when I stopped spinning the image around with my mouse and started trying to make it move by the numbers. Horizon seems to do something odd with the camera's position numbers and it seemed to prevent me from simply entering in positional numbers to get the pan that I was looking for. (The numbers seem to oscillate back and forth between a set min and max value as you pan around. Camera moves with the mouse seem to operate just fine, but enter a number? It snaps your motion back to whatever invisible boundaries are locked in.) Same as before, tried from both camera and an attached null. I couldn't even succeed in keyframing one full rotation around - much less start in on looping it.
--- --- --- --- ---
I've already concluded I'm just not using these effects correctly for the usual reasons of "deadline + no prior experience = silly mistakes". Any assistance with the effects mentioned above would be great, but even better would be a native method (no 3rd party plug-ins) to achieve this in After Effects. Looking nicer (like these effects) is a bonus, but even something that is one step less or slightly easier than what I wound up doing would be appreciated.

If you made it through all of that, thank you in advance for any help you can provide. And if you came here looking for a solution but one hasn't been posted, I guess you can use my workaround until someone provides a better way.

Return to posts index

Kevin CampRe: 360 Panoramic Loop
by on Dec 9, 2016 at 10:32:27 pm

you could try the offset effect.

just add your 360 image to a comp, add the offset effect and animate the 'shift center to' property, the image will repeat at the edges, so if it was seamless at each end, it should give the effect of infinite panning.

animating the x-property from 0 to the width of the image would then allow you to use the loopOut() expression to continuously loop it.

or, you could use a rate-based expression to drive the x-offset, something like this:

rate = 100; // value is pixels per second
value + [rate*time, 0]

just set the rate as needed. use a negative rate if you want it to go the other direction.

Kevin Camp
Art Director

Return to posts index

Aaron WiesenRe: 360 Panoramic Loop
by on Dec 9, 2016 at 11:04:11 pm


This is exactly the kind of solution I was looking for. Quick and easy to replicate. Between the Offset effect and expression, you've saved me a considerable amount of repetitive work. Truly, much appreciated!

Quick notes for anyone else who needs this:
-- Possibly obvious, but the ends really must be seamless beforehand. If not (say you made a few adjustments using a pre-comp to blend the edges together), make sure that your pre-comp length is long enough to accommodate your final comp.
-- The first time I applied the expression to the Offset effect, it worked while positive (going left); but threw a fit negative (right) - looping and stitching the image together at the wrong point every second rotation. Definitely a bug here, as deleting the effect and reapplying it made this issue go away. (Not sure if anyone else will experience that, but I figured it's good to know just in case.)

Thanks again. As always, it's very reassuring to know that a resource like the Cow exists for problems like this.

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 All Rights Reserved