Activity › Forums › Adobe After Effects Expressions › CC Sphere “Rotations”
-
CC Sphere “Rotations”
Posted by Lord Scales on July 18, 2007 at 11:11 pmHi there.
I have got a photo and I made it a nice 3D sphere using CC Sphere (it is still a 2D Layer). The effect has parameters of Rotation X, Y and Z.
I would like to link the CC Sphere parameters to the camera, to give the photo a realistic 3D looking. So, if the camera moves left, the Rotation Y would move to fake that the camera is affecting the photo. I tried a lot of techniques with Layer Space Transforms and Math.atan2, but nothing works as I want.If anyone can help (especially showing the expressions all CC Sphere “Rotations”) thanks very much!
Mike Dziennik replied 18 years, 8 months ago 5 Members · 8 Replies -
8 Replies
-
Dan Ebberts
July 19, 2007 at 12:55 amHmmm…. You know, it might be as simple as this:
// x rotation:
lookAt(thisComp.activeCamera.position,position)[0]
// y rotation:
lookAt(thisComp.activeCamera.position,position)[1]
// z rotation:
lookAt(thisComp.activeCamera.position,position)[2]
Pretty cool idea.
Dan
-
Lord Scales
July 19, 2007 at 2:37 amWorked PERFECT, Dan! I saw this lookAt in a Rick Gerard’s tutorial, but I thought it worked only for Orientation.
With some tricks for setting the radius according to the distance from the camera, it will be easier to simulate something like a 3D Earth.
Thanks
-
Andrew Kramer
July 19, 2007 at 6:52 amAwesome Dan! I wish I would have saw this before my earth tutorial. Dang it.
Question, what is the difference between this being applied to a 3d layers rotation compared to setting a layer to auto-orient towards cam?
Thanks,
Andrew -
Dan Ebberts
July 19, 2007 at 1:31 pmAndrew,
I think the main difference would be that you can see the rotation values (and therefore get at them with other expressions), where auto-orient operates in stealth mode and hides the orientation values.
Dan
-
Lord Scales
July 19, 2007 at 10:24 pmOh, Andrew’s tutorial was great and with this technique the result will be much better.
The wierd thing is that most of people run away of expressions and don’t know the power they have. One example is this: turn the most of AE 2D effects to 3D. I think you could go deeper (is it right for “more deep”?) on this at MotionScript.com, Dan.
-
Andrew Kramer
July 19, 2007 at 11:42 pmGreat Dan! I wasn’t sure, I set up 2 layers the same way to “see” any differnce and it looked the same. Having access to the values is great.
Scales, I’m with you on that, I try to ease people into it. In fact I put together a follow tutorial to show how to add this rotation script and turn the layer to 3d with auto-orient towards camera on so that it works mostly 3d. Of course a special thanks to MR Ebberts.
Best,
AK -
Hans Solo
July 22, 2007 at 7:39 pmThanks guys,
I am hooked on the tutorials of Adrew Kramer and I can’t wait to learn more 3d stuff concerning his earth rotation lesson. Also like to now how to smoothly link it with the previous cosmic earth zoom tutorial.
Greetings from Holland!
HS
PS be aware of the aftershakes…
-
Mike Dziennik
September 8, 2007 at 4:55 pmHate to be a party pooper but unless im mistaken this doesnt work in a true 3d scene with a moving camera. It looks fine with not much else in a scene and orbiting the camera but if you set up static reference points and animate a camera panning around the outside of the scene you will see that the sphere doesnt act correctly.
I believe this is due to the lookat expression producing 0-360 degree orientation values but not revs and degrees required of a rotation value.
Try it and see for yourself.
Next question is: whats the expression for a truly 3d sphere which can be panned around correctly?
Reply to this Discussion! Login or Sign Up