I have an Installation that runs 3 BMD Cameras into Aximmetry Broadcast DE with EZtrack Lighthouse 6DOF and Zoom/Focus Tracking by SWAN and electromechanical Lens encoders.
ATM I can't track focus the way I'd like to because the lenses (Canon CN-E 18-80 IS KAS) have an internal focus drive that does not move the focus gear ring on the outside of the lens when actuated by the BMD Focus demand attached to the camera. Current workaround is using some old mechanical Follow Focus units, but I´d like to get rid of them as it precludes using autofocus and is generally clunky to use.
The Cameras can be polled for the focus position of the lenses over ethernet as per this document:
https://documents.blackmagicdesign.com/DeveloperManuals/BlackmagicCameraControl.pdf
As I understand it sending GET /lens/focus at regular intervals will yield a response in the Form of a JSON number value "focus" in the format .0000-1.000 (10 bit floating point).
So I would need to regularly poll this value as often as possible (maybe 1-2 times a second, focus tracking the background is not *that* time critical), buffer it, interpolate the values with some sort of smoothing and finally feed it into Aximmetry/UE.
I´m not really a programmer at this level, so the question is: is this feasible at all? Does Aximmetry offer this kind of interface and data handling?
Hi,
I don't see any reason why this wouldn't be feasible. However, if you plan to use it with different Zoom levels, it can get quite complicated. Unfortunately, we can't test it because we currently don't have a BDM camera that supports the Camera Control REST API.
You can use the HTTP Request module to access the API.
You can read about the module here: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/setting-up-inputs-outputs-for-virtual-production/external-controllers/using-websocket-and-http-in-aximmetry/#http-request
Then you can convert the received JSON format to Aximmetry's internal Collection data type with the JSON Text module.
You can learn more about the Collection data type here: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/scripting-in-aximmetry/flow-editor/collection-for-databases/
In the end, you would need something like this:
First, you would need to determine the lowest working Auto Interval of the HTTP Request module for the API. The lower the interval, the less smoothing will be necessary.
Use the Collection Scalar module to extract the focus data from the Collection data type (JSON).
The Delay and Smooth Scalar modules will handle interpolation and delay the focus data to the rest of the camera's input. First, identify the delay between the video input and the focus data. Change the focus rapidly on your camera and compare when the focus value changes versus when the focus change is visible in the INPUT of the camera compound.
The focus data will probably arrive before the Video Input. Use the Delay module's Delay pin to increase the delay of the focus until it matches the INPUT video. You can connect the Delay module's output to a Scalar Peeker module to see when its value changes.
If the focus data arrives after the Video Input even without the Delay module, then increase the video delay by adjusting the In-to-out Latency: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/inner-workings-of-aximmetry/in-to-out-latency/#in-to-out-latency-1
This might not be enough, then further increase the delay using the Camera Delay parameter in the INPUT panel:
https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/green-screen-production/tracked-camera-workflow/inputs-tracked-camera/#delays
Note, that you will also need to change the tracking delay accordingly.
Once you have a good idea of the actual delay between the video and focus data, set the Delay pin of the Smooth Scalar module according to the Auto Interval of the HTTP Request. Subtract this delay from the Delay module's delay pin, as the Smooth Scalar module adds additional delay to the focus data.
Now the hardest part, calibrating the focus. For one zoom level, you could use the Curve module, which functions similarly to the Sequencer: https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/scripting-in-aximmetry/sequencing/sequencer-and-sequence-editor/
According to the Camera Control REST API documentation, you will receive focus data values between 0 and 1.
Add keys in the Curve module between 0 and 1 (approximately 4-6 keys), where the key values will represent the focus values used by Unreal.
To find these values, you can use the method demonstrated in this video for focus calibration in the Basic Calibrator (but instead of using the Basic Calibrator, you will have to use the Curve module): https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/tracking/basic-calibrator/
However, this will only calibrate your focus for one Zoom level!
If you plan to change Zoom levels, you will need to perform multiple focus calibrations with multiple Curve modules at different Zoom levels, and then interpolate between them. The accurate interpolation between Zoom levels is more complex than using Smooth modules, so for more accuracy, you could consider feeding the focus data back to the Basic Calibrator to create a calibration profile. This would end up in a quite complex setup, but if you plan to do so, I can look into the specifics of how you could achieve this.
Whether you succeed or encounter challenges, we are curious about your results.
Warmest regards,