Viz Artist
Version 3.11.0 | Published January 22, 2018 ©
Advanced Lens Distortion
Here, you find the following information:
Lens distortion replaces the lens deformation, and was introduced with Viz Artist and Engine 3.9. You can now select the distortion algorithm and distortion parameters provider for each individual camera. There is no longer a need for multiple configuration flags, such as render_scale and Virtual Studio.
The distortion algorithm defines how the rendered image is distorted, and the parameters are the input to the distortion algorithm. Typical algorithms expect “k1”, “k2”, “centershift_x”, “centershift_y”, “chipsize_x”, “chipsize_y”, etc.
Important changes compared to previous versions
-
Activation of lens distortion does not depend on other settings, such as render_scale or entering Virtual Studio mode.
-
You can explicitly select the algorithm and parameter source per camera, also in Viz Artist. There is an auto mode, which attempts to determinate the correct algorithm and parameter mode based on the available data.
-
Now called Lens Distortion instead of Lens Deformation.
-
render_scale is now correctly applied to FieldOfView. There is no longer a “jump” when enabling or disabling post processing (PP) in the Scene Editor.
Technical note: In previous versions, FOV was adapted when data was received from the external camera. The received value was already modified to compensate the render_scale setting. This could cause wrong results when the setting was not considered for rendering, such as when disabling post processing effects with the PP button. In 3.9.0, the FOV is untouched and modified on the fly while rendering if necessary.
-
Previous versions rejected distortion values if the distortion was too strong, if pixels from the outside of the rendered area would have been moved inside the visible area. The render_scale defines how much of the border around the visible area should be rendered, to be able to “move” parts from outside to the inside - think of the barrel distortion! If distortion values were too high, and non-available pixels from the outside would have been distorted “into the screen”, it simply used the last valid distortion parameters instead. This could lead to confusion, as the distortion did not use the real values. Now, the distortion uses the values provided, even if some invisible areas show up on the borders. If you see unexpected black or transparent areas around the border, consider increasing the render_scale. You can do this by editing the entry for render_scale in the configuration file. The default value is 0, but you can change it as an example to 1.2 or even higher.
-
New distortion algorithms:
-
Radial: A classic algorithm.
-
Stype and Trackmen: Implemented according to specifications from tracking data providers.
-
Distortion algorithms
Auto |
Automatically selects one of the algorithms below, depending on available data. |
Inactive |
- |
Internal |
The internal distortion algorithm used in 3.8.x, when reading data from lens file. |
Libero |
The distortion algorithm used in 3.8.x when connected to Viz Libero or Viz Arena. |
XPECTO |
The distortion algorithm used in 3.8.x with external data. |
Radial |
Radial lens distortion, based on the Brown-Conrady model. See https://en.wikipedia.org/wiki/Distortion_(optics)#Software_correction. |
Stype |
Lens distortion as expected by Stype. |
Trackmen |
Lens distortion as expected by Trackmen. |
Parameter providers
Auto |
Automatically selects one of the providers below, depending on the received data. |
Lensfile |
Reads zoom/focus from external and calculates all other parameters from lens file. |
Libero |
Reads K1/K2 from Viz Arena or Viz Libero. |
Manual |
Uses parameter from the configuration. See MAIN*CONFIGURATION*CAMERA*1*DISTORTION*PARAMS*MANUAL SET/GET name value |
Tracking Hub |
Reads parameters from Tracking Hub. |
Configuration file flags
## Possible distortion modes: 0=INACTIVE, 1=AUTO, 2=INTERNAL, 3=XPECTO, 4=LIBERO, 5=RADIAL, 6=STYPE, 7=TRACKMEN ## Possible distortion param modes: 0=AUTO, 1=MANUAL, 2=LENSFILE, 3=Tracking Hub, 4=LIBERO camera1_distortion_mode = 0 camera1_distortion_param_mode = 0 camera1_distortion_param_manual = {"centershift_x": 0.000000, "centershift_y": 0.000000, "chipsize_x": 8.800000, "chipsize_y": 5.200000, "k1": 0.000000, "k2": 0.000000} camera2_distortion_mode = 0 camera2_... # lens compatibility mode, see note use_lens_compatibility_mode=0 |
Lens compatibility mode
Important! For new lens calibrations, always use use_lens_compatibility_mode=0.
Until Viz Artist and Engine 3.8.2, the result of the lens deformation was affected by the hd_halfheight setting. This was corrected in 3.8.3, and the lens deformation now generates the same result for hd_halfheight=1 and hd_halfheight=0. However, if you have lens files that were calibrated with hd_halfheight=1 using an older version, the result will now differ. In this case, enable use_lens_compatibility_mode.