ADOBE AFTER EFFECTS: Forum Expressions Tutorials Podcasts Creative Cloud

Rotating sphere

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Josey ZadoriaRotating sphere
by on Aug 15, 2014 at 3:38:14 pm

I am trying to create a similar effect as the link I listed above. But I am stumped, and contemplating using a 3D program to achieve it, however, I am afraid that it will just create more work. This link looks like it was created in After effects using cc sphere. I tried that, and then tried making the sphere the parent, as I attached png images to it. But when I tried rotating the sphere, the objects don't follow. What I am trying to solicited from anyone, suggestions on how to achieve this. I would really appreciate it, as well as any other helpful tips to explore.

Return to posts index

Dave LaRondeRe: Rotating sphere
by on Aug 15, 2014 at 5:24:15 pm

I agree that it could be done in AE, but CC sphere would probably just get in the way. Since it's so tough to see the spheres themselves in those examples. you might be able to get away with a couple of black, circular 3D shape layers, whose sole job sould be to obscure the various images as they rotate around and become visible.

It might take a couple of 3D nulls to pull it off and some very tricky initial positioning of the images, but after that it would be fairly straightforward.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA

Return to posts index

John CuevasRe: Rotating sphere
by on Aug 15, 2014 at 5:23:46 pm

This would be easier to do in a true 3D program, but there is a method for faking it.

CC sphere doesn't create a real sphere, just a projection of one. Create a null, enable 3D, place it approximately in the center of the sphere, make it the parent of the objects you want to rotate around the sphere and then link it to CC Sphere rotation, but they will never truly rotate around the sphere and the illusion will fall apart quickly. So to fake it, you split the child layers so that when they are to go behind the sphere, those layers are moved below the sphere in the layer hierarchy.

Here's a quick and dirty example project:

Probably take a lot of work to make it look as good as the promo, but it might be doable.

Johnny Cuevas, Editor

"I have not failed 700 times. I have succeeded in proving that those 700 ways will not work. When I have eliminated the ways that will not work, I will find the way that will work."
---THOMAS EDISON on inventing the light bulb.

Return to posts index

Josey ZadoriaRe: Rotating sphere
by on Aug 16, 2014 at 3:23:08 am

Thanks. I guess when all said and done, going with my first notion of using a 3d program might be easier.

Return to posts index

Paul MurphyRe: Rotating sphere
by on May 1, 2015 at 12:12:50 pm

This tutorial shows you how to link 3D objects to CC sphere:

Return to posts index

Kevin CampRe: Rotating sphere
by on Aug 15, 2014 at 6:17:40 pm

there is a reasonably simple way to make it work in ae.

start by creating the sphere by adding cc sphere to a layer, preferably a layer that is 2x as wide as it is high to minimize distortion to any texture that you may want on the sphere. also, if you don't want to see the pinching at the poles as the sphere rotates, set the cc sphere 'rotation z' property to 90.

also, make the sphere layer 3d.

now add a layer that you want to sit on the surface of the sphere, make it 3d, parent it to the sphere layer and then twirl down the properties for that layer.

to link that layer to the sphere (since the sphere is not really 3d) we'll use expressions in addition to parenting.

first we'll link the layer's position to the surface of the sphere. select the anchor point property of that layer and choose animation>add expression, and copy/paste this expression into the expression field for the anchor point:

rad = parent.effect("CC Sphere")("Radius");

this will offset the y component of the anchorpoint to be relative to the radius of the sphere, so if the radius changes, so does the layer's y distance from it's anchor point. you'll refine that distance later.

next link the layer's position to the center of the sphere with this expression (note in cc sphere you can offset the sphere's postion with the offset property, this links the layer's position to that property):

pos = parent.effect("CC Sphere")("Offset");
x = pos[0];
y = pos[1];

finally link the layer's x rotation property to cc sphere's 'rotation x' property with this expression:

value-parent.effect("CC Sphere")("Rotation X")

now you'll want to adjust the layer's y component of the anchor point as needed to make it sit as close to the surface of the sphere as possible. it will take a little trial and error, but you can get pretty close to perfect.

you can also adjust the layer's x and z rotation to place it in various spots on the sphere.

