Skip to content

Commit 85409eb

Browse files
Fix raycast lens distortion offset
If we are raycasting a 3D transform onto a surface, our first step is to get the screen-space position of the input transform. The input transform is the marker node, which (if there is a lens model node attached to the camera) will be automatically undistorted. Therefore, it seems that we don't need to perform any lens re/un-distortion at all.
1 parent fd1c63b commit 85409eb

File tree

1 file changed

+5
-1
lines changed
  • python/mmSolver/tools/raycastmarker

1 file changed

+5
-1
lines changed

python/mmSolver/tools/raycastmarker/lib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,11 @@ def _do_raycast(
183183
mkr_node,
184184
camera=(cam_tfm, cam_shp),
185185
time=(frame,),
186-
distortMode=utils_const.DISTORT_MODE_UNDISTORT,
186+
# NOTE: We don't need to account for lens distortion
187+
# here (at least in Maya 2024), because the Marker
188+
# transform node is already un-distorting
189+
# automatically.
190+
distortMode=utils_const.DISTORT_MODE_NONE,
187191
asWorldPoint=True,
188192
)
189193

0 commit comments

Comments
 (0)