Page MenuHome

Motion Tracking Viewport Drawing
AbandonedPublic

Authored by Dalai Felinto (dfelinto) on Aug 13 2018, 10:05 PM.

Details

Summary

It includes the following commits:

Commit 1/2

Motion Tracking Reconstruction Viewport Drawing (T51544)
    
* Draw bundle names.
* Draw bundle shapes (but spheres).
* Always draw bundles with the same size, regardless of camera scale.
* Draw custom colors for markers.
* Support selecting bundles.
    
Missing from this commit:
* Camera path.
* Spheres are not drawn as solid.

Commit 2/2

Fix viewport selection of markers not updating in all editors
    
This includes selections both in the clip editor as the viewport.
The selection is implemented as a light copy-on-write, where we only update the
parts we need.
    
We now have a new type of depsgraph node (DEG_NODE_TYPE_SELECTION_FLUSH) to be
used in cases like this.

Next steps

I will try to savage the camera path drawing from D2833.

Diff Detail

Repository
rB Blender
Branch
temp-tracker-viewport (branched from blender2.8)
Build Status
Buildable 1904
Build 1904: arc lint + arc unit

Event Timeline

Sergey Sharybin (sergey) requested changes to this revision.Aug 13 2018, 10:14 PM

See if DEG_TAG_SELECT_UPDATE should be used instead of DEG_TAG_COPY_ON_WRITE for the clip related commits or if it's not important in this case.

Absolutely. See depsgraph_select_tag_to_component_opcode().

Also, majority of the change is in draw manager, so maybe @Clément Foucault (fclem) is to be poked here as well

P.S. There is D2833, maybe that one draws spheres?

source/blender/makesdna/DNA_ID.h
423–424 ↗(On Diff #11565)

This is clearly out of sync with check_datablocks_copy_on_writable().

This revision now requires changes to proceed.Aug 13 2018, 10:14 PM

Final patch, original patch description to be updated.

  • Motion Tracking Reconstruction Viewport Drawing (T51544)
  • Fix viewport selection of markers not updating in all editors
Dalai Felinto (dfelinto) retitled this revision from Motion Tracking Viewport Drawing (wip) to Motion Tracking Viewport Drawing.Aug 14 2018, 7:15 PM
Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)
Dalai Felinto (dfelinto) edited the summary of this revision. (Show Details)

Final fix for object trackers and regular trackers (they were working for the initial frame only)

Sergey Sharybin (sergey) requested changes to this revision.Aug 15 2018, 9:04 AM

Final fix for object trackers and regular trackers (they were working for the initial frame only)

Once again, stick to an existing terminology, which was established from early days of the project [1]. Long story short:

  • Tracker is an algorithm, which tracks your feature point.
  • Track is a "trajectory" of your feature point in 2D footage.
  • Bundle is a reconstructed 3D position of corresponding track.

[1] https://en.blender.org/index.php/User:Nazg-gul/GSoC-2011/Documentation#Thesaurus

source/blender/blenkernel/BKE_movieclip.h
90

This function does not do any copy, it is wrong to even mention it. Proper name is BKE_movieclip_selection_synchronize.

And if you want this to be used by depencency graph, create an extra function BKE_movieclip_eval_selection_update() which calls that sync function.

ALL the function which are bound to dependency graph update are supposed to explicitly state eval.

source/blender/depsgraph/intern/depsgraph_types.h
158

I am not sure why you need new outer node here. If anything, we should generalize BATCH _CACHE to more generic thing.

And if anything, this is nothing to do with the flush which dependency graph is doing. Unless this is something to do with deg_eval_flush.cc stay away from this word.

source/blender/draw/modes/object_mode.c
143

Whitespace before parenthesis.

This revision now requires changes to proceed.Aug 15 2018, 9:04 AM

Address issues raised on review.

Apart from theming issues we're talking in IRC at this moment don't see stoppers or anything. Good job!

source/blender/blenkernel/intern/movieclip.c
1612

Can we make clip_src a const pointer?

This revision is now accepted and ready to land.Aug 15 2018, 2:37 PM
This comment was removed by Dalai Felinto (dfelinto).
source/blender/depsgraph/intern/nodes/deg_node_component.cc
396

@Sergey Sharybin (sergey) I'm not sure what to use here actually (re: ID_RECALC).

source/blender/draw/modes/object_mode.c
1648

I do need to test this, gotta look for files that are using object tracking.

Committed as:

  • 7907dfc400182b408e558d9fef1240d9929f8661
  • 5d15e68743fc92b41a85ef4180628427ab3b86da
  • 5a89dfe06baa2ab96947bb6b5f6c63c4b864fab2