How do I? Orient 2-D layers to 3-D camera data
after working in Cinema 4D, I save my project file to include 3-D camera data for after effects.
My question is, how do I orient 2-D layers in after effects to the 3-D camera data imported from cinema 4D? When I click on the 3-D icon in the aftereffects project the 2-D layers disappear from camera view. Is there a way to orient the new 2-D layers to the 3-D camera imported from cinema 4D?
In after effects I have a lens flare applied to a 2-D layer, I want the lens flare to interact correctly with the imported 3-D camera data but when I click on the 3-D icon the lens flare layer goes completely out of orientation. I am sure this is an easy fix but can't quite figure it out. Any help would be appreciated.
Thank you very much for your anticipated help, DT
Thanks a million,
If you need the 2D planes to always face the camera in 3D then:
right-click on the 3D layer you want to behave this way, choose "Transform", then "Auto-Orient". Select "Orient towards camera".
If you need to just position them in 3D space then you have to do it by moving the plane in 3D until it's in the right place - I do not think there's a quick way of doing it... or maybe there is- I just thought of this- if you bring a new camera in AE, parent the layer to it, and then copy and paste the imported camera data to the new camera layer, this should keep the 2d plane in front of the second camera; un parent and delete the second camera. You have now the 2d layer set in 3D space in front of the initial camera and you can move it wherever you need.
Lens Flare- this is not going to work in 3D space. The Lens Flare plugin works on 2d - even if you make the layer 3D you still have a 2d plane with a lens flare on it that's moving in 3D space and not a 3D lens flare effect. So you just need a 2d adjustment layer to animate a lens flare over the image.
Tudor "Ted" Jelescu
Senior VFX Artist
You have two issues to overcome.
The first problem is simple: your imported camera is probably not pointed in the direction that the default AE camera is when it's created. You need to move your 3D layers in front of the imported camera.
The second problem is a little more complicated. The Lens Flare effect needs to be applied to a 2D solid, but you want it's position to be based in 3D space. To do this you need to create a 3D null to act as the flare's center. Then apply the lens flare effect to a composition sized 2D solid. Add this expression to the lens flare's center:
Make sure that your 3D null is visible by your imported camera or you won't see the lens flare. Also, this will result in the flare moving in front of the camera if the Null is actually behind the camera. In order to prevent this you need to apply another expression to the flare's brightness property:
The above code will shut off the lens flare effect when the null moves behind the camera. You could alternatively change this code to adjust the brightness of the flare based on the distance from the camera:
This is more than you asked for, but I like to be thorough :) Let me know if you have any questions.