[Bf-blender-cvs] [ae863f34df8] master: Tracking: Clarify calculation of camera matrix for object solver

Sergey Sharybin noreply at git.blender.org
Mon Feb 10 12:51:08 CET 2020


Commit: ae863f34df870af416b4728e65d4b6eef93a4d30
Author: Sergey Sharybin
Date:   Mon Feb 10 12:46:01 2020 +0100
Branches: master
https://developer.blender.org/rBae863f34df870af416b4728e65d4b6eef93a4d30

Tracking: Clarify calculation of camera matrix for object solver

It might be confusing why matrix is constructed from scratch rather
than using already calculated one.

===================================================================

M	source/blender/blenkernel/intern/tracking.c

===================================================================

diff --git a/source/blender/blenkernel/intern/tracking.c b/source/blender/blenkernel/intern/tracking.c
index 58f58417084..d2038c34056 100644
--- a/source/blender/blenkernel/intern/tracking.c
+++ b/source/blender/blenkernel/intern/tracking.c
@@ -398,6 +398,16 @@ MovieTrackingReconstruction *BKE_tracking_get_active_reconstruction(MovieTrackin
 void BKE_tracking_get_camera_object_matrix(Object *camera_object, float mat[4][4])
 {
   BLI_assert(camera_object != NULL);
+  /* NOTE: Construct matrix from scratch rather than using obmat because the camera object here
+   * will have camera solver constraint taken into account. But here we do not want or need it:
+   * object is solved in camera space (as in, camera is stationary and object is moving).
+   *
+   * This will include animation applied on the camera, but not possible camera rig. This isn't
+   * an issue in practice due to the way how VFX is constructed.
+   *
+   * If we ever need to support crazy setups like that one possible solution would be to use
+   * final camera matrix and multiple it by an inverse of solved camera matrix at the current
+   * frame. */
   BKE_object_where_is_calc_mat4(camera_object, mat);
 }



More information about the Bf-blender-cvs mailing list