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
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
2015-01-20enum instead of #define for cloth vertex flags.Lukas Tönne
2015-01-20Removed block matrix indices storage from ClothSpring struct.Lukas Tönne
This is not necessary: the implicit solver data can keep track instead of how many off-diagonal matrix blocks are in use (provided the allocation limit is calculated correctly). Every time a spring is created it then simply increments this counter and uses the block index locally - no need to store this persistently.
2015-01-20Cloth solver data for edit mode is unused, removed it.Lukas Tönne
2015-01-20Completed the implementation of bent rest shapes for hair.Lukas Tönne
Basically follows the Pixar approach from "Artistic Simulation of Curly Hair".
2015-01-20Target calculation for local non-straight rest shapes.Lukas Tönne
This is more involved than using simple straight bending targets constructed from the neighboring segments, but necessary for restoring groomed rest shapes. The targets are defined by parallel-transporting a coordinate frame along the hair, which smoothly rotates to avoid sudden twisting (Frenet frame problem). The rest positions of hair vertices defines the target vectors relative to the frame. In the deformed motion state the frame is then recalculated and the targets constructed in world/root space.
2015-01-20Proper implementation of angular bending springs including jacobianLukas Tönne
derivatives for stabilization. The bending forces are based on a simplified torsion model where each neighboring point of a vertex creates a force toward a local goal. This can be extended later by defining the goals in a local curve frame, so that natural hair shapes other than perfectly straight hair are supported. Calculating the jacobians for the bending forces analytically proved quite difficult and doesn't work yet, so the fallback method for now is a straightforward finite difference method. This works very well and is not too costly. Even the original paper ("Artistic Simulation of Curly Hair") suggests this approach.
2015-01-20Basic solver result feedback from the mass-spring (cloth/hair) solver.Lukas Tönne
This returns a general status (success/no-convergence/other) along with basic statistics (min/max/average) for the error value and the number of iterations. It allows some general estimation of the simulation quality and detection of critical settings that could become a problem. Better visualization and extended feedback can follow later.
2015-01-20Simple initial implementation of angular bending springs.Lukas Tönne
These are much better suited for creating stiff hair. The previous bending springs are based on "push" type spring along the hypothenuse of 3 hair vertices. This sort of spring requires a very large force in the direction of the spring for any angular effect, and is still unstable in the equilibrium. The new bending spring model is based on "target" vectors defined in a local hair frame, which generates a force perpendicular to the hair segment. For further details see "Artistic Simulation of Curly Hair" (Pixar technical memo #12-03a) or "A Mass Spring Model for Hair Simulation" (Selle, Lentine, Fedkiw 2008) Currently the implementation uses a single root frame that is not yet propagated along the hair, so the resulting rest shape is not very natural. Also damping and derivatives are still missing.
2015-01-20Renamed functions to make them explicitly refer to cloth, and split theLukas Tönne
create/free functions for solver data off from the cloth solver.
2015-01-20Moved the cloth solver code into a new subfolder/library inside BlenderLukas Tönne
code. The implicit solver itself should remain agnostic to the specifics of the Blender data (cloth vs. hair). This way we could avoid the bloated data conversion chain from particles/hair to derived mesh to cloth modifier to implicit solver data and back. Every step in this chain adds overhead as well as rounding errors and a possibility for bugs, not to speak of making the code horribly complicated. The new subfolder is named "physics" since it should be the start of a somewhat "unified" physics systems combining all the various solvers in the same place and managing things like synchronized time steps.
2015-01-20Moved collision response into the main cloth sim source file and fixedLukas Tönne
some coordinate transform issues. Collision response should be regarded as part of the dynamics system instead of the basic collision detection.
2015-01-20Added new data in the cloth modifier for hair root information.Lukas Tönne
This will allow us to implement moving reference frames for hair and make "fictitious" forces optional, aiding in creating stable and controllable hair systems. Adding data in this place is a nasty hack, but it's too difficult to encode as a DM data layer and the whole cloth modifier/DM intermediate data copying for hair should be removed anyway.
2015-01-20Use the S matrix of the modifier CG algorithm for implementing collisionLukas Tönne
responses. The S matrix together with the z Vector encodes the degrees of freedom of a colliding hair point and the target velocity change. In a collision the hair vertex is restricted in the normal direction (when moving toward the collider) and the collision dynamics define target velocity.
2015-01-20Preparation for collision code fixing.Lukas Tönne
Instead of handling contact tests and collision response in the same function in collision.c, first generate contact points and return them as a list, then free at the end of the stepping function. This way the contact response can be integrated into the conjugate gradient method properly instead of using the hackish and unstable double evaluation that is currently used.
2015-01-20Some initial collision code, without actual response forces still.Lukas Tönne
This is still using the old BVH tree collision methods to generate contact points, similar to what cloth does. This should be replaced by a Bullet collision check, but generating contacts in this way is easier for now, and lets us test responses and stability (although in more complex collision cases the BVH method fails utterly, beside being terribly inefficient with many colliders).
2015-01-20New voxel texture mode "Hair", for displaying the internal hair volumeLukas Tönne
structure as a texture. This is mostly a debugging feature that may be removed again later.
2014-04-04Cloth: replace EdgeHash with EdgeSetCampbell Barton
2014-02-06Patch T31269: Add sewing seams to cloth simulationDaniel Genrich
Description: -------------------------- Use loose edges marked as seams as sewing springs. Usage: ------------------------- All this patch does is set the rest length to 0 and the stiffness to 1 for springs for loose edges marked as seams so that during the cloth simulation they will be brought together. Example Video: ------------------------- http://www.youtube.com/watch?v=-Y_bC0gjoM0 Original Patch by thesleepless (+ git patch by codemanx) Thank you!
2013-08-24cloth was using edgehash not quite correctly:Campbell Barton
- was ordering vertex args unnecessarily. - was adding the same edges multiple times into the edgehash.