Age | Commit message (Collapse) | Author |
|
|
|
|
|
- Use 'BKE_object_defgroup' prefix for object functions.
- Rename 'defvert_verify_index' to 'defvert_ensure_index'
since this adds the group if it isn't found.
|
|
Note that `BKE_library.h`/`library.c` were renamed to
`BKE_lib_id.h`/`lib_id.c` to avoid having a too generic name here.
Part of T72604.
|
|
|
|
Rewrite the checks for determining if the solution is actually within
the triangle to fix stability issues when the correct solution is on
an edge, and step is very small, i.e. the solution is already very
close. Also, comment more clearly what is happening geometrically.
This should fix problems when vertices that should project exactly
onto an edge actually miss, resulting in weird spikes. This made
Target Normal Project unusable for the voxel remesher.
|
|
|
|
Should Fix T70326
This implements the shrinkwrap options suggested in D5933. I did a few
test and it seems much more stable than the previous options.
Reviewed By: jbakker
Maniphest Tasks: T70326
Differential Revision: https://developer.blender.org/D6176
|
|
* Add proper adjustment for scale in the solver epsilon computation.
* Run at least one full iteration of the solver, even if the initial
state meets the epsilon requirement.
* When applying offset, blend normal into the offset direction
as the initial point moves very close to the target mesh.
Also random improvements to debug trace output in the console.
|
|
This should fix most of the shrinkwrap artifacts when the preserve volume option is active. After this commit the default voxel remehser settings should not fail in the default cube.
Reviewed By: zeddb
Differential Revision: https://developer.blender.org/D6010
|
|
This commit fixes most of the issues we currently have in the voxel remesher. Mesh volume is preserved when doing multiple iterations, so the sculpt won't shrink and smooth each time you run the remesher. Mesh topology is much better, fixing most issues related to mask extraction and other topology based operations.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D5863
|
|
This operator extracts the paint mask to a new mesh object. It can extract the paint mask creating a boundary loop in the geometry, making it ready for adding a subdivision surface modifier.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D5384
|
|
|
|
TLS and Settings can be used by other types of parallel 'for loops', so
removing 'Range' from their names.
No functional changes expected here.
|
|
Prepare for enabling ReflowComments.
|
|
|
|
|
|
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
|
|
While \file doesn't need an argument, it can't have another doxy
command after it.
|
|
`BKE_modifier_get_evaluated_mesh_from_evaluated_object()` used by
modifiers needing access to other objects' geometry probably skipped out
of the radar when cage and final evaluated meshes were added to
BMEditMesh? In any case, we do not need to duplicate (and then free!) a
temp mesh from editdata anymore, and we can even add instead a parameter
to get cage instead of final. Also makes modifiers code a bit simpler.
|
|
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.
|
|
|
|
Needed for clang formatting to workaround bug/limit, see: T53211
|
|
Hit normal originates from tesselated triangles and isn't the
actual normal used for shading of flat faces. Thus, it is better
to use the actual polygon normals when available.
|
|
Fix T58237: Exporters: Curve Modifier not applied when "apply modifiers" are selected.
Fix T58856: Python: "to_mesh" broken in 2.8.
...And many other cases... ;)
Thing is, we need target IDs to always be evaluated ones (at least I
cannot see any case where having orig ones is desired effect here).
Depsgraph/Cow system ensures us that when modifiers are evaluated by it,
but they can also be called outside of this context, e.g. when doing
binding, or object conversion...
So we need to ensure in modifiers code that we actually are always
working with eval data for those targets.
Note that I did not touch to physics modifiers, those are a bit touchy
and rather not 'fix' something there until proven broken!
|
|
|
|
|
|
This modifier only uses mesh to get vgroup, which is only needed in case
modified object is indeed a mesh! Building a mesh from curve here is not
only useless and time-consuming, it will also easily fail the assert
about same number of vertices!
Note that surface_project and subsurf option also need more work at some
point, but this is probably not that urgent for now.
Also, use MOD_get_vgroup() helper in modifier code itself and pass
resulting MDeformVert & index to BKE_shrinkwrap's `shrinkwrapModifier_deform()`,
this is simpler and avoids duplicating vgroup handling code.
Related to T57972.
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
- Use smooth normals to displace in Above Surface mode.
- Add an option to align an axis to the normal in the constraint.
I've seen people request the alignment feature, and it seems useful.
For the actual aligning I use the damped track logic.
In order to conveniently keep mesh data needed for normal
computation together, a new data structure is introduced.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3762
|
|
Allow raycasting in two directions and culling front or back faces.
Also implement a new Invert Cull option in both constraint and
modifier that can be used to aim for faces aligned with the project
axis direction when raycasting both ways.
Reviewers: mont29
Differential Revision: https://developer.blender.org/D3737
|
|
In addition to the original map to surface and Keep Above Surface,
add modes that only affect vertices that are inside or outside
the object. This is inspired by the Limit Distance constraint,
and can be useful for crude collision detection in rigs.
The inside/outside test works based on face normals and may not be
completely reliable near 90 degree or sharper angles in the target.
Reviewers: campbellbarton, mont29
Differential Revision: https://developer.blender.org/D3717
|
|
|
|
Differential Revision: https://developer.blender.org/D3719
|
|
|
|
|
|
Still nbice to avoid such access to keep valgrind output more sane.
|
|
|
|
|
|
|
|
Modifiers stack only get COW/evaluated IDs, so no need to go auery again
DEG for those. Further more, now unified handling of EditBMesh case (was
done on case-by-case basis in a few modifiers, not all for some reason).
We are still missing the ability to get final and cage deformed meshes
when in Edit mode though, this is to be defined/implemented in depsgraph.
|
|
This fix applying the following modifiers:
* Boolean (working already)
* Array
* Mesh Deform
* Surface Deform
* Vertex Weight Proximity
This function was to return evaluated mesh. So it should get the evaluated
object at all times. So in this case it makes more sense to simply pass the
depsgraph (or in this case the ModifierEvalContext that contains both the
depsgraph and the flag.
Solution discussed with Bastien Montagne.
|
|
Now only subsurf still needs some DM...
|
|
Partial only, complete depends on BVHTree helper updates, and subsurf
updates.
|