I am struggling with camera calibration when there is no talent and the camera is foused on the green screen, when I zoom in, I get a blurred background because of depth of field, is there a way to avoid that?
tHANK YOU.
Depth of field and greenscreen camera calibration
Comments
Yes I calibrated the cameras, the question is: If there is nothing in front of the camera except the green and I zoom on it, the virtual background gets blurry because of the calibration, but I would like that focus is on a mesh behind the green for example.
So I should have either an infinite focus, or have the virtual camera focus on a virtual mesh that is far behind the green.
I don’t understand the question. If the camera focus is properly calibrated and the virtual background is blurry, it’s blurry because it’s supposed to be with the focus distance you have set on your physical camera. Of there is nothing in front of the camera and you want the background to be in focus, just set the focus on the camera where you want the focus to be. Or am I missing something?
Oh, I am sorry, we are working with PTZ cameras and autofocus, so if there is nothing in front of the camera, the PTZ cam has the focus on the green.
Hi,
Essentially, you need to detect when auto focus is not set on the talent. Then, overwrite the focus value in Aximmetry, either by setting the focus distance to a very high value (infinite focus) or by implementing a virtual auto focus solution.
To detect when auto focus is not on the talent, you have several options, for example:
- Manual: You could press a button to switch from the tracked focus value to a virtual focus value.
- Keyed Input: Another approach is to create logic that detects when there is nothing in front of the green screen in your camera's picture. This is relatively straightforward: you only need to check if the keyed input contains many pixels that are not transparent.
- Tracked Focus Distance: In the Flow Editor, you could create logic to detect when the tracked focus distance approaches the value corresponding to your green screen, or larger. This could be especially effective if your PTZ camera stays stationary and is not placed close to the green screen.
- Talent Tracking Device: If you use a talent tracking device, you can create logic in the Flow Editor to determine whether the talent (tracking device) is within the camera’s field of view.
I am happy to guide you through implementing any of these solutions, depending on which best fits your workflow.
After that, if you want virtual auto focus instead of infinite focus, note that Unreal Engine does not have
this functionality by default. However, you can create one, similar to what is discussed here: https://www.youtube.com/watch?v=TvXJdDSHzro
Alternatively, if you only
want your virtual auto focus to focus on a single point, you can
calculate the focus distance based on that point and the camera’s
location. I can show you how to set this up.
Warmest regards,
Hi
Thank you for enlightening the possible solutions, I am very interested in solution 2 and 3, probably 2 would be the best , but I am no sure.
Our cams stay stationary, we work with canon cr-n500 ptz cams. If you could point me to a solution, that would be awesome.
Before I used Aximmetry I did the camera calibration with Freed, LiveLink and NDI Plugin and depth of field with my own blueprints, so I am a little familiar with it :-).
best regards
Hi,
Let’s start with Solution 3, which detects when the tracked focus distance approaches the value corresponding to your green screen or becomes larger. This method is more straightforward to implement than Solution 2.
In the Aximmetry Flow Editor, you can create the following simple setup:
The Greater module compares the current camera focus distance to a predefined value (in meters) that should be slightly less than the green screen's distance from your camera.
When the focus distance is greater than that value, the If Collection module switches to use a predefined focus distance set in the Set Collection Scalar module.
For Solution 2, which detects when nothing is in front of the green screen in your camera image, you can use this setup in Aximmetry 2025.3.0 BETA or later:
In earlier Aximmetry versions (before 2025.3.0), there was no INPUTS STUDIO tunnel. Instead, connect the B Texture output pin of the camera compound directly to the Alpha Splitter module.
The logic checks if any alpha (transparency) pixels remain in the keyed and masked billboard.
If your keying is poor and there are still fully opaque pixels when no talent is present, you can adjust the logic. For example, you might use a different output pin of the Measurer module, try different values in the Less module, or don't use the Alpha Splitter and use the Color Split module to analyze a different channel (currently, the logic uses red, but because of the Alpha Splitter, the red channel is actually the alpha channel).
If you want smoother focus transitions and to avoid sudden focus changes. Use the Smooth Scalar module to gradually shift to infinite focus after the talent leaves the frame. Use it as it is here with the Hold module, which will keep the last good tracked focus value:
You can also do this smoothing in Solution 3.
Let me know if you need further clarification or detailed steps for any part of this workflow.
Warmest regards,
Have you calibrated the focus? What tracking system are you using? The idea with calibrating is to match your real camera focus to the virtual camera. If your real camera is out of focus on the green wall when you zoom in, the virtual camera would be out of focus to. If you want something in your virtual scene to be in focus, just adjust the focus on your real camera.