Commit Graph

163 Commits

Author SHA1 Message Date
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
ed1cda9a6c style cleanup 2012-09-30 06:12:47 +00:00
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
42dd135be0 style cleanup: multiple statements on a single line in interface code. 2012-09-16 23:40:03 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
a73dd3476e Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.

This introduces two configurable color spaces:

- Input color space for images and movie clips. This space is used to convert
  images/movies from color space in which file is saved to Blender's linear
  space (for float images, byte images are not internally converted, only input
  space is stored for such images and used later).

  This setting could be found in image/clip data block settings.

- Display color space which defines space in which particular display is working.

  This settings could be found in scene's Color Management panel.

When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.

This conversions are:

- View, which defines tone curve applying before display transformation.
  These are different ways to view the image on the same display device.
  For example it could be used to emulate film view on sRGB display.

- Exposure affects on image exposure before tone map is applied.

- Gamma is post-display gamma correction, could be used to match particular
  display gamma.

- RGB curves are user-defined curves which are applying before display
  transformation, could be used for different purposes.

All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.

This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).

Some technical notes:

- Image buffer's float buffer is now always in linear space, even if it was
  created from 16bit byte images.

- Space of byte buffer is stored in image buffer's rect_colorspace property.

- Profile of image buffer was removed since it's not longer meaningful.

- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
  to support other spaces, but it's quite large project which isn't so
  much important.

- Legacy Color Management option disabled is emulated by using None display.
  It could have some regressions, but there's no clear way to avoid them.

- If OpenColorIO is disabled on build time, it should make blender behaving
  in the same way as previous release with color management enabled.

More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management

