TimKurkoski • Adobe Employee, May 09, 2023May 09, 2023
Hi all! Thanks again for your feedback. This bug has been fixed in the 23.4 release of After Effects. Please update to the latest version and let us know right away if you continue to see the issue.
I am not seeing this problem on an M1 Mac with 23.3 unless the C4D render engine is selected, but that makes sense because there is no depth of field with the C4D rendering engine.
We have a fix for this in progress. The fix is already available in After Effects Beta, v23.4. We're working on getting this added to the Known Issues page until After Effects 23.4 has graduated from Beta.
Note that this problem only occurs in After Effects 23.3 on Windows. Mac is unaffected.
If you need to use the Link Focus and Set Focus commands, here are a few options:
Install and use After Effects Beta, v23.4.
Revert to After Effects 23.2.1 until 23.4 has graduated from Beta.
Manually modify the comp. Some instructions below.
The Link Focus Distance to Layer command adds an expression to a 2-node camera's Camera Options > Focus Distance property:
//Automatically calculates Focus Distance to follow Point of Interest
var usingLegacyEngine = !!$.version;
try{
thisLayer( "ADBE Transform Group" )( "ADBE Anchor Point" ).value;
}catch(err){
quote = String.fromCharCode(34);
if ( usingLegacyEngine ) {
$.error = "" + quote + "Camera 1" + quote + " cannot be a One-Node camera";
} else {
throw "" + quote + "Camera 1" + quote + " cannot be a One-Node camera";
}
}
length([transform.position[0] * thisComp.pixelAspect , transform.position[1], transform.position[2]], [transform.pointOfInterest[0] * thisComp.pixelAspect, transform.pointOfInterest[1], transform.pointOfInterest[2]]);
The Link Focus Distance to Layer command adds an expression to a 2-node camera's Camera Options > Focus Distance property. Note that you will need to change the targetLayer variable to your desired 3D layer.
//Automatically calculates Focus Distance to follow the layer "Dark Gray Solid 1"
var usingLegacyEngine = !!$.version;
try{
thisLayer( "ADBE Transform Group" )( "ADBE Anchor Point" ).value;
}catch(err){
var quote = String.fromCharCode(34);
if ( usingLegacyEngine ) {
$.error = "" + quote + "Camera 1" + quote + " cannot be a One-Node camera";
} else {
throw "" + quote + "Camera 1" + quote + " cannot be a One-Node camera";
}
}
var targetLayer = thisComp.layer("Dark Gray Solid 1");
try{
targetLayer.transform.position[2]
}catch(err){
var quote = String.fromCharCode(34);
if ( usingLegacyEngine ) {
$.error = "" + quote + "Dark Gray Solid 1" + quote + " cannot be a 2D layer. The Focus Distance of " + quote + "Camera 1" + quote + " can only be set to follow 3D layers.";
} else {
throw "" + quote + "Dark Gray Solid 1" + quote + " cannot be a 2D layer. The Focus Distance of " + quote + "Camera 1" + quote + " can only be set to follow 3D layers.";
}
}
var cameraPosition = [transform.position[0] * thisComp.pixelAspect, transform.position[1], transform.position[2]];
var cameraPoi = [transform.pointOfInterest[0] * thisComp.pixelAspect, transform.pointOfInterest[1], transform.pointOfInterest[2]];
if ( thisLayer.hasParent ){
cameraPosition = thisLayer.parent.toWorld( cameraPosition );
cameraPoi = thisLayer.parent.toWorld( cameraPoi );
}
var targetPosition = [targetLayer.transform.position[0] * thisComp.pixelAspect, targetLayer.transform.position[1], targetLayer.transform.position[2]];
if ( targetLayer.hasParent ){
targetPosition = targetLayer.parent.toWorld( targetLayer.transform.position );
}
var cameraVector = sub( cameraPoi, cameraPosition );
if( length( cameraVector ) != 0 ) {
cameraVector = normalize( cameraVector );
}
var targetVector = sub( targetPosition, cameraPosition );
dot( targetVector, cameraVector );
The Set Focus Distance to Layer command uses the same logic as Link Focus Distnace to Layer, but leaves the value static. The easiest way to do this manually is to apply the Link Focus Distance to Layer expression as per above, read the value it produces, disable the expression and manually set the Focus Distance property to that static value.
The Reset Camera command is also affected by this bug. This command is also available in the 3D View Popup menu in the lower-right corner of the Composition panel. From this menu, it will work.
After effects, updated version (v23,3), "link focus distance" function is always disabled. I saved the same project in the previous version, 2022, opened it in after effects 2022 and the function is working normally.
OBS: My after effects is in the PT-BR language. (Screenshot)
Hi all! Thanks again for your feedback. This bug has been fixed in the 23.4 release of After Effects. Please update to the latest version and let us know right away if you continue to see the issue.