Copy link to clipboard
Copied
I have been trying for weeks to do this 3D glitch effect in After Effects. I am new to working with expressions and Z-Scale. I am using a 3D camera tracker to create nulls to show in what parameters I can make the glitch in. Once I did that I have to dublicate my clip and freeze frame it. After that, I type in the expression zoom=thisComp.layer("Camera 1").cameraOption.zoom;
transform.scale*(1+transform.position[2]/zoom)
and turn it to a 3D layer to make the Z-scale fit over my original clip (Yes my Tracker Camera is named correctly). Every-time I try to do this, it gives me an error and doesn't fit my freeze framed clip to my comp. I posted the 2 tutorials on how to do this and if anyone can get back to me and let me know what I am doing wrong, I would greatly appreciate it.
https://www.youtube.com/watch?v=CDnJ5KKfTis&list=WL&index=56&t=239shttps://www.youtube.com/watch?v=f...
Copy link to clipboard
Copied
The long and short answer is that the success of tracking-related work depends on the footage supporting it, even more so since AE has no way of calibrating the tracker and the calculated solution can be at a utterly wacky scale, so the simplistic formulas don't work. And to be honest it might help to watch proper tutorials with renowned serious people, not wannabes that talk like teenagers in puberty. in any case, without seeing your actual project and understanding where you might be going wrong nobody can advise specifically. Start by actually checking your "scene scale" of the solved camera and inspecting the camera behavior from the alternate 3D views.
Mylenium
Copy link to clipboard
Copied
Thanks, but that doesnt help me at all. Regradless of my footage, this expresson should make my footage fit the comp Z-scale. This expresson seems to work for everyone elses projects, but not mine.
Copy link to clipboard
Copied
That expression will only work when the camera is in its default position. Create a new camera, add a comp sized solid, make it 3d, apply the expression to the solid and move it straight back in Z space and the solid will be scaled to fit the camera view. The problem with the expression used in both of those tutorials is that it does not make any calculation to determine the distance from the camera to the layer. It was written by someone that did not understand AE's comp or world space or vector math.
Now try moving the camera and the expression completely falls apart.
This expression will scale a 3D layer so that the plane defined by the anchor point of the layer is always at an effective 100% scale:
C = thisComp.activeCamera;
CP = fromWorld(C.toWorld([0,0,0]));
L = thisLayer
LP = fromWorld(L.toWorld(anchorPoint));
d = length(CP, LP);
z = C.zoom;
r = d/z
r * value
This will only fix the scale of the layer. It will not line up the layer with the optical center of the camera or make the layer face the camera. If you want to keep the 3D copy of camera tracked footage properly lined up with the camera you need to make a lot more calculations. If you have a 2 node camera in the scene you'll need some different calculations. I have animation presets that will work with both scenarios and I use them once in a while to fix composites but I'm not going to share them right now. The expression I shared for scale is part of the set and it always works.
Copy link to clipboard
Copied
I have tried to help other folks with both of those tutorials before. They are both poorly explained and pretty badly thought out tutorials. Second, not all shots will work for camera tracking. The expression you are using will only scale a layer to fill the frame if the camera is in the default position. In order for the camera to be in the default position when you use the camera tracker, you must have a shot where the camera is moving straight into the scene. Here's what happens when you have a shot that is tracking and panning with the subject. In this shot, the camera is moving away from the red truck and panning to follow the truck as it passes and it was successfully tracked and used in a short film to put a virtual payload in the back of the truck:
As you can see the camera isn't pointed anywhere near the 3D copy of the footage layer so the expression won't work and neither will the workflow. Let's take a look at another shot. This one is a drone shot moving in on a construction site. At first, it looks like things are going to work when the workflow has been followed.
Because we did not follow the recommended workflow for Camera Tracking and chose just one point to add a camera, the camera is on the first frame is in the default position so the scale expression works as we move the layer back in Z space. But as the camera moves down the timeline everything starts to get fouled up. The 3D copy of the footage is no longer the right size because the camera has moved and it is way out of position:
The reason the workflow falls apart is that the camera moves in a curved path. So what happens if you use the Camera Tracker as it was designed to be used and you set an origin and ground plane and select a surface instead of a point:
Nothing is lined up the way it needs to be if you expect to create the 3D glitch effect as shown in both of those tutorials.
That is what happens when you follow tutorials by enthusiasts and amateurs that do not understand the tools and do not explain the workflow properly. If those were my students I would give both tutorials a D because the requirements for the shot were not explained, the expression does not compensate for camera position, and there was no satisfactory explanation of how to work around potential problems and get the shot to work like it should if you have problems.
It's not that this kind of glitch effect can't be done on all shots, it is just that this workflow only works with shots where the camera moves straight in on a scene. The farther the camera is off from a straight path the worse the effect looks. I don't have time to explain how to get all of the 3D copies of your footage lined up on the camera path and properly scaled but I will tell you it involves copying the camera path, referencing the camera orientation, parenting, nulls, and a lot more complex expression for scale.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now