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.
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.
- Deduplicate patetrn sampling used in esm and lmicklt trackers and
move SamplePattern to image/sample.h - Move computation of Pearson
product-moment correlation into own function in new file image/correlation.h
so all trackers can use it to check final correlation.
- Remove SAD tracker. It's almost the same as brute tracker, with only two differences:
1. It does brute search of affine transformation which in some cases helps to track
rotating features 2. It didn't use common tracker api which probably gave some
speed advantage, but lead to a real headache to use it together with other
trackers leading to duplicated code in blender side.
- Switch blenedr to use brute tracker instead of sad tracker which tracking made
source code much more simple to follow.
Should resolve compilation error on some platforms when using linux and
compilation error of libmv on FreeBSB.
It was a regression caused by not applied changes on config_linux.h
and some changes made to utilities.cc were also occasionally missed.
This version of libmv includes new gflags and glog libraries which makes
it possible to compile libmv with clang compiler.
Also remove code from CMakeLists which was disabling libmv if using clang.
Tested on linux with gcc-4.6 and clang-3.0, windows cmake+msvc and scons+mingw.
Could be some issues with other platforms/build system which shall be simple to resolve.
Needed to make constants like M_E defined in msvc. Was occasionally
removed on moving main changes in libmv from patch files in blender
repo to won repo (rev44190).
Error was caused by boost library (which doesn't seem to be working with Cycles too
when compiling with mingw). Switched mingw to use TR1 unordered collections. Also,
there was re-declaration of strcasecmp when mingw is used.
Additional changes are related on using own process spawning when BF_TOOLSET is set to
mingw. Seems to be working fine now (i've got too long command line error) and no
warning are supressing now (as it was told in comment for commented own process spawning).
==================================
Merging Carve library integration project into the trunk.
This commit switches Boolean modifier to another library which handles
mesh boolean operations in much stable and faster way, resolving old
well-known limitations of intern boolop library.
Carve is integrating as alternative interface for boolop library and
which makes it totally transparent for blender sources to switch between
old-fashioned boolop and new Carve backends.
Detailed changes in this commit:
- Integrated needed subset of Carve library sources into extern/
Added script for re-bundling it (currently works only if repo
was cloned by git-svn).
- Added BOP_CarveInterface for boolop library which can be used by
Boolean modifier.
- Carve backend is enabled by default, can be disabled by WITH_BF_CARVE
SCons option and WITH_CARVE CMake option.
- If Boost library is found in build environment it'll be used for
unordered collections. If Boost isn't found, it'll fallback to TR1
implementation for GCC compilers. Boost is obligatory if MSVC is used.
Tested on Linux 64bit and Windows 7 64bit.
NOTE: behavior of flat objects was changed. E.g. Plane-Sphere now gives
plane with circle hole, not plane with semisphere. Don't think
it's really issue because it's not actually defined behavior in
such situations and both of ways might be useful. Since it's
only known "regression" think it's OK to deal with it.
Details are there http://wiki.blender.org/index.php/User:Nazg-gul/CarveBooleans
Special thanks to:
- Ken Hughes: author of original carve integration patch.
- Campbell Barton: help in project development, review tests.
- Tobias Sargeant: author of Carve library, help in resolving some
merge stoppers, bug fixing.
Keir's comment:
Add support for detecting tracking failure in the ESM tracker component of
libmv. Since both KLT and Hybrid rely on ESM underneath, KLT and Hybrid now
have a minimum correlation setting to match. With this fix, track failures
should get detected quicker, with the issue that sometimes the tracker will
give up too easily. That is fixable by reducing the required correlation (in
the track properties).
Command used for merge: svn merge -r 42396:42397 -r 42399:42400 ^/branches/soc-2011-tomato
libmv. Since both KLT and Hybrid rely on ESM underneath, KLT and Hybrid now
have a minimum correlation setting to match. With this fix, track failures
should get detected quicker, with the issue that sometimes the tracker will
give up too easily. That is fixable by reducing the required correlation (in
the track properties).
Comment from Keir's commit:
Add a new hybrid region tracker for motion tracking to libmv, and
add it as an option (under "Hybrid") in the tracking settings. The
region tracker is a combination of brute force tracking for coarse
alignment, then refinement with the ESM/KLT algorithm already in
libmv that gives excellent subpixel precision (typically 1/50'th
of a pixel)
This also adds a new "brute force" region tracker which does a
brute force search through every pixel position in the destination
for the pattern in the first frame. It leverages SSE if available,
similar to the SAD tracker, to do this quickly. Currently it does
some unnecessary conversions to/from floating point that will get
fixed later.
The hybrid tracker glues the two trackers (brute & ESM) together
to get an overall better tracker. The algorithm is simple:
1. Track from frame 1 to frame 2 with the brute force tracker.
This tries every possible pixel position for the pattern from
frame 1 in frame 2. The position with the smallest
sum-of-absolute-differences is chosen. By definition, this
position is only accurate up to 1 pixel or so.
2. Using the result from 1, initialize a track with ESM. This does
a least-squares fit with subpixel precision.
3. If the ESM shift was more than 2 pixels, report failure.
4. If the ESM track shifted less than 2 pixels, then the track is
good and we're done. The rationale here is that if the
refinement stage shifts more than 1 pixel, then the brute force
result likely found some random position that's not a good fit.
svn command used: svn merge -r 42375:42376 -r 42377:42379 ^/branches/soc-2011-tomato
add it as an option (under "Hybrid") in the tracking settings. The
region tracker is a combination of brute force tracking for coarse
alignment, then refinement with the ESM/KLT algorithm already in
libmv that gives excellent subpixel precision (typically 1/50'th
of a pixel)
This also adds a new "brute force" region tracker which does a
brute force search through every pixel position in the destination
for the pattern in the first frame. It leverages SSE if available,
similar to the SAD tracker, to do this quickly. Currently it does
some unnecessary conversions to/from floating point that will get
fixed later.
The hybrid tracker glues the two trackers (brute & ESM) together
to get an overall better tracker. The algorithm is simple:
1. Track from frame 1 to frame 2 with the brute force tracker.
This tries every possible pixel position for the pattern from
frame 1 in frame 2. The position with the smallest
sum-of-absolute-differences is chosen. By definition, this
position is only accurate up to 1 pixel or so.
2. Using the result from 1, initialize a track with ESM. This does
a least-squares fit with subpixel precision.
3. If the ESM shift was more than 2 pixels, report failure.
4. If the ESM track shifted less than 2 pixels, then the track is
good and we're done. The rationale here is that if the
refinement stage shifts more than 1 pixel, then the brute force
result likely found some random position that's not a good fit.
It was error in CMakeLists.txt caused by automatic bundling script which
expanded variables instead of substituting them as-is.
Fixed both of bundling script and CMakeLists.txt
In some cases solving can take a while (especially when refining is used)
and keeping interface locked is a bit annoying. Now camera solver is moved
to job system and interface isn't locking.
Reporting progress isn't really accurate, but trying to make it more linear
can lead to spending more effort on it than having benefit. Also, changing
status in the information line helps to understand that blender isn't hang
up and solving is till working nicely.
Main changes in code:
- libmv_solveReconstruction now accepts additional parameters:
* progress_update_callback - a function which is getting called
from solver algorithm to report progress back to Blender.
* callback_customdata - a user-defined context which is passing
to progress_update_callback so progress can be updated in needed
blender-side data structures.
This parameters are optional.
- Added structure MovieTrackingStats which is placed in MovieTracking
structure. It's supposed to be used for displaying information about
different operations (currently it's only camera solver, but can be
easily used for something else in the future) in clip editor.
This statistics structure is getting allocated for time operator is
working and not saving into .blend file.
- Clip Editor now displays statistics stored in MovieTrackingStats structure
like it's done for rendering.
Reporting progress isn't really accurate, but trying to make it more linear
can lead to spending more effort on it than having benefit. Also, changing
status in the information line helps to understand that blender isn't hang
up and solving is till working nicely.
Main changes in code:
- libmv_solveReconstruction now accepts additional parameters:
* progress_update_callback - a function which is getting called
from solver algorithm to report progress back to Blender.
* callback_customdata - a user-defined context which is passing
to progress_update_callback so progress can be updated in needed
blender-side data structures.
This parameters are optional.
- Added structure MovieTrackingStats which is placed in MovieTracking
structure. It's supposed to be used for displaying information about
different operations (currently it's only camera solver, but can be
easily used for something else in the future) in clip editor.
This statistics structure is getting allocated for time operator is
working and not saving into .blend file.
- Clip Editor now displays statistics stored in MovieTrackingStats structure
like it's done for rendering.
- Fixed incorrect memory access on distoritons more than 128 pixels
- Do not use UNDO operators flags for delete proxy operator (files can't be restored form disk),
and also do not use UNDO for set as background operator (background images are storing in
3d viewport which isn't getting re-loaded on undo which can lead to incorrect users count
of movie clip user).
- Add support for refining the camera's intrinsic parameters
during a solve. Currently, refining supports only the following
combinations of intrinsic parameters:
f
f, cx, cy
f, cx, cy, k1, k2
f, k1
f, k1, k2
This is not the same as autocalibration, since the user must
still make a reasonable initial guess about the focal length and
other parameters, whereas true autocalibration would eliminate
the need for the user specify intrinsic parameters at all.
However, the solver works well with only rough guesses for the
focal length, so perhaps full autocalibation is not that
important.
Adding support for the last two combinations, (f, k1) and (f,
k1, k2) required changes to the library libmv depends on for
bundle adjustment, SSBA. These changes should get ported
upstream not just to libmv but to SSBA as well.
- Improved the region of convergence for bundle adjustment by
increasing the number of Levenberg-Marquardt iterations from 50
to 500. This way, the solver is able to crawl out of the bad
local minima it gets stuck in when changing from, for example,
bundling k1 and k2 to just k1 and resetting k2 to 0.
- Add several new region tracker implementations. A region tracker
is a libmv concept, which refers to tracking a template image
pattern through frames. The impact to end users is that tracking
should "just work better". I am reserving a more detailed
writeup, and maybe a paper, for later.
- Other libmv tweaks, such as detecting that a tracker is headed
outside of the image bounds.
This includes several changes made directly to the libmv extern
code rather expecting to get those changes through normal libmv
channels, because I, the libmv BDFL, decided it was faster to work
on libmv directly in Blender, then later reverse-port the libmv
changes from Blender back into libmv trunk. The interesting part
is that I added a full Levenberg-Marquardt loop to the region
tracking code, which should lead to a more stable solutions. I
also added a hacky implementation of "Efficient Second-Order
Minimization" for tracking, which works nicely. A more detailed
quantitative evaluation will follow.
Original patch by Keir, cleaned a bit by myself.
- Replace set of booleans with menu, so now you'll simply be unable to choose
unsupported refine combination
- Some internal code cleanup and minor refactor
- Add support for refining the camera's intrinsic parameters
during a solve. Currently, refining supports only the following
combinations of intrinsic parameters:
f
f, cx, cy
f, cx, cy, k1, k2
f, k1
f, k1, k2
This is not the same as autocalibration, since the user must
still make a reasonable initial guess about the focal length and
other parameters, whereas true autocalibration would eliminate
the need for the user specify intrinsic parameters at all.
However, the solver works well with only rough guesses for the
focal length, so perhaps full autocalibation is not that
important.
Adding support for the last two combinations, (f, k1) and (f,
k1, k2) required changes to the library libmv depends on for
bundle adjustment, SSBA. These changes should get ported
upstream not just to libmv but to SSBA as well.
- Improved the region of convergence for bundle adjustment by
increasing the number of Levenberg-Marquardt iterations from 50
to 500. This way, the solver is able to crawl out of the bad
local minima it gets stuck in when changing from, for example,
bundling k1 and k2 to just k1 and resetting k2 to 0.
- Add several new region tracker implementations. A region tracker
is a libmv concept, which refers to tracking a template image
pattern through frames. The impact to end users is that tracking
should "just work better". I am reserving a more detailed
writeup, and maybe a paper, for later.
- Other libmv tweaks, such as detecting that a tracker is headed
outside of the image bounds.
This includes several changes made directly to the libmv extern
code rather expecting to get those changes through normal libmv
channels, because I, the libmv BDFL, decided it was faster to work
on libmv directly in Blender, then later reverse-port the libmv
changes from Blender back into libmv trunk. The interesting part
is that I added a full Levenberg-Marquardt loop to the region
tracking code, which should lead to a more stable solutions. I
also added a hacky implementation of "Efficient Second-Order
Minimization" for tracking, which works nicely. A more detailed
quantitative evaluation will follow.
===========================
Commiting camera tracking integration gsoc project into trunk.
This commit includes:
- Bundled version of libmv library (with some changes against official repo,
re-sync with libmv repo a bit later)
- New datatype ID called MovieClip which is optimized to work with movie
clips (both of movie files and image sequences) and doing camera/motion
tracking operations.
- New editor called Clip Editor which is currently used for motion/tracking
stuff only, but which can be easily extended to work with masks too.
This editor supports:
* Loading movie files/image sequences
* Build proxies with different size for loaded movie clip, also supports
building undistorted proxies to increase speed of playback in
undistorted mode.
* Manual lens distortion mode calibration using grid and grease pencil
* Supervised 2D tracking using two different algorithms KLT and SAD.
* Basic algorithm for feature detection
* Camera motion solving. scene orientation
- New constraints to "link" scene objects with solved motions from clip:
* Follow Track (make object follow 2D motion of track with given name
or parent object to reconstructed 3D position of track)
* Camera Solver to make camera moving in the same way as reconstructed camera
This commit NOT includes changes from tomato branch:
- New nodes (they'll be commited as separated patch)
- Automatic image offset guessing for image input node and image editor
(need to do more tests and gather more feedback)
- Code cleanup in libmv-capi. It's not so critical cleanup, just increasing
readability and understanadability of code. Better to make this chaneg when
Keir will finish his current patch.
More details about this project can be found on this page:
http://wiki.blender.org/index.php/User:Nazg-gul/GSoC-2011
Further development of small features would be done in trunk, bigger/experimental
features would first be implemented in tomato branch.
- Remove the overly-conservative use of libmv's re-track tracker. The re-track
tracker would take a normal tracker such as TRKLT or KLT or pyramid KLT, and
track from frame 1 to 2, then back from the position found in 2 back to 1.
Then, when the reverse-track doesn't match the original track with high
precision, the track is considered "failed". This is a good approach for
fully automatic reconstruction, but is too conservative for supervised
tracking.
The retrack-tracker will return when fully automatic tracking is added.
- Always solve for (dx, dy) in the TRKLT loop even if the linear system is
ill-conditioned. The client (Blender in this case) can still use the solved
position, even though it is less reliable.
- Expose the pyramid level setting to the tracking UI when in KLT tracking
mode. While it was tempting to hide this detail from the user, in reality it
does more harm than good, since the way tracking fails depends on the pyramid
level. For now, exposing the pyramid details is a good compromise.
- Move the settings for the tracking algorithm, including search window,
tracking algorithm, pyramid levels, etc, into the track object instead of a
global movie clip object.
===========================
DeBalie commit (main changes only):
- Code cleanup
- Selectable tracking graph curves and curve knots
- Graph curve and curve knots can be deleted now
- Fixed wrong write when linking libraries
(error is caused by hardcoded cound of linkable ID blocks)
- Fixed for KLT tracker when using keyframe adjustment
- Upgrade Eigen2 library to Eigen3
- Upgrade colamd library and placed in extern/ so other libraries from extern/ can use it
NOTE: With previous version of Eigen (3.0.1) it was necessary to define
EIGEN_DONT_ALIGN_STATICALLY macro to make it compilable on windows 32bit.
After latest upgrade it seems to be unnecessary (at least when was testing libmv),
so i removed that defines which can reduce speed and lead to other problems.
===========================
Initial implementation of graph view for movie tracking data.
Used the same UI-side approach as preview region for sequencer:
create region for graph-related information inside clip editor.
It's easier and nicer than trying to hack graph editor which is
currently designed to work with AnimData only. Trying to make it
more abstract to deal with any kind of data doesn't seem be real
benefit for now.
Currently supported displaying per-frame average error and
selected tracks' movement speed (pixels per frame).
Additional changes:
- Collect per-frame average error after solving.
- Split space clip drawing code into different files.
- Added per-frame average solving error.
===========================
Some improvements for feature detectors:
- Sort features by score when filtering features by
distance using FAST library.
- Added option to place markers only in areas outlined
by grease pencil.
===========================
Added option to choose which method to use for feature detector: FAST or Moravec
Moravec was supposed to be more "stable", but it collected worse feedback.
before returning back to FAST detector added option to easier toggle between
different detector to compare it's result and find out if we can leave only FAST.
===========================
Support for (un)distortion of images with overscan. Needed for
easier keeping this up-to-date until proper overscan support is
implemented in renderer. Not exposed into UI yet at all.
===========================
Fixed threading issues used to happen when compositor tree
and rendering happened in the same time. Problem was caused
by cached camera intrinsics stored in MovieTracking structure
and access to which wasn't thread-safe.
Now each movie distoriton mode stores it's own camera intrinsics
in it's storage which makes compositor (un)distoriton be totally
thread-safe and this also makes compositor tree faster when
(un)distortion happens on images with different resolution.
- Upgrade Recast library to latest portable version
- Implement recast_qsort based on FreeBSD qsort.c to have
portable thread safe quick sort for use in conversion routine.
- Better default value for the Build Navigation Mesh operator
===========================
- Merge Movie Distort and Movie Undistort nodes into one node
called Movie Distortion where action (distort/undistort is specified).
- Implemented more proper distortion/undistortion for scaled images.
NOTE: Please, delete distortion nodes with current blender first
before opening files with blender versions from this commit/
===========================
Lookup grids used for image distortion/undistortion are now
caching and re-building if distortion settings are changing.
This speedups compositor node for cases distortion model isn't
changing, but first run and runs after changing distortion
coefficients is still slow.
===========================
- If render size is set to "Full Render" and undistorted render
is enabled, do on-fly undistortion so distortion coefficients
can be visually verifed before baking.
- Made slight change in libmv-side to survive with large distortion
coefficients. Hope this change is fine.
- Some declarations after statement left.
- Do not use static inline functions in MOD_navmesh. It produces errors
with msvc and not sure it's actually helps -- optimizer should
make it inlined itself.
===========================
- Do not disable track when tracking frame-by-frame and tracking
threshold became bad.
- Show anchored image in track preview widget.
- Do not show search area for non-selected and disabled markers.
- Keep anchor constant position when sliding offset parameters in panel.
- Re-enabled occasionally disabled openmp for tracking.
- Renamed clearing operator so now buttons are more clear.
- Updated eigen to the very recent version.
NOTE: I had to enable static aligning again due to it gave crashes
when tracking on my new laptop. I'm not sure it'll work fine
on another systems.
and it's callback.
Also do not use char constants like 'NAVM' which is casting to int.
And added defautl section to switch in KX_NavMeshObject::DrawNavMesh.
- rearrange structs to work for 64bit
- define all vars before goto's
- ifdefs for qsort_r/qsort_s
- dont cast pointers to int only for NULL checks
- dont printf STR_String directly, get the char pointer from it
also minor change to gpu py module, no need to pass empty tuple to PyObject_CallObject, can just be NULL
Change OURPLATFORM from "linux<major_version>" to simple "linux".
Since new policy for linux kernel versions that major version in
platform doesn't make much sense for building rules so the same
rules could be used for both of linux2 and linux3 now/
Tested on both of linux2 and linux3 systems.
===========================
Bundle new libmv to fix crash caused by some errors in detector.
This commit makes SAD tracking much slower because now it supports
afgine tracking. Not implemented in Blender yet to keep commits
more clear.
===========================
Stop SAD tracker when error becomes too high.
Maximal allowed error value is controlled in Tracking Settings panel.
I haven't been able to find value which will work for most of cases
so it's now quite stupid value of 0. Currently values of 2-6 gives
quite nice result, but it depends on footage.
Upcoming changes from libmv side related on returning normalized SAD
would help here. Until this, please set max_sad manually.
===========================
- Bundling new libmv, issues with undefined uint and C99 functions should gone.
- Changes to Detect operator to match new API.
===========================
- Bundle new version of libmv.
- Use image from nearest track's keyframe as reference for tracking.
This should reduce drifting.
- Added option to switch to new SAD tracker.
This tracker doesn't support pattern with variable size (yet?)
and always uses pattern 16x16px.
Tracker could be choosed in Tracking Settings panel.
===========================
- Distortion/undistortion were accidentally swapped in both of grease
pencil calibration and grid.
This was fixed but distortion coefficients should be re-adjusted.
There are some issues with high distortion coefficients but it
came from libmv and until it'll be fixed there nothing really
can be done here.
- Fixed displayed aspect ratio for muted footage when pixel/display
aspect ratio is differ from 1.0 or proxy size is not Full Render,
- Added c-api for image distortion/undistortion, Not used yet.
===========================
Bundling new version of libmv. It's repo is ready for
bundling again, some patches which were applied on our
side are in libmv repo now.
This new version of libmv also contains patch from John Carpenter
which makes reconstruciton a bit more "stable" -- some kind
of fallback algorithm.
===========================
- Added function to calculate per-track average error.
Made this in libmv c-api, probably should be ported
to libmv pipeline.
- MovieTrackingTrack now holds average reprojection error
which is displayed in Active Track panel and information
text in clip editor (if displaying of names are enabled).
- Make "Clean Tracks" take average error on account.
===========================
- Made naming in libmv-api more uniform.
- Move aspect ration detection of clip to movieclip.c.
- Remove unused width and height from camera intrinsics function.
- Reconstruction should now deal correct with aspect ratio.
===========================
- Fixed occasional crash caused by conflicting access
to non-threadsafe moviecache. Added lock on movie clip
ibuf acquire level.
- A bit nicer feedback from libmv when doing reconstruction.
Now if all tracks and frames were reconstructed average
error would be reported in "notification area".
If there's something failed to be reconstructed warning
message would appear and failed items would be printed to
the console.
===========================
- glog should no flood into logs files now.
- Request from Francois - changes in sliding:
* Anchor point is for sliding the whole marker.
* Square on pattern moves pattern and search relative
to anchor point.
* Square on search moves search only.
- Bundles in 3d viewport are colored by track custom color.
===========================
- Fixed discovered bug with selecting hidden marker areas with mouse.
- Refactor of context structure used for 2D tracking:
* Tracker object is now per-track. This allows to use
different pyramid levels for different tracks and
now search area resizing shouldn't make tracking less
accurate.
* This is also be used for new optimized libmv API.
* This allowed to use OpenMP to track different markers in
separated threads.
This allowed to reach quite cool speedup for multi-core CPU.
===========================
- Fixed crash when holding down S and R keys.
- Fixed deleting of first marker.
- Tracking should now work fine with float buffers.
- Added option to show distortion grid. It's most probably
temporary solution until [auto]calibration tools aren't
merged.
This grid defines straight lines on the image.
===========================
- Bundle re-newed libmv library.
- Update API in libmv-capi to match new library.
- Initial implementaition of feature detection.
- Fixed bug with incorrect user sync when tracking
for first frame.
===========================
Fix for camera solver on windows.
There were two problems:
- Static align in Eigen should be also disabled for libmv.
- SSBA doesn't work correct for windows when optimization is
turned on.
There's no other way rather than disable optimization for
the whole extern/libmv. This leads to 3-4x slowdown, but it's
really the only thing we could do now.
Keir is going to drop SSBA out and replace it with Bundler,
so it shouldn't be a major problem.
===========================
- Changed libmv api to use doubles instead of floats.
No real benefit rather than keeping API uniform.
- Optimized reconstructed camera search. It's optimized for
playback, not random access.
- Added option to show projection of bundles into footage.
To see bundles "Show Bundles" from Display panel should
be enabled. Used very rough limit of 3 px to consider projection
is fine. Colors are still hard-coded. Not sure it could be useful
to make them configurable.
- Added option to mute footage. It could be useful to check
if markers/bundles are moving smoothly.
- Added selector for focal length units.
===========================
- 32 bit linux compilation should be fixed now.
- Camrea reconstruction data should be better now
when there's no reconstructed cameras.
- Implemented "Set Origin" operator
- Added "Specials" W-key menu for SpaceClip.
Supports such operators:
* Enable track
* Disable track
* Set origin
===========================
- ColaMD moved from OpenNL to extern/.
It'll be needed for libmv. Also, it's a bit updated from
year 1999 to 2007.
Need to be tested for regressions.
- Updated bundling script for libmv. Now it uses fuller
subset of this library.
- Bundled new libmv.
- Request from Keir: add command line argument to toggle logging
stuff on. Currently, if Blender is launched with -d argument
libmv would start printing logging messages. There's no
argument to increase verbosity, but there's API in libmv-capi,
so it'll be easy to add.
- Finally fixed crash when ibuf is acquiring with user=NULL.
- Added ActiveClip property to the scene. This clip is used
as default value for new match-moving constraints.
- Added some flags to Display panel of View3D. Related on
displaying match-moving stuff.
- Internal change: bundles data moved inside to MovieTrackingTrack.
- Initial implementation of 3d reconstruction.
- Added constraint "Camera Solver". This constraint is supposed
to be used to make camera follow the reconstructed camera path.
- Added "reference" property to "Follow Track" constraint.
Now object could be "parented" to 2D track position or to
3D bundle position.
The very quick guide:
To use reconstruction you should have footage with tracked markers,
choose two keyframes in "Tracking settings" panel. There should be
quite noticeable parallax effect between this two frames. This
is used to initialize reconstruction stuff.
Camera data (focal length and optical center) should be filled in
"Camera Data" panel. Optical center is often the center of image,
so it'll be filled in automatically.
You should also set values for undistortion (K1, K2 and K3). Currently,
there's no any visualization for this parameters and approach of
"change value -> reconstruct -> see what've changed" is the only way
for now.
Libmv team is working on auto-calibration tool, so it should be
easier to gather this coefficients in nearest (i hope) future.
There's also no scene orientation stuff.
Basic workflow:
- Open footage.
- Set markers and track them.
- Fill in camera data and keyframes.
- Hit "Solve Camera" button.
- Add "Camera Solver" constraint to camera in scene.
- Choose movieclip in that constraint.
- To see bundles in 3D viewport active clip should be set
in scene buttons.
===========================
- Internal changes:
* Fixed bundle.sh script to bundle libmv: it was generating
incorrect CMakeLists header.
* Rename CLIP_OP_delete to CLIP_OT_delete_track.
* Fixed crash when BKE_movieclip_acquire_ibuf is called
with NULL user.
* Made MovieTrackingMarker structure 8-bytes aligned
* Use writestruct rather than writedata for track markers.
This allows to change MovieTrackingMarker safely.
- Added "Delete Marker" operator which deletes marker for
current frame only. Hotkey is Shift-Del.
- Added MovieClip.size and MovieClip.resolution RNA properties.
Use last accessed frame number to get ImBuf from sequence.
- Added different actions for "Clear Path" operator:
* Clear path up to current frame.
* Clear the whole path.
* Cleat remained part of path (for frames after current).
- Changed buttons order and icons for tracking. New order is:
* Track frame backwards.
* Track sequence backwards.
* Track sequence forwards.
* Track frame forwards.
NOTE: this breaks compatibility with existing .blend files again,
but it should be much easier to change data structures without
breackaged in the future.
===========================
- Corrected copyrights in my new files header.
- Added debug option to dump as PNG image content of search
areas tracking between which was failed.
- Removed internal tracking settings like pyramid level and
tolerance. Weren't useful neither for me nor for artists.
- Fixed bug in BKE_tracking_get_marker which could lead
to failure of getting marker for current frame when
there's marker for requested frame.
- Fixed bug with disappearing markers after tracking for
cases when marker was added at frame different from
tracking start frame and tracking start frame is
equal to tracking end frame.
- Stop tracking when no markers could be tracked.
- Changed marker selection rules:
* If marker isn't selected, all it's areas are getting
selected with mouse.
* If marker is selected and selection type doesn't have
"extend" mode (SHIFT isn't holded down) the nearest
to mouse cursor area would be selected. All the reast areas
would loose selection.
- Limit number of frames which would be used in "Track Markers"
operator. So now you could easily track along 10/20/etc frames.
- Change scene current frame after "Track Markers" operator.
- Implemented speed limitors. Now tracking could happen:
* As fast as possible
* With reatime speed (scene FPS)
* With half of realtime speed
* With quarter of realtime speed.
- Got rid of orig_user in MovieTrackingContext and user
in TrackMarkersJob. This prevents crashes when user
joins some space to SpaceClip from which tracking was started.
- Made keyframes on path bigger and do not draw keyframes for
non-selected markers.
TODO: need to get rid of storing main, scene and screen
in TrackMarkersJob. This is needed to set scene's
current frame after tracking (such behavior is comfortable
for artists) but this could lead to crash if scene is
getting removed when tracking job is running.
Render animation operator also stores scene and main,
so such solution could be fine for first time before
we've got something smarter.
===========================
- itasc adopted for Eigen3 library.
It compiles well, but need deeper testing for regressions.
- Removed Eigen2 library.
- Added settings to tracker which could be changed from UI.
- Pattern area is now affects on tracker.
Currently libmv supports square patterns which are centered
to marker's position. Maximal pattern dimensions is sending
to libmv as pattern size. Would be changed when libmv would
support non-centered and non-square patterns.
- Fixed bug with syncing pattern's flags when tracking.
- Current frame in cache line became a bit more visible.
It's useful for me to when debugging.
- Changed behaviour of "Add Marekr" operator: not it's non-modal
and places marker on mouse position at click.
- Added macro "Add Marekr and Move" which is used to place
markers from toolbar button.
- Added some utility functions to get image buffer under search
and pattern area which also returns relative position of
marker center for this images.
Generated images are more "correct" from coords rounding
POV, but re-calculation of marker position back to
frame coords is more complicated and not implemented yet,
so old not very accurate logic is still used.
- Added preview widget with content of pattern area.
NOTE: files saved in previous versions of this branch could
easily crash on tracking. Use "Reset To Settings" button
from Tracking Settings before tracking selected markers
for such files.
TODO:
- Implement adjusting marker position from marker's
preview widget.
- We've got an idea of sliding marker after click before
releasing mouse button.
===========================
- Added missed stub for blenderplayer, so it should
compile again fine.
- libmv is added to extern/.
Script for bundling needed subset of sourcses from
libmv repo is included there.
- Eigen3 is also added to extern/.
libmv depends on Eigen3 (which isnt't compatible with Eigen2
from API point of view). So both of versions are going to
be in worktree for time (until code which used Eigen2 would be
ported to Eigen3).
- Added some functions to libmv-capi, so some things from
this library could already be used.
- Added the very basic implementation of 2D tracking.
It should be treated as draft for tracking architecture
which probably would be cleaned up, changed or whatever else.
Current implementation was supposed to demonstrate that our
structures and understading is correct to interact with libmv easily.
blender_add_lib now takes a separate include argument to suppress warnings in system includes (mostly ffmpeg & python).
also only build wm_apple.c on apple+carbon configuration.
discussed with Janne, Ton, Nathan and we agreed this kind of change at least needs discussion with module owners.
Its also too close to release to be making these kinds of changes.
commands used:
# reverse merge
svn merge -r36073:36072 .
# for some reason this gave a lot of property changes
svn revert `svn st | grep "^ M" | awk '{print $2}'`
# reverse merging didn't work here, removing while dir.
svn rm extern/eltopo/
# manually fixed conflict in
# ./source/blenderplayer/CMakeLists.txt
#
# also manually removed 2 lines from
# ./CMakeLists.txt
Plugged the eltopo library into the cloth solver.
I was playing with it earlier, and it's so easy to
use I decided to quickly put it in (trunk's) cloth.
See http://www.cs.ubc.ca/labs/imager/tr/2009/eltopo/eltopo.html
. The authors are on the bleeding edge of continuous collision
detection (one of them did ILM's cloth sim).
I
don't really have to time to plug it into softbody, particles,
bullet, fluid, etc, but doing so would be pretty straightforward.
I'll leave that up to someone else.
To use, turn on USE_ELTOPO (in cmake) or WITH_BF_ELTOPO in scons.
add PhysicsConstraints.exportBulletFile(char* fileName) python command
I'll be checking the bf-committers mailing list, in case this commit broke stuff
scons needs to be updated, I'll do that in a second.