Commit Graph

82 Commits

Author SHA1 Message Date
192a28bb32 rename mask-objects to mask-layers. 2012-05-31 19:12:22 +00:00
7443604790 mask object blending and alpha options 2012-05-31 12:12:28 +00:00
d74200a3af svn merge -r47246:47245 . --- revert 47246, this needs more considersation and planning to do this well 2012-05-31 08:24:53 +00:00
3795d73235 Adds property to mask splines to allow them to be negated (black masks), still needs work in tracking.c 2012-05-30 21:15:17 +00:00
125e7550ff draw options for mask spline matching the UV view 2012-05-30 16:22:33 +00:00
a111662e1a proportional editing for masks 2012-05-30 07:34:25 +00:00
2870366d72 rename 'mask shape' to mask object, will make adding shape keys less confusing. 2012-05-18 12:51:11 +00:00
2da49c4a8f Rotation support for motion tracking markers
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.
2012-05-18 09:33:50 +00:00
7414ccfeeb Add light-normalized tracking to the planar tracker
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.
2012-05-18 02:12:47 +00:00
82e45dd275 Add panels for the new planar tracker
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.
2012-05-17 17:09:51 +00:00
d82ca6d636 svn merge ^/trunk/blender -r46632:46684 2012-05-16 09:12:18 +00:00
eb22b52482 style cleanup: pep8 2012-05-15 18:50:51 +00:00
16d93f3881 Merging r46203 through r46413 from trunk into soc-2011-tomato 2012-05-08 13:01:16 +00:00
48ead27366 Camera tracking: switch dopesheet information to lazy calculation
All operators which changes tracking data now just tags dopsheet as outdated,
actual re-calculaiton of happens only when this information is actually needed
(like on dopesheet draw).

This makes things a bit faster when there's no dopesheet visible in current
screen and also makes it much easier to update dopesheet using dependency
graph.

Also renamed dopesheet_sort_order to dopesheet_sort_method in rna and internal
stuff which makes much more sense and also correlated with naming in
file browser.
2012-05-03 23:15:01 +00:00
b1006fb949 Clip editor: sort order for dopesheet channels
Supported sorting by name, longest tracked segment and total tracked frames.

Internally tracks are stored in Tracking datablock, but sort order is
a clip editor space property and sorting happens on clip editor draw.
If there's no dopesheet opened with different sort orders it's not
a problem due to re-sorting wouldn't happen.

Also fixed draw issue of tracked segments introduced in previous commit.
2012-05-03 19:28:41 +00:00
3336909050 Merging r46137 through r46202 from trunk into soc-2011-tomato 2012-05-02 18:07:01 +00:00
6f3400ca52 Clip editor: cleanup of View menu - do not show operators which doesn't make sense in dopesheet/curve view 2012-05-02 17:33:48 +00:00
f111131ca6 Camera tracking: initial commit of dopesheet view for clip editor
- Displays dopesheet information for selected tracks, and currently does not
  support any kind of editing.
- Changed regions to use the whole main region for such views as curves and dopesheet.
  This allows to have own panels with tools/properties in this area.
- Active clip is getting synchronized between different clip editor editors in the
  same screen, so updating of curve/dopesheet views happens automatically when one
  changes current clip in one of this editors.
- Panels in toolbox and properties panels are now separated to rely on current view
  mode, but some operators and poll functions still need to be updated.
- Added new screen called "Movie Tracking" where layout is configured to
  display timeline, main clip window, curves and dopesheet.
2012-04-30 16:19:20 +00:00
9151d46d7d Tomato: initial commit of mask editing tools into SVN
- Added new dtaablock called Mask which might be re-used in any area.
  Currently editing of masks happens in clip editor and they might be used in
  compositor nodes only.
- Added new mode to clip clip editor to interact with masks.
  Implemented basic tools to create shapes, splines and points. Also implemented
  idea of UW points for feather which means feather points are have got U
  coordinate along spline (which is measured from 0 to 1) and W is it's weight
  meaning distance from main spline.
- Spline points might be parented to movie tracks.
  Interface for this isn't best yet.
- Rasterisaztion of masks happens in compositor node (Input -> Mask)
  Input image of this ode is used as reference for mask resolution.
  Currently all splines of all shapes are rasterizing independently which
  means shapes with holes are not supported.
  Also feather rasterization is not implemented.

  Rasterized was implemented by Pete Larbell, thanks!

