Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-08-16 13:46:30 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-08-16 13:46:30 +0400
commit24ce60cfe4511534e57a2dea3f24579c74bbdd29 (patch)
tree57df16e6d5f41545e1379f8a51e0e10fe6b2eef1 /source/blender/makesdna/DNA_tracking_types.h
parentcab2aef71ab44bc7d85cf4e2c1de607d02e0df7d (diff)
Merge plane track feature from tomato branch
This commit includes all the changes made for plane tracker in tomato branch. Movie clip editor changes: - Artist might create a plane track out of multiple point tracks which belongs to the same track (minimum amount of point tracks is 4, maximum is not actually limited). When new plane track is added, it's getting "tracked" across all point tracks, which makes it stick to the same plane point tracks belong to. - After plane track was added, it need to be manually adjusted in a way it covers feature one might to mask/replace. General transform tools (G, R, S) or sliding corners with a mouse could be sued for this. Plane corner which corresponds to left bottom image corner has got X/Y axis on it (red is for X axis, green for Y). - Re-adjusting plane corners makes plane to be "re-tracked" for the frames sequence between current frame and next and previous keyframes. - Kayframes might be removed from the plane, using Shit-X (Marker Delete) operator. However, currently manual re-adjustment or "re-track" trigger is needed. Compositor changes: - Added new node called Plane Track Deform. - User selects which plane track to use (for this he need to select movie clip datablock, object and track names). - Node gets an image input, which need to be warped into the plane. - Node outputs: * Input image warped into the plane. * Plane, rasterized to a mask. Masking changes: - Mask points might be parented to a plane track, which makes this point deforming in a way as if it belongs to the tracked plane. Some video tutorials are available: - Coder video: http://www.youtube.com/watch?v=vISEwqNHqe4 - Artist video: https://vimeo.com/71727578 This is mine and Keir's holiday code project :)
Diffstat (limited to 'source/blender/makesdna/DNA_tracking_types.h')
-rw-r--r--source/blender/makesdna/DNA_tracking_types.h55
1 files changed, 54 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h
index 04cd69bc5ae..f81ac4dab06 100644
--- a/source/blender/makesdna/DNA_tracking_types.h
+++ b/source/blender/makesdna/DNA_tracking_types.h
@@ -144,6 +144,44 @@ typedef struct MovieTrackingTrack {
struct bGPdata *gpd; /* grease-pencil data */
} MovieTrackingTrack;
+typedef struct MovieTrackingPlaneMarker {
+ /* Corners of the plane in the following order:
+ *
+ * Y
+ * ^
+ * | (3) --- (2)
+ * | | |
+ * | | |
+ * | | |
+ * | (0) --- (1)
+ * +-------------> X
+ *
+ * The coordinates are stored in frame normalized coordinates.
+ */
+ float corners[4][2];
+
+ int framenr; /* Number of frame plane marker is associated with */
+ int flag; /* Marker's flag (alive, ...) */
+} MovieTrackingPlaneMarker;
+
+typedef struct MovieTrackingPlaneTrack {
+ struct MovieTrackingPlaneTrack *next, *prev;
+
+ char name[64]; /* MAX_NAME */
+
+ MovieTrackingTrack **point_tracks; /* Array of point tracks used to define this plane.
+ Each element is a pointer to MovieTrackingTrack. */
+ int point_tracksnr, pad; /* Number of tracks in point_tracks array. */
+
+ MovieTrackingPlaneMarker *markers; /* Markers in the plane track */
+ int markersnr; /* Count of markers in track (size of markers array) */
+
+ int flag; /* flags (selection, ...) */
+
+ /* Runtime data */
+ int last_marker, pad2; /* Most recently used marker */
+} MovieTrackingPlaneTrack;
+
typedef struct MovieTrackingSettings {
int flag;
@@ -225,6 +263,7 @@ typedef struct MovieTrackingObject {
float scale; /* scale of object solution in amera space */
ListBase tracks; /* list of tracks use to tracking this object */
+ ListBase plane_tracks; /* list of plane tracks used by this object */
MovieTrackingReconstruction reconstruction; /* reconstruction data for this object */
/* reconstruction options */
@@ -280,9 +319,11 @@ typedef struct MovieTracking {
MovieTrackingSettings settings; /* different tracking-related settings */
MovieTrackingCamera camera; /* camera intrinsics */
ListBase tracks; /* list of tracks used for camera object */
+ ListBase plane_tracks; /* list of plane tracks used by camera object */
MovieTrackingReconstruction reconstruction; /* reconstruction data for camera object */
MovieTrackingStabilization stabilization; /* stabilization data */
- MovieTrackingTrack *act_track; /* active track */
+ MovieTrackingTrack *act_track; /* active track */
+ MovieTrackingPlaneTrack *act_plane_track; /* active plane track */
ListBase objects;
int objectnr, tot_object; /* index of active object and total number of objects */
@@ -432,4 +473,16 @@ enum {
TRACKING_COVERAGE_OK = 2
};
+/* MovieTrackingPlaneMarker->flag */
+enum {
+ PLANE_MARKER_DISABLED = (1 << 0),
+ PLANE_MARKER_TRACKED = (1 << 1),
+};
+
+/* MovieTrackingPlaneTrack->flag */
+enum {
+ PLANE_TRACK_HIDDEN = (1 << 1),
+ PLANE_TRACK_LOCKED = (1 << 2),
+};
+
#endif /* __DNA_TRACKING_TYPES_H__ */