Age | Commit message (Collapse) | Author |
|
|
|
Before the area calculated was for the resulting quad, not the triangle.
So just simply divide the result by 2.
|
|
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
|
|
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
|
|
When the result isn't used, prefer post increment/decrement
(already used nearly everywhere in Blender).
|
|
Some statements were split across multiple lines because of their
trailing comments.
In most cases it's clearer to put the comments above.
|
|
|
|
Automated using clang-tidy.
|
|
MSVC did not detect the usage of i in the openmp loops
and emitted a unused variable warning.
|
|
|
|
|
|
Previous cleanups didn't account for space after '#'.
|
|
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
|
|
Previously B-Bone deformation mapped every vertex to just one
B-Bone segment. This results in abrupt transformation differences
between the sides of each threshold plane, reducing the quality
of B-Bone deformation and making the use of shape keys impractical.
This commit replaces this approach with a linear blend between
the two closest segment transformations, effectively representing
the B-Bone as two weight-blended plain bones for each vertex.
In order to distribute the interpolation more evenly along the
bone, segment matrices for deformation are now computed at points
between the segments and at the ends of the B-Bone. The computation
also uses the true tangents of the Bezier curve for the orientation.
The nodes at the end of the bone require some special handling to
deal with zero-length Bezier handles caused by a zero ease value.
The Copy Transforms constraint now also smoothly interpolates
rotation and scaling along the bone shape when enabled.
The initial version of the patch was submitted by @Sam200.
Differential Revision: https://developer.blender.org/D4635
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
|
|
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.
|
|
|
|
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... ;) ).
|
|
|
|
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
|
|
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
|
|
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
|
|
Only the upper triangle of the block matrix is stored, thus when
executing operations on the lower triangle, each block must be
transposed. This transposition was not ocurring in the matrix-vector
multiplication function, which is fixed by this commit.
Reviewed By: brecht
Differential Revision: http://developer.blender.org/D3619
|
|
Remove from blender/nodes, collada, blenfont & render.
|
|
Strip unindented comment blocks - mainly headers to avoid conflicts.
|
|
|
|
|
|
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
|
|
The way cloth is coded, structural springs are only effective when stretched, while bending springs act only when shrunk. However, when cloth is exactly in its rest shape, neither have any effect, and effectively don't exist for the implicit solver.
This creates a stability problem in the initial frames of the simulation, especially considering that gravity seems to act so precisely that it doesn't disturb the strict equality of lengths, so in parts of the cloth this springless state can continue for quite a while.
Here is an example of things going haywire because of this and some suspicious logic in collision code acting together: {F314558}
Changing the condition so that structural springs are active even at exactly rest length fixes this test case. The use of >= is also supported by the original paper that the cloth implementation in blender is based on.
Reviewers: lukastoenne
Reviewed By: lukastoenne
Projects: #bf_blender
Differential Revision: https://developer.blender.org/D2028
|
|
|
|
Also added a DEBUG_TIME macro in the related files to comment time funcs out.
Reviewers: brecht
Reviewed By: brecht
Subscribers: brecht
Differential Revision: https://developer.blender.org/D1717
|
|
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).
|
|
This reverts commit 4c723eb80e299eb6ca11ad72b5fcbe8746c4a854.
|
|
as complicated as before cloth solver changes.
Still doesn't solve the collapsing cloth cube issue mentioned in T43406,
probably the bending springs work somewhat differently now.
|
|
This was disabled during the course of hair dynamics work. The cloth
collision solution is based on a secondary velocity-only solver step.
While this approach is usable in general, the collision response
calculation still does not work well for hair meshes. Better contact
point generation is needed here (Bullet) and preferably an improved
solver for unilateral constraints.
|
|
|
|
|
|
This way it doesn't have to be stored as DNA runtime pointers or passed
down as a function argument. Currently there is now no property or
button to enable debugging, this will be added again later.
|
|
|
|
approach does not work very well.
Using a cross section estimate still causes large oscillations due to
varying hair force based on angles. It also requires a sensible hair
thickness value (particle radius) which is difficult to control and
visualize at this point.
The new model is based purely on per-vertex forces, which seems to be
much more stable. It's also somewhat justified by the fact that each
hair vertex represents a certain mass.
Conflicts:
source/blender/physics/intern/BPH_mass_spring.cpp
|
|
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
|
|
Conflicts:
source/blender/physics/intern/BPH_mass_spring.cpp
|
|
solver step.
Calculating forces and jacobians from linearly interpolated grid values
is problematic due to discontinuities at the grid boundaries. The new
approach of modifying velocities after the backward euler solver step
was suggested in a newer paper
"Detail Preserving Continuum Simulation of Straight Hair"
(McAdams, Selle 2009)
Conflicts:
source/blender/physics/intern/BPH_mass_spring.cpp
|
|
Conflicts:
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/particle_system.c
source/blender/makesrna/intern/rna_particle.c
|
|
Also added a couple of utility wrapper functions for Eigen types to make
interfacing with plain float arrays and blenlib math easier.
|