Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-11-21Cleanup: warningsCampbell Barton
2018-11-21Fix T57884: Triangle count is incorrect when above around 2 billionPhilipp Oeser
Maniphest Tasks: T57884 Differential Revision: https://developer.blender.org/D3962
2018-11-20Merge branch 'master' into blender2.8Sergey Sharybin
2018-11-20Task scheduler: Optimize parallel loop over listsSergey Sharybin
The goal is to address performance regression when going from few threads to 10s of threads. On a systems with more than 32 CPU threads the benefit of threaded loop was actually harmful. There are following tweaks now: - The chunk size is adaptive for the number of threads, which minimizes scheduling overhead. - The number of tasks is adaptive to the list size and chunk size. Here comes performance comparison on the production shot: Number of threads DEG time before DEG time after 44 0.09 0.02 32 0.055 0.025 16 0.025 0.025 8 0.035 0.033
2018-11-17BLI: Math: Add normal_float_to_short_v4Clément Foucault
2018-11-14Merge branch 'master' into blender2.8Campbell Barton
2018-11-14Cleanup: comment block tabsCampbell Barton
2018-11-08Cleanup, spellingSergey Sharybin
2018-11-07Merge branch 'master' into blender2.8Campbell Barton
2018-11-07Cleanup: use BLI_compiler_compat.h for BLI_INLINECampbell Barton
2018-11-06Shrinkwrap: new mode that projects along the target normal.Alexander Gavrilov
The Nearest Surface Point shrink method, while fast, is neither smooth nor continuous: as the source point moves, the projected point can both stop and jump. This causes distortions in the deformation of the shrinkwrap modifier, and the motion of an animated object with a shrinkwrap constraint. This patch implements a new mode, which, instead of using the simple nearest point search, iteratively solves an equation for each triangle to find a point which has its interpolated normal point to or from the original vertex. Non-manifold boundary edges are treated as infinitely thin cylinders that cast normals in all perpendicular directions. Since this is useful for the constraint, and having multiple objects with constraints targeting the same guide mesh is a quite reasonable use case, rather than calculating the mesh boundary edge data over and over again, it is precomputed and cached in the mesh. Reviewers: mont29 Differential Revision: https://developer.blender.org/D3836
2018-11-06BLI_kdopbvh: add an option to use a priority queue in find_nearest.Alexander Gavrilov
Simple find_nearest relies on a heuristic for efficient culling of the BVH tree, which involves a fast callback that always updates the result, and the caller reusing the result of the previous find_nearest to prime the process for the next vertex. If the callback is slow and/or applies significant restrictions on what kind of nodes can qualify for the result, the heuristic can't work. Thus for such tasks it is necessary to order and prune nodes before the callback at BVH tree level using a priority queue. Since, according to code history, for simple find_nearest the heuristic approach is faster, this mode has to be an option.
2018-11-06Implement an Armature constraint that mimics the modifier.Alexander Gavrilov
The main use one can imagine for this is adding tweak controls to parts of a model that are already deformed by multiple other major bones. It is natural to expect such locations to deform as if the tweaks aren't there by default; however currently there is no easy way to make a bone follow multiple other bones. This adds a new constraint that implements the math behind the Armature modifier, with support for explicit weights, bone envelopes, and dual quaternion blending. It can also access bones from multiple armatures at the same time (mainly because it's easier to code it that way.) This also fixes dquat_to_mat4, which wasn't used anywhere before. Differential Revision: https://developer.blender.org/D3664
2018-11-06Cleanup: rename fast-heap -> heap-simpleCampbell Barton
In general prefer API names don't start with adjectives since it causes grouping of unrelated API's for completion.
2018-11-06Cleanup: move fast heap into own source & headerCampbell Barton
2018-11-06Cleanup: styleCampbell Barton
2018-11-05BLI_heap: implement a limited but faster version of heap.Alexander Gavrilov
If the user only needs insertion and removal from top, there is no need to allocate and manage separate HeapNode objects: the data can be stored directly in the main tree array. This measured a 24% FPS increase on a ~50% heap-heavy workload. Reviewers: brecht Differential Revision: https://developer.blender.org/D3898
2018-11-05BLI_kdopbvh: reduce branching in calc_nearest_point_squared.Alexander Gavrilov
This lets the compiler use min/max instructions for 4.5% FPS improvement in Shrinkwrap to Nearest Surface Point.
2018-11-05BLI_heap: optimize heap_swap, heap_down and heap_up.Alexander Gavrilov
The index field of nodes is supposed to be its actual index, so there is no need to read it in swap. On a 64-bit processor i and j are already in registers, so this removes two memory reads. In addition, cache the tree pointer, use branch hints, and put the most frequently accessed 'value' field at 0 offset. Produced a 20% FPS improvement for a 50% heap-heavy workload.
2018-11-04BLI_heap: add an API function to directly read the top node value.Alexander Gavrilov
It is very commonly needed in loop conditions to check if the items in the heap are good enough to continue.
2018-11-04Merge branch 'master' into blender2.8Campbell Barton
2018-11-04Fix ghash masking out upper bits on 64bit systemsCampbell Barton
The code this was taken from assumes a 'size_t' result, which isn't the case here. In practice the bucket distribution wasn't bad, even so this was a nop so best fix.
2018-11-01Fix T57529: 2D image paint fill tool not taking into account alpha.Brecht Van Lommel
2018-10-28BLI: Add comment about to orthogonalize_m3/4Clément Foucault
2018-10-19Partial revert '#if 0' cleanupCampbell Barton
Partially revert 41216d5ad4c722e2ad9f15c968af454fc7566d5e Some of this code had comments to be left as is for readability, or comment the code should be kept. Other functions were only for debugging.
2018-10-18Cleanup: Remove more #if 0 blocksJacques Lucke
Continuation of https://developer.blender.org/D3802 Reviewers: brecht Differential Revision: https://developer.blender.org/D3808
2018-10-12DRW: Add DRW_shgroup_create_sub to create children shgroupClément Foucault
This makes is easy to create nested drawcalls that will inherit all the parents properties. This is usefull if only a few uniforms changes for that drawcall.
2018-10-11Merge branch 'master' into blender2.8Campbell Barton
2018-10-11Fix incorrect strncpy useCampbell Barton
Didn't ensure null terminated.
2018-10-01BLI: Add mul_v2_v2v2 functionClément Foucault
2018-10-01BLI_math: add `isect_seg_seg_v3`mano-wii
2018-10-01BLI_math: add `isect_seg_seg_v3` function and use in the cloth collision ↵mano-wii
algorith. In my tests a 4% improvement in performance was achieved by simulating a square cloth over the cube.
2018-09-29A new function to move list at the beginning of another listAntonioya
This is a change of the BLI_movelisttolist but in reverse order.
2018-09-27UI: draw mono icons with button type text color, instead of area text color.Brecht Van Lommel
2018-09-26Cloth: Collision improvementsLuca Rood
This commit includes several performance, stability, and reliability improvements to cloth collisions. Most notably: * The implementation of a new self-collisions system. * Multithreading of collision detection. * Implementation of single sided collisions and normal overrides. * Replacement of the `plNearestPoints` function from Bullet with a dedicated solution. Further, this also includes several bug fixes, and algorithmic improvements. Reviewed By: brecht Differential Revision: http://developer.blender.org/D3712
2018-09-26Fix misleading field naming.Alexander Gavrilov
This is not any kind of length, it is the number of true values.
2018-09-20Cleanup: styleCampbell Barton
2018-09-19BLI_utildefines: rename pointer conversion macrosCampbell Barton
Terms get/set don't make much sense when casting values. Name macros so the conversion is obvious, use common prefix for easier completion. - GET_INT_FROM_POINTER -> POINTER_AS_INT - SET_INT_IN_POINTER -> POINTER_FROM_INT - GET_UINT_FROM_POINTER -> POINTER_AS_UINT - SET_UINT_IN_POINTER -> POINTER_FROM_UINT
2018-09-19Merge branch 'master' into blender2.8Campbell Barton
2018-09-19Cleanup: missed when using doxy groupsCampbell Barton
2018-09-19Cleanup: replace comment headings w/ doxy groupsCampbell Barton
Also minor changes: - Remove unused headers. - rename SimpleExprParseState -> ExprParseState - rename max_ops -> ops_count_alloc Was misleading since maximums are often limits which can't be exceeded.
2018-09-19Cleanup: BLI_expr_pylike argument orderingCampbell Barton
- Order array length after the array. - Put return argument last.
2018-09-19Cleanup: rename BLI_simple_expr -> BLI_expr_pylike_evalCampbell Barton
Simple isn't a good prefix for library names since lots of unrelated modules could be called 'simple'. Include 'py' in module name since this is a subset of Python, one of the main motivations for this is to be Python like/compatible.
2018-09-19Cleanup: styleCampbell Barton
2018-09-18Application Templates: make templates more prominent in the UI.Brecht Van Lommel
The goal here is to make app templates usable for default templates that we can ship with Blender. These only have a custom startup.blend currently and so are quite limited compared to app templates that fully customize Blender. But still it seems like the same kind of concept where we should be sharing the code and UI. It is useful to be able to save a startup.blend per template, and I can imagine some scripting being useful in the future as well. Changes made: * File > New and Ctrl+N now list the templates, replacing a separate Application Templates menu that was not as easy to discover. * File menu now shows name of active template above Save Startup File and Load Factory Settings to indicate these are saved/loaded per template. * The "Default" template was renamed to "General". * Workspaces can now be added from any of the template startup.blend files when clicking the (+) button in the topbar. * User preferences are now fully shared between app templates, unless the template includes a custom userpref.blend. I think this will be useful in general, not all app templates need their own keymaps for example. * Previously Save User Preferences would save the current app template and then Blender would start using that template by default. I've disabled this, to me it seems it was unintentional, or at least not clear at all that saving user preferences also makes the current Differential Revision: https://developer.blender.org/D3690
2018-09-18Support evaluating simple driver expressions without Python interpreter.Alexander Gavrilov
Recently @sergey found that hard-coding evaluation of certain very common driver expressions without calling the Python interpreter produces a 30-40% performance improvement. Since hard-coding is obviously not suitable for production, I implemented a proper parser and interpreter for simple arithmetic expressions in C. The evaluator supports +, -, *, /, (), ==, !=, <, <=, >, >=, and, or, not, ternary if; driver variables, frame, pi, True, False, and a subset of standard math functions that seem most useful. Booleans are represented as numbers, since within the supported operation set it seems to be impossible to distinguish True/False from 1.0/0.0. Boolean operations properly implement lazy evaluation with jumps, and comparisons support chaining like 'a < b < c...'. Expressions are parsed into a very simple stack machine program that can then be safely evaluated in multiple threads. Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D3698
2018-09-05Merge branch 'master' into blender2.8Campbell Barton
2018-09-05Cleanup: styleCampbell Barton
2018-09-05Merge branch 'master' into blender2.8Campbell Barton
2018-09-05Fix T54152: --env-system-scripts fails on win32Ray Molenkamp