Do not consider this is something finished, there's still lots of things to
be done (especially from interface and usability points of view).
2012-04-30 07:43:21 +00:00
c27c87dde4 Camera tracking: backport refactoring made in local branches with masking and dopesheet view into trunk
Mostly related on changes in poll functions for tracking operators and some changes
to how interface is initializing for different view types.
2012-04-29 12:32:26 +00:00
51a4188105 Camera tracking: support of tripod motion solving
Expose option into interface to use modal solver which currently
supports only tripod motion.

This solver requires two tracks at least to reconstruct motion.
Using more tracks aren't improving solution in general, just adds
instability into solution and slows down things a lot.

Refirement of camera intrinsics was disabled due to it's not only
refines camera intrinsics but also adjusts camera position which
isn't necessary here

To use this solver just activate "Tripod Motion" checkbox in
solver panel.

Merged from tomato: svn merge ^/branches/soc-2011-tomato -r45622:45624 -r46036:46037

P.S. Quite experimental yet, requires more checking and probably
tweaks to prevent camera jumps when tracks apperars/disappears
from the screen.
2012-04-28 14:54:45 +00:00
a49a64b710 Camera tracking: small improvements to tripod solver"
- Disable camera refirement due to it's not only refines camera intrinsics
  but also adjusts camera position which isn't necessary here
- Detect rigid transformation between initial frame and current instead
  of detecting it between two neighbour frames.
  This prevents accumulation of error and seems to be working better
  in footages i've tested.
2012-04-28 14:40:37 +00:00
ec4edb94d9 Camera tracking: initial commit of dopesheet view for clip editor:
- Changed regions to use the whole main region for such views as
  curves and dopesheet. This allows to have own panels with
  tools/properties in this areas.
- Active clip is getting synchronized between different clip editor
  editors in the same screen, so updating of curve/dopesheet views
  happens automatically when one changes current clip in one of this
  editors.
- Curves and dopesheet are still using PREVIEW region type instead of
  re-using main region.
- To deal with vertical synchronization in dopesheet, re-initialization
  of preview region happens.
- Panels in toolbox and properties panels are now separated to rely
  on current view mode, some operators and poll functions still need
  to be updated.
- Added new screen called "Movie Tracking" where layout is configured to
  display timeline, main clip window, curves and dopesheet.
2012-04-14 12:03:23 +00:00
37c02ddee1 Camera tracking: revert changes made for texture buffer frame drawing.
Will be applied as another cleaned-up patch.
2012-04-14 12:03:03 +00:00
f9d9b4635d Camera tracking: support of tripod motion solving
Expose option into interface to use modal solver which currently
supports only tripod motion.

This solver requires two tracks at least to reconstruct motion.
Using more tracks aren't improving solution in general, just adds
instability into solution and slows down things a lot.

Refirement of camera intrinsics is supported by this solver.

To use this solver just activate "Tripod Motion" checkbox in
solver panel.
2012-04-14 12:02:47 +00:00
bfca79a657 Merging r44227 through r45619 from trunk into soc-2011-tomato 2012-04-14 10:46:47 +00:00
c579625265 Fix for reconstruction menu which still was using set_floor operator instead of set_plane 2012-04-07 15:20:20 +00:00
991ab5802b Cleanup: move tracking settings to be just after Track panel which makes it easier to
control things during tracking.
2012-03-30 10:37:20 +00:00
9db821a5db lattice & UV 'select all' menu items were missing action assignment. 2012-03-18 20:10:58 +00:00
02abb636a3 UI messages: unification of select/deselect stuff.
Previously we had three versions, Select/Deselect, Select or Deselect, and (De)select, choosen the third (shortest) one for now.
2012-03-17 19:14:08 +00:00
91c2aa7b95 Camera tracking: wall scene orientation operator
Made Set Floor a bit more general and name it Set Plane which defines
orientation from 3 selected tracks and makes them belong to specified
plane (wall or floor).
2012-03-06 12:27:42 +00:00
ed3b7e2c23 Camera tracking: configurable filter type for 2d stabilization
--
svn merge -r44151:44152 ^/branches/soc-2011-tomato
2012-02-17 08:27:19 +00:00
62d09c9103 Tomato: configurable filter type for 2d stabilization 2012-02-16 15:03:37 +00:00
81048fed74 Merging r43871 through r43908 from trunk into soc-2011-tomato 2012-02-05 14:39:43 +00:00
04a079668c Movie Clip Editor: cleanup of display panels
- Split display options into two panels:
  * Display, which contains all general display options related on editor itself
  * Marker Display, which contains options which makes sense for markers themselves
   and not used so often.
- Remove Show GPencil option which doesn't actually make sense because strokes might
  be disabled from GPencil panel
- Removed Show Pyramid option and show pyramid for KLT tracker as default.
- Added hotkey to toggle Show Disabled (Alt-D)
- Added hotkey to toggle Show Pattern (Alt-S)

