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-04-14Sculpt: Implement undo of Apply Base during sculpt sessionSergey Sharybin
The idea is to push both base mesh geometry and PBVH coordinates so it is possible to undo everything without loosing data which was not flushed from sculpt session to base mesh. It is possible do memory optimization to avoid push custom data layers which are not touched by operator, but before doing that better to ensure this is a correct and working approach. Differential Revision: https://developer.blender.org/D7381
2020-04-04Cleanup: Move Detail Operators and Dyntopo to their own filesPablo Dobarro
2020-04-03Cleanup: Move Mask Filter and Mask Expand to their own filesPablo Dobarro
2020-04-03Cleanup: Move Mesh Filter, Smooth and Automasking to their own filesPablo Dobarro
2020-04-03Cleanup: Move all sculpt transform functionality to its own filePablo Dobarro
2020-04-03Cleanup: Missing clang format in previous commitPablo Dobarro
2020-04-03Cleanup: Move all Face Set functionality to its own filePablo Dobarro
2020-04-03Fix T74205: crash cancelling transfrom operation in sculpt modeAsad-ullah Khan
Differential Revision: https://developer.blender.org/D7018
2020-04-03Cleanup: spellingCampbell Barton
2020-04-01Sculpt Undo: Refactor Geometry undo nodesSergey Sharybin
Made it so there is a single UNDO node in the list which has both original and modified mesh state. Makes it easier to achieve "interleaved" undo nodes stored in the undo step (as opposite of either storing geometry or other data). Should be no functional changes, just preparing for an upcoming work to support undo of operation like Apply Base. Differential Revision: https://developer.blender.org/D7290
2020-03-27Sculpt: Pose Brush Face Sets origin modePablo Dobarro
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
2020-03-27Sculpt: Weight normal and area sampling towards the brush centerPablo Dobarro
Previously, all vertices inside the brush radius were taken into account equally when calculating the sculpt normal and area. This was causing artifacts and unpredictable results with large brushes or meshes with curvatures, as the strongest deformation point of all brushes is usually in the center. By weighting the vertex normal and position towards the center when sampling, all brushes should now behave in a more predictable way in non-uniform surfaces. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6989
2020-03-27Cleanup: uppercase macros for sculpt iterators, add to clang-formatCampbell Barton
Also use sculpt prefix for SCULPT_CLAY_STABILIZER_LEN.
2020-03-26Sculpt: Surface Smooth Brush and Mesh FilterPablo Dobarro
This implements the Surface Smooth Brush as a mode inside the Smooth tool, which uses the HC algorithm from "Improved Laplacian Smoothing of Noisy Surface Meshes". Comparted to the regular smooth brush with laplacian smooth, this brush removes the surface while preserving the volume of the object. The smooth result can be controlled by tweaing the original shape preservation, displacement and iteration count. The same surface smooth operation is also available as a mesh filter. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7057
2020-03-19Cleanup: `make format` after SortedIncludes changeDalai Felinto
2020-03-12Fix mesh shrinking when using the relax mesh filter.Pablo Dobarro
If the relax mesh filter was used on a non manifold mesh with open boundaries, all the vertices were relaxed and the mesh was shrinking. This was an unintended behavior that was making the filter unusable with these meshes. The mesh filter is now initializing an automasking buffer using the same boundary automasking function from the brush code. Now edges are preserved and the relax filter works as it should. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7097
2020-03-09Face Sets: Add relax support to Mesh Filter and Draw Face SetsPablo Dobarro
This enables a relax operation that works only on face sets boundaries, which smooths the jagged edges that are produced when painting or expanding face sets by sliding the topology without affecting the shape of the mesh. This has many uses in hard surface sculpting for things like sculpting panels or smoothing surfaces. It can also help when working with remeshed topology as it makes the face sets looks better and more organized if needed. The operation is implemented as an Shift smooth in the Draw Face sets tool, similar to the Slide/Relax tool. The same operation is also available in the mesh filter to smooth all the face sets boundaries uniformly or to smooth the face set under the cursor with the Use Face Sets option. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7034
2020-03-09Fix Cloth Brush not working with automaskingPablo Dobarro
The cloth brush was not using the automasking values when calculating the mask value on each vertex. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7083
2020-03-06Cleanup: Rename ARegion variables from ar to regionJulian Eisel
The old convention was easy to confuse with ScrArea. Part of https://developer.blender.org/T74432. This is mostly a batch rename with some manual fixing. Only single word variable names are changed, no prefixed/suffixed names. Brecht van Lommel and Campbell Barton both gave me a green light for this convention change. Also ran clan clang format on affected files.
2020-03-06Cleanup: Move Multiplane Scrape brush to its own filePablo Dobarro
2020-03-06Sculpt: Cleanup, remove macro re-definitionSergey Sharybin
2020-03-06Cleanup: Use the SCULPT_ prefix in all sculpt_intern functionsPablo Dobarro
2020-03-06Cleanup: redundant-decls warningCampbell Barton
2020-03-05Sculpt Face SetsPablo Dobarro
Face Sets are the new system to control the visibility state of the mesh in sculpt and paint modes. They are designed to work in modes where brushes are the primary way of interaction and they provide much more control when working with meshes with complex shapes and overlapping surfaces. This initial commit includes: - Sculpt Face Sets data structures and PBVH rendering. - Face Set overlay and opacity controls. - Sculpt Undo support. - Remesher reprojection support. The visibility state of the mesh is also preserved when remeshing. - Automasking and Mesh filter support. - Mask expand operator mode to expand Face Sets (Shift + W) and flood fill areas by connectivity (press Ctrl while expanding). - Sculpt Mode Face Sets and Visibility API. - Sculpt Face Sets creation and visibility management operators. - Operator to randomize the Face Sets colors. - Draw Face Sets brush tool to create and edit the Face Sets. Drawing on the mesh creates a new Face Set. Pressing Ctrl before drawing modifies the Face Set under the brush at the beginning of the stroke. - Updated keymap and menu to work with Face Sets from Sculpt Mode (H to toggle visibility, Alt + H to show all, Shit + H to hide). - Pie menu on the W key with Face common Sets operations. Know limitations: - Multires support. The Face Sets and Visibility API needs to be implemented for Multires. Reviewed By: jbakker, #user_interface, Severin Differential Revision: https://developer.blender.org/D6070
2020-03-01Fix: Build error on windows.Ray Molenkamp
Use of undefined GSQueue type was causing build errors.
2020-03-01Cleanup: Move pose brush to its own filePablo Dobarro
Reviewed By: brecht Differential Revision: https://developer.blender.org/D6973
2020-03-01Fix T73947: Support radial symmetry in Multiplane ScrapePablo Dobarro
This includes the following changes: - Use always the angle stored in the StrokeCache when deforming - Interpolate between the previous and the new sampled angles - Calculate the cursor matrix only on the 0 radial symmetry iteration Reviewed By: brecht Maniphest Tasks: T73947 Differential Revision: https://developer.blender.org/D6901
2020-02-28Sculpt: Cloth brushPablo Dobarro
This brush has a simple physics solver that helps when sculpting cloth. - The mass and the damping properties of the simulation are properties of the brush. - It has two additional radius control to limit the influence and falloff of the simulation. - Masked vertices are pinned in the simulation, and it applies the sculpt gravity directly in the solver. - The Cloth Brush has 7 deformation modes with 2 falloff types (radial and plane). The brush can create the constraints only on the required PBVH nodes, so the simulation is isolated on high poly meshes. As long as the brush size is not too big it should be possible to keep it real time. Known issues: - The way constraints are created is extremely basic and it creates repeated constraints. Maybe there is another way to create fewer constraints while keeping the simulation quality decent. This part can also be multithreaded. (As it is it works ok, but it could be better) Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6715
2020-02-19Sculpt: Pinch only in the direction perpendicular to the strokePablo Dobarro
By pinching this way, we can fix some artifacts when sculpting following the topology direction. It does not make much difference with dyntopo/ remesher, but I think this should improve the quality of the brush when working with Multires. Reviewed By: JulienKaspar, jbakker Differential Revision: https://developer.blender.org/D6587
2020-02-13Cleanup: pass const variablesCampbell Barton
2020-02-11Sculpt: Split normal radius and area radiusPablo Dobarro
This enables an extra layer of control in the sculpt brushes. For now it is enabled only in Scrape, but it should work in all brushes (like normal radius). In the future it may also be enabled in other brushes. You can tweak in this property in the scrape brush to achieve a much better behavior when working on curve surfaces and control how much volume you want to trim. In most cases, it also fixes the bug where the brush keeps trimming in the same area without disabling accumulate. It should be possible to fix some other artifacts in other brushes by tweaking this default property. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D5993
2020-02-11Sculpt: Clay Strips Tip Roundness propertyPablo Dobarro
This patch allow to change the brush tip shape between a square and a circle using a brush property. After this change we are no longer testing the distance against a cube (the Z axis is not used). I did not test this in depth, but if it does not produce any artifacts I think we can keep it this way instead of adding more complexity to the code. In this new distance test the brush falloff is only applied on the rounded parts of the square to avoid sharp artifacts in the diagonals. Because of this, the round version is much softer than the square one. The planned hardness property will fix this, but this can also be avoided by setting the fallof to a custom curve. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6165
2020-02-11Sculpt: Clay Thumb BrushPablo Dobarro
This brush simulates deforming clay with your fingers, accumulating material during the stroke. It has a plane that tilts during the stroke in the front part of the brush to achieve this effect. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6238
2020-02-10Cleanup: sort file, struct listsCampbell Barton
2020-01-08Cleanup: use paint/sculpt prefix in BKE_paint.hCampbell Barton
PoseIKChain for example reads as if this is related to armature/pose when it's a sculpting feature.
2020-01-07Sculpt: Pose Brush with Inverse KinematicsPablo Dobarro
This commits introduces the pose_ik_segments brush property in the Pose Brush. When increasing the IK segments count, the brush generates more segments and weights associations following the topology of the mesh. When moving the brush, these segments are transformed using an IK solver and they are used to deform the mesh. When pressing Ctrl, the brush controls the segments' roll rotation instead of using the IK solver. The brush falloff controls how much rotation is propagated from the first to the last segment in the chain. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6389
2019-12-09Fix T72092: Clay Strips Brush stroke crash with Brush Detail SizePablo Dobarro
Some other areas in the brush code outside sculpt mode assume that pressure is multiplied directly on top of the initial size. This patch calculates the pixel radius correctly using the brush size from sculpt mode to get the dyntopo detail size. When the new brush input system is in place, all these values will come directly from the brush input code with all the custom curves applied per brush, so all paint modes will have a correct brush behavior and all this sculpt mode specific code won't be necessary. Reviewed By: jbakker Maniphest Tasks: T72092 Differential Revision: https://developer.blender.org/D6339
2019-11-27Fix T71868: Clay Strips brush collapsed geometryPablo Dobarro
We are now modifying the relation between pressure and radius using custom functions to improve the brushes, but dyntopo was not prepared for this. This fix sends the unmodified radius to dyntopo so it modifies the geometry correctly. Reviewed By: jbakker Maniphest Tasks: T71868 Differential Revision: https://developer.blender.org/D6299
2019-11-21Sculpt: Multiplane Scrape BrushPablo Dobarro
The Multiplane Scrape brush creates sharp edges with a given fixed angle by trimming the mesh with two planes in local space at the same time. When working with stylized or hard surface models, this brush produces way better results and is more predictable than any other crease/flatten brush based on curves and alphas. It is also the first brush we have than can produce hard surface concave creases. The Multiplane Scrape Brush also has a dynamic mode where it samples the surface to fit the angle and scrape planes during a stroke. With this mode enabled you can sculpt multiple times over the same edge without creating artifacts. It can also create creases that change between concave and convex during the same stroke. The behavior of this brush will improve after merging patches like D5993 and its behavior in concave creases can still be improved, so I will keep tweaking its parameters and default values once we have all brush properties available. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6174
2019-10-10Sculpt: use TBB instead of BLI_task for multithreadingBrecht Van Lommel
This solves performance issues on some computers where there is significant threading overhead. Rather than doing the complicated work of optimizing our own task scheduler, use TBB which appears to work well. The downside is that we have another thread pool, but it is already there when using OpenVDB voxel remesh. For future releases we can switch to using TBB to replace our task scheduler implementation entirely, and use the same thread pool for BLI_task, Cycles, Mantaflow, etc. Differential Revision: https://developer.blender.org/D6030
2019-10-08Cleanup: minor refactoring of mask expand and floodfillBrecht Van Lommel
2019-10-02Use PBVH_FullyMasked flag in mesh filterPablo Dobarro
We don't need to filter the fully masked nodes here after adding the flag Reviewed By: brecht Differential Revision: https://developer.blender.org/D5973
2019-10-01Cleanup: avoid accessors, reduce memory usage, multithread dirty maskBrecht Van Lommel
2019-10-01Cleanup: make sculpt vertex random access API read-onlyBrecht Van Lommel
2019-10-01Cleanup: don't go through sculpt accessor functions multiple timesBrecht Van Lommel
2019-09-30PBVH: PBVH_FullyMasked and PBVH_FullyUnmasked flagsPablo Dobarro
This commit introduces flags to tag the PBVH nodes as fully masked or unmasked. This is used in do_brush_actions to filter fully masked nodes during a stroke. Other tools can also be updated to use this flags. Sculpt updates now require a flag to update the mask or the vertex coordinates. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5935
2019-09-29Cleanup: move sculpt parallel range threading test into functionBrecht Van Lommel
Easier to experiment with different settings this way.
2019-09-27Sculpt: Pose brush origin offsetPablo Dobarro
With the previous behavior, it was impossible to manipulate areas with a lot of complex shapes like fingers, as the pose origin was calculated only with the topology inside the radius. With pose offset, the previous method is used to calculate the direction of the "bone", and an extra offset is added on top of it. This way you can set the pose origin in the correct place in this kind of situations. The pose factor grows to fit the new rotation origin. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D5841
2019-09-17Sculpt: Add pose origin preview to the Pose BrushPablo Dobarro
This commit makes the pose brush easier to control. It also includes a refactor of the pose brush init code. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D5761
2019-09-11Sculpt: Transform toolPablo Dobarro
The sculpt mode transform tool applies the sculpt pivot transformation to all vertices, taking XYZ symmetry into account. This commit also includes an operator to set the pivot point initial position. Reviewed By: brecht Differential Revision: https://developer.blender.org/D5717