once you have that set, you can change cc sphere's rotation x poperty and the layer should rotate around it in a natural way. you can also make adjustments to the radius and position and the layer should act like it is stuck on the sphere.

Kevin Camp
Art Director

Return to posts index

Josey ZadoriaRe: Rotating sphere
by on Aug 17, 2014 at 7:02:56 am

Mr. Camp,
Thank you for taking the time to explain this process in good detail, I really appreciate it. I did what you suggested, with mixed results. I was able to get the layer to rotate with the sphere, but as in the video link I provided, the effect I am trying to achieve by putting multiple layers to build sort of a rotating city with the illusion of it being 3D. I still can't get the layer to sit on the horizon of the sphere, as I tried adjusting the x and z rotation but that only affects the rotation properties, and not the actual position in z space. Also I seem to have issues adjusting the scale. Perhaps further explanation is needed, I also tried messing a little with the actual values in the expression in the position, but that didn't work either. Anyway, judging from the video, it seems that this was done in After effects, but I can't seem to figure it out. I tried experimenting with C4D, which I am pretty adept at, but doing outlines for splines in Illustrator, then extruding, while using the png image to texture it seems to be a lot more work than I have bargained for, so any help or more suggestions is welcomed at this point.

Return to posts index

Kevin CampRe: Rotating sphere
by on Aug 20, 2014 at 5:07:16 pm

Hi Josey,

The steps outlined will work, but there are some workflow tips that could help.

first, i'd set up all the surface elements (trees, buildings, etc) in a single photoshop file, positioning each element at the bottom edge of the frame. it would be good to get them all the scale that you want them to be in relationship to each other at this point if you can.

then from photoshop, there is a batch script to export layers as separate files (file>scripts>export layers to files). run that to create save off the individual layers. alternatively, you can import the psd as a comp, choosing to the non-cropped option, however i have found that psds with lots of layers (like 50+) can bog ae down, plus if you add layers later, you'll need to save them as separate files, as ae will not reimport the psd file.

in after effects, i'd start with the sphere, make it close to the size and position you'll need, and i'd animate cc sphere's rotation x property to make a full 360 (this is just to make it easier to set up, you can change the animation later).

then bring in your first surface layer and follow the procedure i outlined earlier (with the rot x property animated scrubbing the timeline will help you adjust the anchor point to get it to sit on the surface). since the surface element will be at the bottom edge of the layer, you can probably set the y-anchor point to the height of the layer (say the photoshop file was 300px high, setting the y-anchor point value to 300 should be very close to the perfect value).

as you found out, scaling can be an issue. as you scale, you'll need to adjust the anchor point of the layer too, or you can try this modified expression for the layer's anchor point that should account for scaling (it also takes the layer's height into account, so it should get very close to the surface once applied):

rad = parent.effect("CC Sphere")("Radius");
s = scale[1]/100;
h = height/2;

once you have the layer on the surface, yous the layers' x and y rotation to place it around sphere.

now you should be able to duplicate that layer, then, with the duplicate selected, option-drag (or alt-drag) another suface element from the project window, onto that selected layer. that should replace the layer with the new image but keep all the properties intact, so you can now simply adjust the x & z rotation to position it in a new location on the sphere.

if you wanted to account for the curve of the sphere in the surface elements, you'd need to do that in the image files of the elements. in that case, you'd want to start with the size of the sphere, render a still image of that sphere (composition>save frame as) and use that as a guide to cut an arc into the bottom edge of all the surface elements. the elements would also need to be the size needed, since scaling the image would effect that curve radius.

if that seems too tricky, you could feather the bottoms of the images to help hide the that transition between elements and surface a bit either in photoshop, or in after effects using either a mask with a feathered edge, or the linear wipe effect with a feathered edge.

Kevin Camp
Art Director

Return to posts index

Kevin CampRe: Rotating sphere
by on Aug 20, 2014 at 9:34:02 pm

actually and easy way to handle the curvature would be to select that surface layer, double-click the mask too to make a mask the exact size of the layer, then use the pen tool to add a point in the middle of the bottom path.

you can then nudge that point upwards and use the convert vertex pen tool to add bezier handles to make the curve as needed.

Kevin Camp
Art Director

Return to posts index

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