Changes in interface and hotkeys are done by Sebastian Koenig.
 Thanks for the patch!

Own changes in interface were related on Aspect Ratio. It doesn't make
much sense for tracking (camera pixel aspect is what you'll want to use,
but for masking it would make much more sense because when you just
want to create a mask for footage you don't actually have camera).
Just removing from interface seems not so nice for now.

Merged from soc-2011-tomato rev43872
2012-02-05 13:43:58 +00:00
637bc0ddea Code Cleanup: pep8 edits 2012-02-04 11:10:41 +00:00
c8f5dac11b Movie Clip Editor: implemented option to display frame using OpenGL textures
Initial idea was to perform bilinear filtering for displaying proxied frame
to make it looking a bit smoother. It was done but it was also discovered
that using such kind of texture buffers helps on some crappy videocards
when playing $k footage.

Currently check for NPOT support is disabled, so use this option with care.
2012-02-03 19:13:31 +00:00
c354a6a02c Movie Clip Editor: cleanup of display panels
- Split display options into two panels:
  * Display, which contains all general display options related on editor itself
  * Marker Display, which contains options which makes sense for markers themselves
    and not used so often.
- Remove Show GPencil option which doesn't actually make sense because strokes might
  be disabled from GPencil panel
- Removed Show Pyramid option and show pyramid for KLT tracker as default.
- Added hotkey to toggle Show Disabled (Alt-D)
- Added hotkey to toggle Show Pattern (Alt-S)

Changes in interface and hotkeys are done by Sebastian Koenig.
Thanks for the patch!

Own changes in interface were related on Aspect Ratio. It doesn't make
much sense for tracking (camera pixel aspect is what you'll want to use,
but for masking it would make much more sense because when you just
want to create a mask for footage you don't actually have camera).
Just removing from interface seems not so nice for now.
2012-02-03 19:13:08 +00:00
f193291b32 Movie Clip Editor: proxy sizes for original and undistortted footages are now controlling separately 2012-02-01 18:08:37 +00:00
bcbe9ca5fc Color channels used for tracking is now a part of default tracking settings and also a part of presets. 2012-01-26 15:33:16 +00:00
6eb3d5cb50 Movie clip editor: default tracking settings can be copied from active track now 2012-01-26 15:04:25 +00:00
db57cbac20 More curves view improvements for clip editor:
- Renamed graph_jump_to_current_frame to graph_center_current_frame
  which makes more sense.
- Curve view now can be locked to time cursor (Lock to Time Cursor in
  Display panel or L button in curve view). Not sure if offset from
  locked position will make much sense here.
- Added hotkey for solving -- Shift-S.
2012-01-26 11:49:38 +00:00
bce89860f5 Various fixes for camera tracking stuff
- Fixed tooltip displaying for track sequence forwards in clip editor
- Corrected detection of 8 tracks so it wouldn't count tracks disabled
  on keyframes.
- Scale track preview to actual track widget size instead of scaling the
  whole preview image with given zoom ratio, so no extra memory needed to
  store zoomed margin would be used.
- Track's statistics text will fit pattern position instead of search if
  marker is disabled on current frame.
- Fixed toggle selection operator if selected track is hidden due to
  "Hide Disabled" policy.
2012-01-25 13:37:11 +00:00
a7c1e339cf picky cleanup to use of bpy.types 2012-01-18 06:11:56 +00:00
21b5dea29b PEP8 complaint changes 2012-01-17 17:27:18 +00:00
f37d1b7b4e Color channels now can be disabled for the whole frame in clip editor 2012-01-15 13:31:58 +00:00
93cf1531d0 fix own bug [#29875] Due to operators now reusing there last-used settings, some UI options are more or less broken (esp. in shortcuts and menu entries)
also prefer *.select_all rather then *.select_inverse operators, since this is an option for select_all.
2012-01-14 06:30:27 +00:00
5bf5d5a844 Camera tracking: tracks copy/paste operator
This commit implements basic clipboard support for movie tracking data
int clip editor. Used own implementation of clipboard like it's done
for sequencer.
Ideally it needed to be switched to more general clipboard system, but
currently this system is designed for text data only and it need to
be re-designed itself. But this feature is quite useful since object
tracking is implemented, so it should be OK to live with such own
implementation for a while.
2012-01-09 20:18:48 +00:00
d919c30ac3 More whitespace cleanup in python scripts 2012-01-06 21:25:28 +00:00
e95a05b29d 2.6 UI Files:
* Some code cleanup.
2012-01-05 16:04:25 +00:00