Commit Graph

2765 Commits

Author SHA1 Message Date
Sergey Sharybin 6fbc4186fd Assorted camera tracker improvements
- 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.
2011-11-14 06:41:23 +00:00
Bastien Montagne fea58943ec Moving all node angle-type values to radians. This also fixes [#29151] rotate node wrong input (mixing up radians and degrees).
Warning!

Angles in nodes have just been moved to consistant Radians values (ANGLE subtype of RNA Float property). You will still see them as degrees in the GUI, though, unless you chose otherwise in Scene properties, Units panel.

Conversion from degrees to radians for old files is obviously done at loading time, but if you use a mixed pipeline of trunk and releases, be carefull!

Loading a 2.60.4 file (or higher) into any previous version of Blender, your angles in nodes will have odd values (well, radians interpreted as degrees)!

And if you save such file in a pre-2.60.4 version, the angle node values will be converted again when loaded in Blender 2.60.4 or higher...

This affects following nodes:
* Compo: Rotate, Defocus, ChromaMatte, Glare and DirectionalBlur
* Shader: Mapping
And all future code using the TexMapping struct’s rotation part (its rot memember is now in radians).
2011-11-13 18:03:27 +00:00
Thomas Dinges 2414abae06 Ocean Modifer:
* Reuse the placeholder "eModifierType_EmptySlot" for the new Ocean modifier.

WARNING: 
DO NOT use Ocean modifier in trunk with a revision below this commit! Files won't load then!!
2011-11-13 13:04:46 +00:00
Lukas Toenne 11c83d8432 Ocean Sim modifier patch
by Matt Ebb, Hamed Zaghaghi

This adds a new Modifier "Ocean" to simulate large-scale wave motion.
Details can be found in the wiki documentation [1], the project homepage [2] and the patch tracker [3]

The modifier is disabled by default for now. To enable it, the WITH_OCEANSIM (cmake) / WITH_BF_OCEANSIM (scons) flags have to be set. The code depends on fftw3, so this also has to be enabled.

[1]
http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Simulation/Ocean

[2]
http://www.savetheoceansim.com

[3]
http://projects.blender.org/tracker/?group_id=9&atid=127&func=detail&aid=28338
2011-11-13 12:17:27 +00:00
Campbell Barton e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
Miika Hamalainen 4ef2089097 Dynamic Paint:
* Renamed "Sharp" proximity falloff to "Constant".
* Added a new "Negate Volume" option for "Volume + Proximity" brush.
* Possible fix for random particle clipping errors.
2011-11-11 10:46:26 +00:00
Campbell Barton dfc30d1229 quiet some warnings from recent merge 2011-11-10 12:28:26 +00:00
Miika Hamalainen afeb0eeaf0 Dynamic Paint merge:
Commit Dynamic Paint from "soc-2011-carrot" branch into trunk.

End-user documentation:
http://wiki.blender.org/index.php/Doc:2.6/Manual/Modifiers/Simulation/Dynamic_Paint

GSoC wiki page:
http://wiki.blender.org/index.php/User:MiikaH/GSoC-2011-DynamicPaint
2011-11-10 10:24:34 +00:00
Miika Hamalainen 1b4a54ad73 Merge with trunk r41701 2011-11-09 15:46:53 +00:00
Brecht Van Lommel 28ee0f9218 Texturing: texture and 3d view draw type changes, these should only have any
effect for a render engine using new shading nodes. In short:

* No longer uses images assigned to faces in the uv layer, rather the active
  image texture node is what is edited/painted/drawn.
* Textured draw type now shows the active image texture node, with solid
  lighting.
* Material draw mode shows GLSL shader of a simplified material node tree,
  using solid lighting.
* Textures for modifiers, brushes, etc, are now available from a dropdown in
  the texture tab in the properties editor. These do not use new shading nodes
  yet.

http://wiki.blender.org/index.php/Dev:2.6/Source/Render/TextureWorkflow
2011-11-08 13:07:16 +00:00
Brecht Van Lommel db75cc4cde Nodes: add cycles shader nodes, these will only be available to render engines
that use the new shading nodes system. Documentation:

http://wiki.blender.org/index.php/Doc:2.6/Manual/Render/Cycles/Nodes
2011-11-08 11:38:16 +00:00
Campbell Barton f086201518 cmake & pep8 tidy up, also some style edits.
remove unneeded collection length function.
2011-11-08 01:32:34 +00:00
Brecht Van Lommel f3407e7d60 Textures/Shaders: extend TexMapping to include projection options, and add a
ColorMapping struct for color manipulation of textures. These will be the
standard built-in texture node options for manipulating the incoming texture
coordinate and outgoing color.
2011-11-07 17:35:20 +00:00
Miika Hamalainen edec46b0a6 Merge with trunk r41625 2011-11-07 16:36:49 +00:00
Joshua Leung 2b6e4f2422 Bugfix [#29064] armature with curve contraint - crash
Spline IK and Auto-IK working together on the same bone chain could
crash due to the somewhat hacky way that they were sharing the same
list for the "iktree" forest. Resolved by doing what I should have
done from the beginning, and made Spline-IK save its ik chains off
into a separate list.

While this fixes the crash, it might be worth investigating outright
disabling this from working in this case, since it can be a bit
confusing to have it appear to not work.
2011-11-07 13:25:17 +00:00
Sergey Sharybin 27d42c63d9 Camera tracking integration
===========================

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.
2011-11-07 12:55:18 +00:00
Joshua Leung 440c1c2c17 As discussed on the mailing list, removing the non-functional,
incompatible, and unmaintainable Time Offset cruft.

- Slow Parenting lives another day (just), although it now carries
appropriate cautionary disclaimers. It's only really for the Game
Engine nowadays, as that's the only place where it can possibly work
with any reliability.
- "Animation Hacks" panel is now "Relations Extras". I could've merged
the two panels, though I figured these options weren't that frequently
used to justify taking up screen-space by default along with the panel
2011-11-06 05:46:45 +00:00
Campbell Barton 2a7ade9de2 remove po/ since the workflow for translations uses branches which isnt that useful to have within blenders source dir.
For now treat translations as binary files - just access from 'release/datafiles/locale'
2011-11-05 14:26:18 +00:00
Miika Hamalainen 2ed6f077b3 Merge with trunk r41545 2011-11-05 08:04:49 +00:00
Campbell Barton 62f2218554 macro formatting & remve some unused code. 2011-11-05 05:44:52 +00:00
Campbell Barton cc7e79f372 more DNA object edits
- remove 'path' pointer, wasnt used anywhere.
- remove comments about what each game flag 'bit' does, these are defines now.
- reduce the size of DupliObject 8 bytes.
also commented some of the struct members.
2011-11-05 03:02:55 +00:00
Campbell Barton b0adf37ef9 - view bounds (now split from collision bounds) was still being used for bge physics in one place, comparison was incorrectly treating it as a flag too.
- cleanup Object struct - remove pad and unused flags, convert some shot's to char's, saving 24 bytes.
2011-11-05 02:30:25 +00:00
Sergey Sharybin 77934cfaed Fix #28865: Draw_bounds_type does not display Polyhedron or Capsule types
Separate DNA properties for bounding box used for bounding box display
in 3d viewport and bounding box used for collision detection in game engine.

Bumped subversion for proper updating old files to new system, but it
need more complex testing.
2011-11-04 15:53:34 +00:00
Sergey Sharybin 4ea816837d Configurable sensor size:
- Added support of variable size sensor width and height.
- Added presets for most common cameras, also new presets can be defined by user.
- Added option to control which dimension (vertical or horizontal) of sensor
  size defines FOV. Old behavior of automatic FOV calculation is also kept.
- Renderer, viewport, game engine and collada importer/exporter should
  deal fine with this changes. Other exporters would be updated soon.
2011-11-04 14:36:06 +00:00
Brecht Van Lommel 723e129252 Depsgraph/Python: callbacks and properties to detect datablock changes
* Adds two new python handlers: scene_update_pre() and scene_update_post()
  These run before and after Blender does a scene update on making modifications
  to the scene.
* Datablocks now have an is_updated property. This will be set to true in the
  above callbacks if the datablock was tagged to be updated. This works for the
  most common datablocks used for rendering: object, material, world, lamsp,
  texture, mesh, curve.
* Datablock collections also have an is_updated property. If this is set, it
  means one datablock of this type was added, removed or modified. It's also
  useful as a quick check to avoid looping over all datablocks.
* RenderEngine.view_update() can also check these properties, for interactive
  viewport rendering.

http://wiki.blender.org/index.php/Dev:2.6/Source/Render/UpdateAPI
2011-11-02 20:56:52 +00:00
Brecht Van Lommel 30f1f28a8a Nodes: add support for shader nodes on world and lamps, in addition to materials.
The internal render engine does not support them, and they are not accesible in
the UI yet, but cycles will use them.
2011-11-02 18:55:32 +00:00
Brecht Van Lommel 97a0ae3e1b RenderEngine api: support for viewport rendering, details here:
http://wiki.blender.org/index.php/Dev:2.6/Source/Render/RenderEngineAPI

* This adds a Rendered draw type in the 3D view, only available when
  the render engine implements the view_draw callback.
* 3D view now stores a pointer to a RenderEngine.

* view_draw() callback will do OpenGL drawing instead of the viewport.
* view_update() callback is called after depsgraph updates.
2011-11-02 18:20:53 +00:00
Thomas Dinges e1594ebb3c World Mist
* Removed some more unused stuff and marked as deprecated.
2011-11-02 14:36:21 +00:00
Thomas Dinges aa363800b0 World Stars:
* Remove remaining star color code, was unused. Marked as deprecated in DNA.
2011-11-02 14:28:16 +00:00
Campbell Barton 43e297c0c0 minor cleanup for weightpaint fill
- SCE_SELECT_FACE and SCE_SELECT_VERTEX are mutually exclusive, use a macro to get a single value from them.
- was allocating an array for no reason.
2011-11-02 00:51:21 +00:00
Thomas Dinges 32b34d631a Space types:
* Some cleanup, removed references to already deleted *_header.c files.
* Marked SpaceScript as deprecated and removed header. Will keep space for now though, as some script operators are there and Campbell might want to re-use the space later.
2011-11-01 20:14:58 +00:00
Thomas Dinges ea2f7c907c == Removal of SpaceSound ==
* Removed old, unused Space Sound space
* Removed data struct and Theme settings
* Old files with an open Audio window will be loaded as Info Space
2011-11-01 19:48:45 +00:00
Andrea Weikert 785de4cbfc == Cleanup of SpaceImasel ==
* removed struct for SpaceType and all usages
* SPACE_IMASEL in enum nees to be kept to identify it in old files
* it is replaces with SPACE_EMPTY on load, which is overridden by SPACE_INFO which has same struct members
* also removed theme settings
2011-11-01 18:27:09 +00:00
Campbell Barton bcdcbb65c1 macro to check if an object type supports vgroups 2011-11-01 06:45:36 +00:00
Miika Hamalainen 46ae692710 Merge with trunk r41342 2011-10-28 17:00:53 +00:00
Miika Hamalainen fae903e263 Dynamic Paint:
* More code changes pointed by Brecht in codereview.
* Some user interface improvements.
* Updating brush settings now also updates canvas preview.
2011-10-28 14:46:09 +00:00
Campbell Barton 699030ceb6 use const for readonly strings and set some functions to static 2011-10-27 14:41:26 +00:00
Guillermo S. Romero 82c84f4b58 Remove some more $Id$ that still were left after r41227 and r41228. 2011-10-23 19:01:59 +00:00
Guillermo S. Romero 6105199668 Remove the svn:keywords property. 2011-10-23 18:38:16 +00:00
Campbell Barton 4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
Miika Hamalainen d4541fd891 Merge with trunk r41197 2011-10-22 16:43:23 +00:00
Miika Hamalainen 30cba27987 Dynamic Paint:
* Some changes and cleanup pointed on the codereview.
2011-10-22 16:16:14 +00:00
Campbell Barton 4512f10db9 misc edits
- rename define DISABLE_SDL --> WITH_SDL (which was already used in some places)
- blenders interation preset was using orbit rather then turntable 3d view preference (different from factory defaults).
- tagged some unused rna args.
2011-10-20 00:19:21 +00:00
Lukas Toenne 0d7bd0f9b6 Adds an update flag to the bNode struct (similar to bNodeTree->update).
This prevents access to non-existent typeinfo during type initialization,
when node types have been removed and such nodes are deleted from older files.
All blenkernel functions now only set the node->update flag instead of directly
calling the update function.  All operators, etc. calling blenkernel functions
to modify nodes should make a ntreeUpdate call afterward (they already did that
anyway).

Editor/RNA/renderer/etc. high-level functions still can do immediate updates by
using nodeUpdate and nodeUpdateID (replacing NodeTagChanged/NodeTagIDChanged
respectively). These old functions were previously used only for setting
compositor node needexec flags and clearing cached data, but have become generic
update functions that require type-specific functionality (i.e. a valid typeinfo
struct).
2011-10-19 17:08:35 +00:00
Janne Karhu 8fae0c6d7e Particle dupliobject rotation changes:
There has been quite a bit of fuss about particle dupliobject rotation in 2.59, so here are some changes to make things work a bit more consistently and predictably in 2.60.

Much of the confusion has been about what the "Initial rotation" for particles actually means. Simply put it's just a vector that that the particles (and the dupliobjects) are aligned to and around which they can be rotated with the phase controls. I've now renamed these controls under a label "Rotation axis".

In 2.59 and previous versions the dupliobject's global x-axis was aligned to the particle rotation axis for non-hair particles. This meant that the object's own rotation (in addition to the particle rotation) could effect the dupliobjects' rotations. This old behavior can still be used with the "Rotation" option in the particle render panel when object/group is set as the visualization. This option is also activated automatically for old files to maintain backwards compatibility.

Now the default dupliobject rotations ignore the object's own rotation completely and align the object's tracking axis to the particle rotation axis. The tracking axis can be found under the Object tab -> Animation Hacks panel.

In 2.58 the way of calculating the rotation for hair didn't work as intended and enabled many non-functional combinations of options. For this reason I removed most of the rotation options for hair in 2.59. Now the options have been reimplemented better and the dupliobject's tracking axis is aligned to the hair direction by default (Rotation axis = Velocity / Hair). All the other axis options work too along with the phase controls.
2011-10-16 16:14:36 +00:00
Campbell Barton 7f4bb1f71b spelling corrections in comments and quiet warning 2011-10-15 14:14:22 +00:00
Campbell Barton f5f8292461 ensure BoneGroup names are kept unique. 2011-10-15 11:07:18 +00:00
Campbell Barton d893ac690c rename confusing constants (no functional change)
- OB_BOUND_POLYT --> OB_BOUND_CONVEX_HULL
- OB_BOUND_POLYH --> OB_BOUND_TRIANGLE_MESH
2011-10-13 22:14:41 +00:00
Miika Hamalainen 8be3249537 Merge with trunk r40991 2011-10-13 21:43:02 +00:00
Miika Hamalainen 8bf78d7f56 Dynamic Paint:
* Fix: Wave "timescale" also changed simulation behavior. Now different timescale values will lead to nearly identical results, just slower or faster.
* Added "Displace Factor" setting for vertex displace surfaces. You can use it to adjust final displace strength or use negative values to paint bumps.
* Added clamp/map value to wave image sequence output settings.
* RNA description tweaking.
* General code tweaking.
2011-10-13 20:00:22 +00:00