The expressions in the tutorial by Andrew Cramer kind of work but there's an error in the technique. Adding lookAt(thisComp.activeCamera.position, position)[0] for x, and changing [0] to [1] for y and [2] for z only gives the appearance of working correctly. Draw an equator on your plannet and you'll quickly see the problem. You can fix the problem by removing the expression from CCSphere Rotation z. You don't need it. It just fouls up the movement. These expressions also break if you've tied the camera to a null. I use nulls all the time to animate camera position. Just as in the real world, it's easier to move the camera around if you put it on a dolly. in AE, or any 3D app, my dolly is a null. Here is an animation preset that you can apply to your Planet layer which also matches the lighting in your 3D scene based on a point light, directional light, or spot light in your comp named Light 1 (the default name). Make sure you've set the CCSphere layer to 3D and set Auto Orient to Orient towards camera. The keyboard shortcut for Auto-Orientation is CTRL/Cmnd + Alt/Option + O. Then apply the animation preset ccSphereTo3Dcamera.ffx to the layer. CCSphere and all of the expressions will be added to the layer. Here are the expressions in case you can't get the animation preset: For CCSphere x: cp=thisComp.activeCamera.toWorld([0,0,0]); sp=thisLayer.toWorld(effect("CC Sphere")("Offset")); x=length([sp[0],sp[1]], [cp[0],cp[2]]); y=cp[1]-sp[1]; alpha=Math.atan2(y,x) value+radiansToDegrees(alpha) ; For CCSphere y: cp=thisComp.activeCamera.toWorld([0,0,0]); sp=thisLayer.toWorld(effect("CC Sphere")("Offset")); x=cp[0]-sp[0]; y=sp[1]-cp[2]; beta=Math.atan2(y,x) value+radiansToDegrees(beta) - 90; For CCSphere Light Height: cp=thisComp.activeCamera.toWorld([0,0,0]); sp=thisLayer.toWorld(effect("CC Sphere")("Offset")); lp=thisComp.layer("Light 1").toWorld([0,0,0]); cv=normalize(cp-sp); sv=normalize(lp-sp); angle=Math.acos(dot(cv, sv)); 100 - (angle/Math.PI)*200 For CCSphere Light Direction: l=thisComp.layer("Light 1"); xy=thisLayer.fromWorld(l.position) - effect("CC Sphere")("Offset"); angle=Math.atan2(xy[1],xy[0]); radiansToDegrees(angle) + 90; When using a light it's also good to add some ambient light to the scene. It's also good to build up your own library of animation presets. Whenever you work on something that you think you might use again save an animation preset.
... View more