Implemented general transformation tool Rotation for motion tracking data.
Mainly used to rotate pattern of markers.
To achieve most of usability, added configurable pivot point which is in fact
was median point before, but now can be chosen from boundbox center, median point
or individual centers. Individual centers means transformation would be performed
around marker's position, which is useful for rotation and scale.
Also implemented alternative scaling transformation -- hit S, S leads to
scaling of pattern area only.
TODO:
- clamping in some cases isn't working well, but that's easier to be resolved
after moving search are to marker.
- Update startup.blend so clip editor in Motion Tracking screen would be set to
Individual Centers by default.
Displaying image layers with flattened names (render_layer.render_pass) can lead to extremely long socket lists, especially with older files that were used with distinct render layers before. In general the flattening of names would be preferable, but it needs a sensible way of limiting the number of displayed outputs. For now the render layer dropdown selection is the best option to ensure usability.
The remesh modifier doesn't currently get any data from original
faces, so even if the input mesh was entirely smooth none of the
output faces would be. Solved by adding a new
dna-flag/rna-bool/UI-checkbox to smooth shade the output.
Requested by Daniel Salazar.
This commit adds the ability to normalize patterns by their
average value while tracking, to make them invariant to global
illumination changes.
To see this in action, check out the "Lobby" scene from Hollywood
VFX. If you track the markers that are shadowed by the actress,
previously they would not track. With the scale adaption on, the
tracker would shrink the area to compensate for the changed
illumination, losing the track. With "Normalize" turned on, the
patch is correctly tracked and scale is maintained.
A remaining problem is that only the Ceres cost function is
updated to handle the normalization. The brute translation search
does not take this into account. Perhaps "Prepass" (see below)
should get disabled if normalization is enabled until I fix the
prepass to normalize as well.
There are a few other changes:
- Cleanups in tracking RNA comments.
- Bail out of the sampling loop early if the mask is zero; this
saves expensive samples of the image derivatives.
- Rename the wordy "Translation initialization" to "Prepass" at
Sebastian's suggestion.
- Fix a bug where the mask was ignored when sampling in the cost
functor.
This replaces the old style tracker configuration panel with the
new planar tracking panel. From a users perspective, this means:
- The old "tracking algorithm" picker is gone. There is only 1
algorithm now. We may revisit this later, but I would much
prefer to have only 1 algorithm. So far no optimization work
has been done so the speed is not there yet.
- There is now a dropdown to select the motion model. Choices:
* Translation
* Translation, rotation
* Translation, scale
* Translation, rotation, scale
* Affine (Not implemented yet)
* Perspective
The most stable is the "translation" parameterization. The
others work but still require some tweaking.
- The old "Hybrid" mode is gone; instead there is a toggle to
enable or disable translation-only tracker initialization. This
is the equivalent of the hyrbid mode before, but rewritten to work
with the new planar tracking modes.
- The pyramid levels setting is gone. At a future date, the planar
tracker will decide to use pyramids or not automatically. The
pyramid setting was ultimately a mistake; with the brute force
initialization it is unnecessary.
Also made BKE_tracking_get_search_imbuf use space conversion utility functions,
so now it's not so annoying that search area calculation is happening differently
in different paces.
Also allow even sizes for search area.
Another small fix is about flipping search area dumping by libmv-capi.
It used to be flipped since in blender Y axis is up-aimed.