Age | Commit message (Collapse) | Author |
|
Automasking cache factors were missing in the pose brush deform function.
Reviewed By: JacquesLucke
Maniphest Tasks: T87596
Differential Revision: https://developer.blender.org/D11005
|
|
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10707
|
|
This removes indentations from if statements by converting them to early
returns and continue.
Most of the code of brushes and tools has loops with a full indented
body inside of an if, which was also copied into some of the new tools.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10333
|
|
|
|
|
|
|
|
This adds XYZ symmetry as a property of meshes and updates all modes to
use the mesh symmetry by default to have a consistent tool behavior
between all modes and when switching objects.
Reviewed By: brecht, mano-wii, campbellbarton
Maniphest Tasks: T79785
Differential Revision: https://developer.blender.org/D8587
|
|
This adds a new brush property called "Deformation Target" which
controls how the brush deformations is going to affect the mesh data. By
default is set to Geometry, which makes the brushes displace the
vertices. When set to Cloth Simulation, the deformation of the brush is
applied to the cloth solver constraints, so the simulation is
responsible to apply the final deformation. This allows to add cloth
simulation effects to other sculpt tools with minor modifications to their
code.
This patch enables Cloth Simulation deformation target for Pose and
Boundary brushes, which are tools that are already designed to work in
low poly counts and produce large deformations. This allows creating the
most common cloth effects, like bending and compressing folds, without
relying on collisions.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8578
|
|
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8529
|
|
|
|
The Pose FK mode assings the rotation origin to the boundary of the last
visited face set in the floodfill operation. In some cases, the topology
of the model may make the flood fill operation to visit a face set as the
first one (assinging it to target) and visit it again as the last one
(assinging it to origin). This will make the pose brush to default the
origin and target to the brush location and not to the face sets as it
considers that there is only one possible boundary.
This adds a GSet to ensure that a particular face set is not visited
twice in the flood fill, fixing these cases.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7984
|
|
The scale deform mode includes rotation by default, so when when scaling
down a part of the models it becomes harder to control as the effect of
the rotation less predictable (similar to using trackball rotation in a
very small radius). This locks the rotation of the segment, so parts of
the model can be scaled down in a more predictable way.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8465
|
|
The abbreviation 'init' is brief, unambiguous and already used
in thousands of places, also initialize is often accidentally
written with British spelling.
|
|
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/editors/sculpt_paint` module.
No functional changes.
|
|
This function was returning the ik_chain before disabling the
fake_neighbors, so when the brush was used again with fake neighbors
disabled after rebuilding the PBVH and free them, they were still
enabled in the SculptSession, causing a the crash.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D8195
|
|
This option allows posing meshes with different disconnected elements
using the Pose Brush.
This is achieved by doing the following:
- Creating an ID per vertex that stores the connected component of that vertex.
- By using those IDs, one fake topology connection is created per vertex to the nearest vertex in a different ID. The maximum distance to create that connection is determined by the "Max Element Distance" property. These fake connectivity neighbors are used in the Sculpt API functions iterators, so all the algorithms of the Pose Brush can run without modifications as if everything was part of the same mesh.
In order to make this work, the "Connected only" property of the Pose Brush needs to be disabled. This will add an extra performance cost to the Pose Brush and its preview. To achieve optimal results, max element distance should be as low as possible.
Reviewed By: sergey, campbellbarton
Differential Revision: https://developer.blender.org/D7282
|
|
Threaded Sculpt is now always enabled by default. If it causes
performance problems compared single threaded sculpt it should be
considered a bug.
Reviewed By: sergey
Maniphest Tasks: T77638
Differential Revision: https://developer.blender.org/D7960
|
|
This implements squash and stretch as a deform mode for the Pose Brush.
It is similar to scale, but it applies different scale values in different
axis. To achieve this, the pivot local space of the transform needs to
be aligned to the segment when using this deform mode to apply the scale
in the correct direction.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7934
|
|
Previously, the twist rotation was aligned using the stroke location.
This was causing unexpected results when rotating some Face Sets rigs.
Now the intersection with the first Face Set in the flood fill is used,
which produces much better results.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7900
|
|
The grab delta is not used in do_pose_brush_task_cb_ex, so there is no
reason to add it to SculptThreadedTaskData
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7901
|
|
This Pose Brush origin mode simulates an FK deformation in the entire
model when clicking on the face sets, as they were controls of a fully
rigged character. Combined with the previous Face Sets modes that allow
creating IK chains, the pose brush should now be able to simulate most
of the common rigs deformations.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7839
|
|
This was propsed in D7059, so I applied it to the rest of the code
Reviewed By: campbellbarton, sergey
Differential Revision: https://developer.blender.org/D7480
|
|
|
|
When the brush size is bigger than the entire mesh, fdata.tot_co can be
0, so the pose origin will default to (0,0,0), which does not make much
sense. After this patch, the pose origin will be set to the farthest
vertex from the pose origin, which at least should be in the surface of
the mesh and in most cases in the direction the pose brush was already
detecting the origin.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7773
|
|
This is an alternative deformation brush for the Pose Brush intended
quickly change the proportions of the mesh. The regular mode scales
using the segment's origin as a pivot. The inverted mode drags the
entire segment using the grab delta.
The only difference with the regular pose brush is that it is not
compatible with IK, so the option is disabled and set to 1 segment. The
rest of the options should work as expected.
Reviewed By: sergey
Differential Revision: https://developer.blender.org/D7374
|
|
|
|
This patch enables TBB as the default task scheduler. TBB stands for Threading Building Blocks and is developed by Intel. The library contains several threading patters. This patch maps blenders BLI_task_* function to their counterpart. After this patch we can add more patterns. A promising one is TBB:graph that can be used for depsgraph, draw manager and compositor.
Performance changes depends on the actual hardware. It was tested on different hardwares from laptops to workstations and we didn't detected any downgrade of the performance.
* Linux Xeon E5-2699 v4 got FPS boost from 12 to 17 using Spring's 04_010_A.anim.blend.
* AMD Ryzen Threadripper 2990WX 32-Core Animation playback goes from 9.5-10.5 FPS to 13.0-14.0 FPS on Agent 327 , 10_03_B.anim.blend.
Reviewed By: brecht, sergey
Differential Revision: https://developer.blender.org/D7475
|
|
|
|
|
|
This commit introduces a new mode for calculating the positions and
weights of the IK segments in the Pose Brush based on the Face Sets.
The first segment of the chain will always include all face sets inside
the brush radius and it will propagate until the boundary of the last
face sets added in the flood fill. Then consecutive connected face sets
are added to the chain until the chain length limit is reached or all
face sets of the mesh are already part of the chain.
This feature enables complete control over the pose brush origins in
case that is needed. Also, with this mode, the user can have a library
of base meshes with face sets already configured to get to the initial
pose as fast as possible.
Reviewed By: jbakker
Differential Revision: https://developer.blender.org/D7235
|
|
Also use sculpt prefix for SCULPT_CLAY_STABILIZER_LEN.
|
|
|
|
|
|
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D6973
|