===========================
Basic implementation of scene orientation tools.
Most probably they'll eb re-exposed in UI soon.
- Implemented "Set Floor" operator.
It takes three
selected tracks which has got bundles and makes them
parallel to scene floor. One of selected bundles (active
bundle if presents) becomes scene origin, the other
becomes X-axis. Guessing of this bundles could fail.
Camera tries to be on positive Z half-space.
- Implemented "Set X-axis" operator.
This operator takes selected track with bundle and
aligns it along X-axis. This means rotation to make
Y-coord of this bundle 0 is applied.
- If camera has got a parent, then transformation would
be applient ot this parent, not to camera.
Useful for configuration when Empty is used to orient
camera and some related stuff in 3D space.
===========================
Previous solution to make bundles work for parented camera
wasn't very nice. It could totally confuse depsgraph and it's
quite slow.
Now i've implemented function where_is_object_mat which makes
almost the same as where_is_object_time, but it:
- Does not applies constraints.
- Assumes matrices for all dependencies are valie already
(handles by depsgraph).
- Doesn't make any changes to object itself or it's
dependencies.
===========================
Attempt to fix bundles position for case scene camera has got
other constraints than CameraSolver (mostly to support camera
parenting to other object for scene orientation).
Use a bit silly logic to calculate camera matrix to orient
bundles in 3d space: temporary disable all CameraSolver
constraints for camera, re-calculate object matrix, use it
to orient bundles and clear temporary flag.
This allows to parent both of camera and mesh created from
bundles to the same Empty object and both of bundles and
mesh vertices would have the same coords in camera space.
Also removed copying of location/rotation from camera to
bundles object in "Bundles to Mesh" operator.
===========================
- Fixed typo in RNA api for has_bundle.
- Added operator "Bundles To Mesh".
It was a request from Sebastian and this operator creates mesh
with vertices using bundles coords for vertices coordinates.
A bit limited atm -- new object can't be parented to camera,
so changing camera orientation would requite mesh re-creation.
===========================
- Fixed buf with under reference for Follow Track constraint.
- Get rid of BKE_movieclip_approx_size. Rather than accessing
to cache with previously set frame number it'll be easier to
store size of last accessed in "runtime" DNA.
===========================
- Reduced size of widget for camera focal length units.
Also changed labels to mm/px. Now it's much easier to read
values and titles here.
- Reordered settings in "Display" panel. Hopefully it's
now easier to read options here even when N-panel
isn't large enough.
- Fixed bug with "disappearing" labels from "Active marker" panel.
- If search areas are hidden and marker is disabled,
make pattern area red rather than displaying nothing for
this marker.
- Internal change: "show marker path" became "show track path".
- Lock shape of pattern to square by default. Control unlocks
this shape.
- Hitting escape when sliding cancels changes and stops sliding.
- Search areas are hidden by default now. No big benefit of
looking at them now after changing default settings to
2D tracker and pattern/search size.
- Both of Toolshelf and Properties panels are now visible
by default.
- Move keyframes from Properties panel to Toolshelf.
It is a key thing which makes reconstruction correct and
this options were too hidden and not so convenient to
use.
===========================
- Fixed incorrect usage of RNA structure for
CameraSolverConstraint.
- Fixed some typos in object_constraint which were
casting CameraSolver data to FollowTrack data.
- Tracking-related constraints now have got option
"Use Defult Clip" which makes them use clip set as
active for scene. Enabled by default.
- Set active blender camera focal length after reconstruction.
- Corrected offset of sequence images. Now first image from sequence
should be at scene frame 1.
===========================
- Minor spelling fixes.
- Do not draw bundles for hidden tracks in SpaceClip.
- Pressing SHift when sliding marker with mouse makes movenment more accurate.
- New default values for maerker pattern/search areas.
This makes tracking more stable.
- Pyramid level increased to 4. This would make tracking
of blured imaged more accurate.
===========================
- 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.
* Objects are now always rotated in the directions of the hair paths
* Secondary fix: particle size wasn't updated for hair particles, so dupliobject size couldn't be change after the hair was edited
* Noise is now considered an animated texture as it changes with every frame
* Converted a few places in particles code to use the particle system's own random table instead of BLI_frand.
===========================
- Added option to keep area equal width and height
when sliding it by mouse. Use "Control" button for this.
- Do now show sliding zones for disabled markers.
===========================
- Implemented hide/show track functionality.
- Small re-exposing Marker menu into UI.
Now it's called "Track". Added new operators there.
- Set reconstructed clip as active to scene.
===========================
Improved marker size/position adjustment:
- Rollback selection model so selected parts of marker
would be disabled only when "extension" click happens.
- Implemented left mouse sliding to adjust marker position
(using small square in left top corner of search area) and
size of pattern/search (using small triangle it right bottom
corner of marker)
It was a regression introduced in rev36301. Average normal calcilation
used to fail due to triangular faces which are too slight.
Do not use triangles with too small area for average normal calculation.
This patch attempts to clean up and document the GPU buffers
code. There are a few bug fixes as well.
Patch reviewed here: http://codereview.appspot.com/4631052/
Summary:
* Bugfix: make GPU_buffer_copy_normal convert from shorts to floats
correctly, also fixed the use of cached face normal CustomData.
* Bugfix: changed the `mat_nr' field of GPUBufferMaterial from char to
short.
* Changed color buffer setup to not alloc a temporary copy of color
data, just passes the MCol data in directly.
* Changed the GPU buffer pool code to make clearer what operates
specifically on the global pool.
* Lots of refactoring for GPU_drawobject_new; should operate mostly
the same (except got rid of one unecessary allocation), just split
into more functions and without macros now.
* Converted some #defines into enumerations.
* Made some stuff private, pulled out of header file.
* Deleted unused function GPU_buffer_pool_free_unused().
* Removed GPU_interleaved_setup and related #defines. (I think this
was used for editmode VBOs, but those were disabled.)
* Added lots of comments.
* Added a few comments in the code signed `--nicholas' to note places
where I am unsure about design or usage, would be good to address
these better.
* Code formatting changed to be more consistent with the rest of
Blender.
* Renamed some fields and variables to be more consistent with
Blender's naming conventions.
* Renamed some fields and variables to use more descriptive names,
e.g. renamed `redir' to `mat_orig_to_new'.
* Removed print outs with DEBUG_VBO -- don't feel too strongly about
this one, just not used elsewhere in Blender, could be easily added
back if others disagree though.
* Moved the PBVH drawing code down to the bottom of the file, before
was sitting in the middle of the other VBO code
===========================
- Made settings for tracking non-animatable.
- Fixed crash when enabling/disabling markers from
"Specials" menu.
- Translate all coords to make first reconstructed camera
be at position (0,0,0).
- Blender's camera now affects on reconstructed data.
Bundles are "parented" to active scene camera. So now
bundles' could could be scaled and rotated when camera
is rotating/scaling.
Softbody was still using a flag to determine if it should use the final or
deform derivedmesh, but this wans't exposed in the UI. Others systems use the
collision modifier, now softbody uses it also to get vertices and faces, but
with own collision code.
===========================
- 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.