Camera Calibrator Nodal Offset to Unreal

 

How would I use the nodal offset information generated by Camera Calibrator inside an Unreal Engine lens file? Inverting the values and re-mapping the axes to Unreal order doesn't seem to work. I'm fine calculating distortion in either Unreal or Camera Calibrator (results seem similar), and inputting sensor width in Camera Calibrator seems to yield a FOV in Unreal. It's just the nodal/delta offset I'm curious about. Thanks.

   Pyriphlegethon

 
Profile Image
Gabor Bosze
  -  

Hi, 

Aximmetry’s TackedCam object inside Unreal gets all the tracking information through the Control Data pin.

Do you need to use a UE lens file in your project?

You can export this calibration file from Camera Calibrator.

The export produces a .xml file that can be opened with any text editor.
So you can get the needed parameters.
For re-mapping the axes to Unreal, you can find some guidelines here:
https://my.aximmetry.com/post/2982-unreal-virtual-camera-in-aximmetry

Best regards

 
Profile Image
Pyriphlegethon
  -  

Thank you Gabor. Just trying to understand what the values mean: In the "Tracking results" of Aximmetry Camera Calibrator, what specifically do the "Delta Head Position" values represent?  I know it's a nodal offset, but, for example, the first value of "Delta Head Position" and "Delta Head Rotation" is a measurement from where to where? In a local reference frame or a world one? If measured from a world frame, where is the origin point?

It doesn't look like a simple vector from camera nodal point to tracking point.

Thank you.


image.png
 
Profile Image
Gabor Bosze
  -  

Hi,


Unreal and Aximmetry use different coordinates to define camera positions, so converting values manually can be difficult.
Aximmetry measures in meters Unreal measures in centimeters.
Axes have different letters and directions.
And rotations also differ.

In Aximmetry:
Position:

X = Unreal Y / 100

Y = Unreal Z / 100

Z = Unreal X / 100

Rotation:

X = Unreal Y  (Pitch)

Y = Unreal -Z (Yaw)

Z = Unreal X (Roll)

Scale:

X= Unreal Y

Y= Unreal Z

Z= Unreal X


However with Unreal for Aximmetry, you can check how a Get Aximmetry Transformation node converts coordinates. So you can even copy-paste them.
First, you need to have a simple Unreal scene with an Aximmetry Camera in it.  In this example Aximmetry_Virtual_Camera_1-3_Billboards0.
After that, we need to edit the level blueprint.

Here you can find a doc about this:
https://aximmetry.com/learn/virtual-production-workflow/preparation-of-the-production-environment-phase-i/obtaining-graphics-and-virtual-assets/creating-content/creating-content-for-aximmetry-de/passing-data-from-aximmetry-de-to-unreal-engine/ 

We have to make a blueprint graph like this:


We have to cook it, then place it into a new compound in Aximmetry and start it in Live Sync mode.
Connect a Camera Tracking module to the pin you created with the Get Aximmetry Transformation node in the blueprint.


In the Camera Tracking module select “Manual” for Device and your .xml calibration file for CalibrationProfile.
This way your DeltaHeadPos and  DeltaHeadRot are the input for Cam Transform.


Play the level in Unreal and select the actor you used in your blueprint (Cube2) so you will see live data in the Details tab.
With a RMB you can select copy values to copy them to the clipboard.


Don’t forget to set the actor’s mobility to Movable:

After that, you can paste the values into place in your Lens File Editor.
Here’s a link about how to use the Lens File Editor:
https://www.vive.com/uk/support/camtrack/category_howto/importing-calibration-data-into-unreal-engine.html



I hope it helps.

Best regards



;