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
2020-10-01Cleanup: Use DNA defaults for cloth modifierHans Goudey
Followup for rB8398050695 This requires moving a few enum definitions to DNA instead of BKE, and adding default definitions for the two structs the cloth modifier where the cloth modifier stores its settings. The defaults are also reordered to be consistent with the order of each item in the struct.
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
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-06-12Cloth: implement support for a hydrostatic pressure gradient.Alexander Gavrilov
When a fluid is put under influence of gravity or acceleration, it forms an internal pressure gradient, which causes observable effects like buoyancy. Since now cloth has support for simulating pressure changes caused by fluid compression or expansion, it makes sense to also support the effects of gravity. This is intended for better simulation of objects filled or surrounded by fluids, especially when constrained by collisions or pinned vertices, and should result in more realistic shapes. Obviously, this doesn't actually simulate fluid dynamics; instead it is assumed that the fluid immediately adapts to changes in the shape or acceleration of the object without friction or turbulence, and instantly reaches a new static equilibrium. Differential Revision: https://developer.blender.org/D6442
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-14Cleanup: sort file lists & struct declatationsCampbell Barton
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
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-20Cleanup: unused enumsCampbell Barton
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
2019-12-09Add the ability to create internal springs to the cloth simSebastian Parborg
This can be used to make closed surfaces behave more like a soft body. Reviewed By: Jacques Lucke Differential Revision: http://developer.blender.org/D5788
2019-12-04Add cloth pressure vertex group and unlock cloth shrink values rangeSebastian Parborg
Introduced a way to specify cloth pressure force influence with a vertex group. This will allow users to only have pressure affect certain parts of the mesh. In addition to this, the "shrink factor" is now also unlocked to allow negative values and thus allowing the cloth mesh to grow as well. Reviewed By: Jaques Lucke Differential Revision: http://developer.blender.org/D6347
2019-11-27Fix T30941: Add cloth air pressure simulationSebastian Parborg
This adds some basic simulation of internal air pressure inside of closed cloth mesh objects. Reviewed By: Jacques Lucke Differential Revision: http://developer.blender.org/D5473
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-06-26Cleanup: un-wrap lines in headers, use doxy commentsCampbell 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-04-02Cleanup: empty expression statement warningCampbell Barton
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-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-02Cleanup: remove author/date info from doxy headersCampbell Barton
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-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-26Cleanup: redundant definesCampbell Barton
Comment or remove unused defines.
2018-10-23Cleanup: rename 'dm' -> 'me' for 'Mesh' typesCampbell Barton
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-08-31Cloth: Implement angular bending springsLuca Rood
This implements angular bending springs for cloth simulation. This also adds shearing springs for n-gons. This angular spring implementation does not include Jacobian matrices, as the springs can exist between polygons of different vertex counts, rendering their relationships asymmetrical, and thus impossible to solve with the current implementation. This means that the bending component is solved explicitly. However, this is usually not a big problem, as bending springs contribute less to instability than structural springs. The the old linear bending model can still be used, and is the default for existing files, to keep compatibility. However, the new angular bending model is the default for any new simulation. This commit makes small breaking changes, in that shearing springs are now created on n-gons (also in linear bending mode), while n-gons were previously ignored. Reviewed By: brecht Differential Revision: http://developer.blender.org/D3662
2018-08-31Cloth: Componentize forcesLuca Rood
This separates cloth stiffness and damping forces into tension, compression, and shearing components, allowing more control over the cloth behaviour. This also adds a bending model selector (although the new bending model itself is not implemented in this commit). This is because some of the features implemented here only make sense within the new bending model, while the old model is kept for compatibility. This commit makes non-breaking changes, and thus maintains full compatibility with existing simulations. Reviewed By: brecht Differential Revision: http://developer.blender.org/D3655
2018-06-29Merge branch 'master' into blender2.8Campbell Barton
2018-06-29Cleanup: trailing newlinesCampbell Barton
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
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-05-22Modifiers: ported Cloth DerivedMesh → MeshSybren A. Stüvel
The modifier is still quite slow; this could be due to caches being written to a CoW datablock instead of the original one. More investigation is needed.
2018-04-16Depsgraph: remove EvaluationContext, pass Depsgraph instead.Brecht Van Lommel
The depsgraph was always created within a fixed evaluation context. Passing both risks the depsgraph and evaluation context not matching, and it complicates the Python API where we'd have to expose both which is not so easy to understand. This also removes the global evaluation context in main, which assumed there to be a single active scene and view layer. Differential Revision: https://developer.blender.org/D3152
2018-04-05Remove workspace object mode, reverts changes w/ 2.8Campbell Barton
This caused too many problems syncing object modes with multiple objects/windows/workspaces, see: D3130 for details.
2018-02-06Object Mode: use eval_ctx for modifiers_isCorrectableDeformedCampbell Barton
Some other minor changes from D3037 as well
2017-08-16Pass EvaluationContext instead of bContextCampbell Barton
2.8x branch added bContext arg in many places, pass eval-context instead since its not simple to reason about what what nested functions do when they can access and change almost anything. Also use const to prevent unexpected modifications. This fixes crash loading files with shadows, since off-screen buffers use a NULL context for rendering.
2017-07-21Pass EvaluationContext argument everywhereLuca Rood
Note that some little parts of code have been dissabled because eval_ctx was not available there. This should be resolved once DerivedMesh is replaced.
2017-03-23Cloth refactor: Remove goal springs and some other cleanupLuca Rood
This removes the goal springs, in favor of simply calculating the goal forces on the vertices directly. The vertices already store all the necessary data for the goal forces, thus the springs were redundant, and just defined both ends as being the same vertex. The main advantage of removing the goal springs, is an increase in flexibility, allowing us to much more nicely do some neat dynamic stuff with the goals/pins, such as animated vertex weights. But this also has the advantage of simpler code, and a slightly reduced memory footprint. This also removes the `f`, `dfdx` and `dfdv` fields from the `ClothSpring` struct, as that data is only used by the solver, and is re-computed on each step, and thus does not need to be stored throughout the simulation. Reviewers: sergey Reviewed By: sergey Tags: #physics Differential Revision: https://developer.blender.org/D2514
2016-07-30Cloth: option to use dynamic base meshCampbell Barton
This adds the ability for cloth simulations to respect changes in the underlying mesh. So you can for instance, animate shape keys, armatures, or add any deformation modifiers (above the cloth modifier). This is mainly useful for (but not limited to) cartoon animations, where your character might stretch or change shape, and you want the clothes to follow accordingly. D1903 by @LucaRood
2016-05-06Cloth: Change ClothVertex::xrest to actually store the rest position.Alexander Gavrilov
Originally the value was only needed when building the springs, so a pointer to the input data was somewhat ok. However, recalculating spring length dynamically requires keeping the actual value around.
2015-08-06Cleanup: whitespace, unused varCampbell Barton
2015-07-31Replace MFace w/ vert-tri's for collision modifierCampbell Barton
Note that the collision modifier doesn't have any use for Loop indices, so to avoid duplicating the loop array too, MVertTri has been added which simply stores vertex indices (runtime only).
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-03-01Use the old double-step collision method only for cloth.Lukas Tönne
This method does not work for hair anyway. Even though hair collision needs work at this point, it's still better than nothing.
2015-01-20Improved force field effects on hair strands.Lukas Tönne
The previous calculation was modulated with the angle between the wind direction and the segments, which leads to very oscillating behavior. Now the formula includes an estimate for the geometric cross section of a hair segment based on the incident angle and the hair thickness (currently just the particle size). This gives a more stable behavior and more realistic response to wind. Conflicts: source/blender/blenkernel/intern/particle_system.c source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20Randomness factor for hair bending stiffness.Lukas Tönne
This helps to create some variation in a hair system, which can otherwise become very uniform and boring. It's yet another confusing setting in a system that should have been nodified, but only option for now (broken windows ...) Conflicts: source/blender/blenkernel/intern/particle_system.c source/blender/physics/intern/BPH_mass_spring.cpp
2015-01-20Cleanup: Removed the unnecessary cloth solver abstraction (there is onlyLukas Tönne
one solver anyway), and split some particle cloth functions for clarity. Conflicts: source/blender/blenkernel/BKE_particle.h source/blender/blenkernel/intern/particle_system.c source/blender/blenloader/intern/versioning_270.c source/blender/makesdna/DNA_particle_types.h source/blender/makesrna/intern/rna_particle.c