--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
c92ab5c3ef code cleanup: use rect size macros 2012-08-21 20:34:05 +00:00
abd031bb4e code cleanup: use rect size macros for the interface 2012-08-21 19:35:06 +00:00
3090ae35af fix [#32374] Curve compositor UI drawing glitch
copy the curve for the compositor.
2012-08-21 15:14:29 +00:00
3204731209 code cleanup: don't use magic numbers for curve flag & use bool args for curvemapping_changed() 2012-08-21 08:47:36 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
26f073b327 macros for rectangle center and size 2012-08-20 15:29:02 +00:00
d36da8a8a1 style cleanup 2012-08-19 10:41:27 +00:00
6972e19fd5 code cleanup:
- replace (strcmp(vfont->name, FO_BUILTIN_NAME) == 0)  with  (BKE_vfont_is_builtin(vfont)).
- reduce some double promotions.
2012-08-03 22:12:57 +00:00
ab0fa803cd image histogram/sample line couldn't show HDR colors. now allow zooming the view to see colors up to 10.0 2012-07-26 09:06:23 +00:00
7cc5af4ef3 minor refactor for rect functions. more consistent naming. 2012-07-15 00:29:56 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
4da7b7089d make hue correct grid more faded out. 2012-06-25 19:42:10 +00:00
226c86ae58 use an inline function for rgb -> bw conversion. 2012-06-22 07:49:44 +00:00
cb22a49893 color backdrop on hue balance was misleading (shifted to the right) 2012-06-21 15:42:08 +00:00
038e5b2255 hue correct node: draw hsv backdrop with full alpha. 2012-06-21 15:03:30 +00:00
5def0b6c55 display a sample line in the hue correct, handy to sample the image to know what to change 2012-06-21 14:37:56 +00:00
c896a99213 sampling the node backdrop now draws a line in the curve (as it did in 2.4x). 2012-06-21 14:12:14 +00:00
f5f25b81e8 style cleanup:
also fix for building ghost test and fix double free in one of the tests
2012-06-17 09:58:26 +00:00
f0c724219d Internal refactoring of tracking module, should be no functional changes
- Re-arrange functions in headers and implementation file to make them
  more grouped by entity they're operating with. Also order of functions
  in implementation file should match order of functions in header for
  easier navigation.

- Rename some functions to match conventions of naming public functions.
- Some code de-duplication, still some room for improvements tho.
- Split main 2D tracking functions into smaller steps to make it more clear.

Accidentally OpenMP was disabled in some of previous commits, re-enable it.
2012-06-15 11:03:23 +00:00
552887251f Masking support for motion tracks
Added option to use Grease Pencil datablock as a mask for pattern
when doing motion tracking. Option could be found in Tracking Settings
panel.

All strokes would be rasterized separately from each other and every
stroke is treating as a closed spline.

Also added option to apply a mask on track preview which is situated
just after B/B/W channel button under track preview.
2012-06-12 11:13:53 +00:00
51d9bf725d style cleanup 2012-06-10 19:59:02 +00:00
25bb441301 Planar tracking support for motion tracking
===========================================

Major list of changes done in tomato branch:

- Add a planar tracking implementation to libmv
  This adds a new planar tracking implementation to libmv. The
  tracker is based on Ceres[1], the new nonlinear minimizer that
  myself and Sameer released from Google as open source. Since
  the motion model is more involved, the interface is
  different than the RegionTracker interface used previously
  in Blender.

  The start of a C API in libmv-capi.{cpp,h} is also included.

- Migrate from pat_{min,max} for markers to 4 corners representation

  Convert markers in the movie clip editor / 2D tracker from using
  pat_min and pat_max notation to using the a more general, 4-corner
  representation.

  There is still considerable porting work to do; in particular
  sliding from preview widget does not work correct for rotated
  markers.

  All other areas should be ported to new representation:

  * Added support of sliding individual corners. LMB slide + Ctrl
    would scale the whole pattern
  * S would scale the whole marker, S-S would scale pattern only
  * Added support of marker's rotation which is currently rotates
    only patterns around their centers or all markers around median,

    Rotation or other non-translation/scaling transformation of search
    area doesn't make sense.

  * Track Preview widget would display transformed pattern which
    libmv actually operates with.

- "Efficient Second-order Minimization" for the planar tracker

  This implements the "Efficient Second-order Minimization"
  scheme, as supported by the existing translation tracker.
  This increases the amount of per-iteration work, but
  decreases the number of iterations required to converge and
  also increases the size of the basin of attraction for the
  optimization.

- Remove the use of the legacy RegionTracker API from Blender,
  and replaces it with the new TrackRegion API. This also
  adds several features to the planar tracker in libmv:

  * Do a brute-force initialization of tracking similar to "Hybrid"
    mode in the stable release, but using all floats. This is slower
    but more accurate. It is still necessary to evaluate if the
    performance loss is worth it. In particular, this change is
    necessary to support high bit depth imagery.

  * Add support for masks over the search window. This is a step
    towards supporting user-defined tracker masks. The tracker masks
    will make it easy for users to make a mask for e.g. a ball.

    Not exposed into interface yet/

  * Add Pearson product moment correlation coefficient checking (aka
    "Correlation" in the UI. This causes tracking failure if the
    tracked patch is not linearly related to the template.

  * Add support for warping a few points in addition to the supplied
    points. This is useful because the tracking code deliberately
    does not expose the underlying warp representation. Instead,
    warps are specified in an aparametric way via the correspondences.

- Replace 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
        * Perspective

  * 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.

- Add light-normalized tracking

  Added the ability to normalize patterns by their average value while
  tracking, to make them invariant to global illumination changes.

Additional details could be found at wiki page [2]

  [1] http://code.google.com/p/ceres-solver
  [2] http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Motion_Tracker
2012-06-10 15:28:19 +00:00
219eca0f51 mango request - add alpha to histogram & sample line. 2012-06-10 12:33:27 +00:00
5e29381825 mango request
- optionally display the histogram as lines (not filled areas).
- expand the enum for faster access.
- keep the sample line displayed after doing the line sample (running again clears).
2012-06-10 12:09:25 +00:00
Lukas Toenne
32fe2d71fc Theme color for frame nodes. The alpha value from this theme color is also used when drawing frames with a custom color (which is just RGB). 2012-06-01 14:42:21 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
599d213115 style cleanup: line length and ensure some macros error when not ending with ';' 2012-05-17 07:59:25 +00:00
a0ce240de9 Renamed "fake" OpenGL identifiers.
Any identifier that looks like an OpenGL identifier, but isn't, causes a false alarm by the glreport.py tool.  Most of these were in comments so I just rephrased the comments.  There were a couple of static functions/macros that were easy enough to rename.  Only the glTexco and glIndex fields of the DMVertexAttribs struct was public and had non-local uses.
2012-05-04 11:50:11 +00:00
56d22457e3 Fix #31266: Track preview is shifted by half a pixel 2012-05-03 10:40:04 +00:00
a6ebffe182 style cleanup: interface 2012-03-30 01:51:25 +00:00
b8a71efeba style cleanup: follow style guide for/with/if spacing 2012-03-24 07:52:14 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
2f348d8b5d style cleanup: mainly for mesh code, also some WM function use. 2012-03-24 02:51:46 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
c21c58f44c style cleanup, also remove unused externs. 2012-03-11 19:09:01 +00:00
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
deec4ce0bc Code Cleanup: avoid double promotion. 2012-02-04 06:55:29 +00:00
e86c5f858c Fix #30020: Movie Clip Editor Crashed with panel size changed 2012-01-30 09:05:26 +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
0e4e608b71 Camera tracking: fixes for preview widget
- Clamping of image on boundaries now happens nicely
- Looks like to prevent dark edges on image boundary when doing
  bicubic interpolation, margin should be 3px. Maybe somebody can verify this?
2012-01-09 20:19:07 +00:00