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
2021-01-11Cloth: add a vertex group setting to exclude from object collision.Alexander Gavrilov
This can be useful as a workaround on the boundary with the pinned vertices in some situations among other things, and completely copies the existing design of the self collision vertex group setting. Differential Revision: https://developer.blender.org/D10043
2021-01-11Collision: allow disabling collision without removing the modifier.Alexander Gavrilov
The `object.collision.use` flag was treated as a redundant marker of the existence of the modifier, going as far as adding/removing it when the value was changed, which is not actually very useful. Removing the modifier loses its position in the stack, and requires a dependency graph rebuild. It feels it may be a legacy flag? What would be useful however is the ability to toggle collisions dynamically without removing the modifier. This patch adjusts the code to keep the modifier when the flag is disabled, and add it if it doesn't exist when the flag is enabled. The modifier now checks the flag at the start and quickly exits after cleaning up stale data. The redesigned setting is exposed in the UI. Collisions can't be disabled by simply using the modifier enable flags because the modifier merely saves a snapshot of the mesh at a certain point of the modifier stack for other objects to use, and thus has to be able to clear the stale data. Differential Revision: https://developer.blender.org/D10064
2021-01-08Cloth: completely exclude fully pinned triangles from collision.Alexander Gavrilov
Currently such triangles are effectively already excluded, because the calculated forces are not applied to pinned vertices. However these forces are still being computed, which is inefficient. This adds an early check for triangles where all vertices are pinned during BVH overlap detection, which significantly speeds up certain use cases with big fully pinned areas that happen to overlap a collider. In case of self collision both triangles must be fully pinned to exclude safely, because the computation is symmetric and handles two triangles at the same time. Differential Revision: https://developer.blender.org/D10041
2020-09-09Cleanup: reduce variable scopeJacques Lucke
2020-08-20Fix cloth collision clamp having no effectGermano Cavalcante
And rename `cloth_selfcollision_impulse_vert` to `cloth_collision_impulse_vert`
2020-08-13Fix hair collision error introduced in recent commitGermano Cavalcante
2020-08-13Cleanup: Silence some arithmetic overflow warningsGermano Cavalcante
2020-08-13Cleanup: Move definitions of some variables closer to their useGermano Cavalcante
2020-08-13Cleanup: move assignment out of loopGermano Cavalcante
2020-08-13Cleanup: Rename variable 'cloth1' to 'cloth'Germano Cavalcante
2020-08-12Clenaup: Deduplicate cloth collision codeGermano Cavalcante
And do the clamp by vertex instead of triangle.
2020-08-10Fix T78113: Random explosions of cloth with self collisionGermano Cavalcante
The problem is caused by a lack of prediction in the `isect_line_segment_tri_v3` that incorrectly confirms some intersections of coplanar segments to the triangle. The solution is to use another algorithm to detect intersections. This also resulted in a slight improvement in the performance: - 1min 17sec to 1min 6sec in my test file Differential Revision: https://developer.blender.org/D8500
2020-07-06Cleanup: Use the BLI_edgehash API in the sewing simulation of clothsGermano Cavalcante
Also remove the code in the ghash that is no longer used. This change simplifies the existing code. Differential Revision: https://developer.blender.org/D8219
2020-05-08Fix T76498: Refactoring - Rename BKE modifiers funtionsAntonio Vazquez
2020-04-03Code Quality: Replace for loops with LISTBASE_FOREACHDalai Felinto
Note this only changes cases where the variable was declared inside the for loop. To handle it outside as well is a different challenge. Differential Revision: https://developer.blender.org/D7320
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-09Cleanup: Replace ABS/SQUARE/CUBE with function callsSergey Sharybin
While it might be handy to have type-less functionality which is similar to how C++ math is implemented it can not be easily achieved with just preprocessor in a way which does not have side-effects on wrong usage. There macros where often used on a non-trivial expression, and there was at least one usage where it was causing an actual side effect/bug on Windows (see change around square_f(sh[index++]) in studiolight.c). For such cases it is handy to have a function which is guaranteed to have zero side-effects. The motivation behind actually removing the macros is that there is already a way to do similar calculation. Also, not having such macros is a way to guarantee that its usage is not changed in a way which have side-effects and that it's not used as an inspiration for cases where it should not be used. Differential Revision: https://developer.blender.org/D7051
2020-03-02Fix T65568: sewing and self collision issueIsh Bosamiya
As explained in T65568 by @LucaRood, the self collision system should exclude triangles that are connected by sewing springs. Differential Revision: https://developer.blender.org/D6911
2020-02-13Cloth: Optimization in self collisionmano-wii
15% to 20% improvement in cloth simulation performance with self-collision. The idea is to reduce the number of collisions computed by avoiding overlapping tris with the same combination (eg. (1,0) and (0,1)). Reviewed By: zeddb Differential Revision: https://developer.blender.org/D6474
2020-01-16Integrate hair collisions with cloth collisionLuca Rood
This integrates hair collisions with the new cloth collision system, greatly improving reliability, and reducing the amount of hair-specific code paths in the cloth code. The removes all the point constraint based collision stuff, instead implementing segment impulse based collisions, using the same collision response code as the normal cloth solver. The hair system can now also collide with the emitter if it is a collision object. Reviewed By: mano-wii, Sebastian Parborg Differential Revision: https://developer.blender.org/D6545
2020-01-12Fix T71620: broken particle collisions due to rB0666ece2e2f9Luca Rood
An optimisation in the collision system for cloth (static collisions), broke the particle collisions, as they take motion into account. This restores the moving BVH required for the particle collisions, while keeping the optimisation for the cloth collisions. Reviewed By: mano-wii Maniphest Tasks: T71620 Differential Revision: https://developer.blender.org/D6560
2019-09-14Cleanup: use const args, variablesCampbell Barton
2019-09-07Cleanup: use post increment/decrementCampbell Barton
When the result isn't used, prefer post increment/decrement (already used nearly everywhere in Blender).
2019-07-30BLI_task: Cleanup: rename some structs to make them more generic.Bastien Montagne
TLS and Settings can be used by other types of parallel 'for loops', so removing 'Range' from their names. No functional changes expected here.
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-22Cleanup: style, use braces for blenkernelCampbell Barton
2019-04-18Cleanup: comment blocksCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-17DNA: rename dup_* struct members to instance_*Campbell Barton
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-20Cleanup: remove all BLI_utiledefines' ugly vectorial macros.Bastien Montagne
Not only were those often making doublons with already existing BLI_math's stuff, but they were also used to hide implicit type conversions... As usual this adds some more exotic inlined vector functions (one of the rare cases where I really miss C++ and its templates... ;) ).
2019-01-06Cleanup: add trailing commas to structsCampbell Barton
Needed for clang formatting to workaround bug/limit, see: T53211
2018-10-18Fix use of uninitialized variable in cloth collision.Brecht Van Lommel
No apparent difference in a quick simulation, but was clearly wrong.
2018-10-17Cleanup: remove some #if 0 blocksJacques Lucke
Reviewers: brecht, campbellbarton Differential Revision: https://developer.blender.org/D3802
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-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-14Cloth: Improve UILuca Rood
This reorganizes the cloth UI, and changes some of the behaviour to be more reasonable. Changes included here: * Reorganized cloth panels * Improved some tooltips * Removed `vel_damping` option * Removed cloth pinning checkbox * Removed stiffness scaling checkbox * Separated shrinking from sewing * Separated self collisions from object collisions Reviewed By: brecht Differential Revision: http://developer.blender.org/D3691
2018-09-03Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/blenkernel/intern/collision.c
2018-09-03ClosthCollision: fully avoid computing BVHTree when we have no collision ↵Bastien Montagne
objects to test against. Followup to rBc6bbe6c5aac29, much more elegant solution to the problem. ;)
2018-09-03Merge branch 'master' into blender2.8Bastien Montagne
2018-09-03Fix (unreported) potentially giant memory leak in Cloth collision solver.Bastien Montagne
Not freeing its BVHTree in case there were no collision objects, could quickly lead to hundreds of MB of memleak!
2018-08-29Cleanup: rename files from group to collection to match contents.Brecht Van Lommel
2018-06-25Physics: update softbody and dynamic paint to get colliders from depsgraph.Brecht Van Lommel
Because looping over the scene is unsafe and slow.
2018-06-25Cleanup: refactor depsgraph physics API functions.Brecht Van Lommel
2018-06-25Fix use of non-evaluated collision and effector objects.Brecht Van Lommel
Only enabled objects in the view layer should be used, while temporarily hidden objects should still have an effect.
2018-06-25Cleanup: rename object base flags to be more clear.Brecht Van Lommel
2018-06-25Depsgraph: cache collision relations, for performance and stability.Brecht Van Lommel
Same reasoning as effector relations in earlier commit.
2018-06-22Cloth: Move away from scene stored in cloth modifier dataSergey Sharybin