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-11-02GPencil: Cleanup comments typo errorAntonio Vazquez
2020-10-22Sculpt: Grab silhouette optionPablo Dobarro
This adds a property to the grab that masks vertices based on its original normal and grab delta. When used on thin meshes, it allows to grab the silhouette from one side of the object without affecting the shape of the other side. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9205
2020-10-20Sculpt: Smooth deform type for Boundary BrushPablo Dobarro
This adds a smooth deformation type to the boundary brush, which smooths the boundary and has a regular falloff towards the inside of the mesh. For smoothing, only vertices parallel to the boundary are taken into account, creating this effect. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9204
2020-10-15Sculpt: Experimental Pen Tilt SupportPablo Dobarro
This adds support for pen tilt in sculpt mode. For now, pen tilt is used by tweaking the tilt strength property, which controls how much the pen angle affects the sculpt normal. This is available in Draw, Draw Sharp, Flatten, Fill, Scrape and Clay Strips brushes, but it can be enabled in more tools later. The purpose of this patch is to have a usable implementation of pen tilt in a painting mode, so users can test and see in which hardware and platforms this feature is supported and how well it works. If it works ok, more tools and features that rely on pen tilt can be implemented, like brushes that blend between two deformations depending on the angle. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8893
2020-10-10Cleanup: remove unnecessary commentsCampbell Barton
2020-10-01Sculpt: Cloth Simulation Dynamic area modePablo Dobarro
This simulation area mode moves the active area with the brush. When enabled, the cloth brush has no restrictions on stroke length, area or mesh vertex count. In order to work, this enables PBVH nodes dynamically for simulation as the stroke location moves and builds the constraints for new nodes during the stroke. When a node is not inside the simulated area, all the constraints that were created for it and vertex collisions are not computed. The simulation limits falloff areas and constraints tweaking control how the simulated and no simulated nodes blend. Reviewed By: sergey, zeddb Differential Revision: https://developer.blender.org/D8726
2020-09-10Sculpt: Enable pen pressure for Scrape/Fill Area RadiusPablo Dobarro
This should improve the issue with Scrape accumulation in concave surfaces. When the strength of the brush is higher, the area radius is also bigger, so the scrape plane is more stable preventing it from accumulating displacement in the same area. The Scrape/Fill default presets are also updated to include this functionality. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8821
2020-08-25Sculpt: Cloth Snake Hook BrushPablo Dobarro
This implements Snake Hook as a deform type for the cloth brush. This brush changes the strength of the deformation constraints per brush step to avoid affecting the results of the simulation as much as possible. It allows to grab the cloth without producing any artifacts in the surface and create more natural looking folds than any of the other deformation modes. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8621
2020-08-18Sculpt: Enable Cloth Simulation Target for Pose and BoundaryPablo Dobarro
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
2020-08-13Sculpt: Boundary Brush Falloff Types and OffsetPablo Dobarro
This adds the boundary_falloff_type and boundary_offset to control how the falloff of the Boundary Brush is applied. Boundary Origin Offset is the same concept as the Pose Origin offset in the Pose Brush. It is a multiplier that adds extra length to the brush radius to locate the deformation pivot further from the boundary without affecting the falloff. The Falloff type includes Constant (previous default), brush radius, loop and loop and invert. Loop and Loop and Invert can be used to create deformation patterns in a mesh. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8526
2020-08-12Sculpt: Multires Displacement Eraser BrushPablo Dobarro
This brush deletes displacement information of the Multires Modifier, resetting the mesh to the subdivision limit surface. This can be use to easily delete parts of the sculpt or to fix reprojection artifacts after applying a shrinkwrap. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8543
2020-08-10Sculpt: Boundary BrushPablo Dobarro
This brush includes a set of deformation modes designed to deform and control the shape of the mesh boundaries, which are really hard to do with regular sculpt brushes (and even in edit mode). This is useful for creating cloth assets and hard surface base meshes. The brush detects the mesh boundary closest to the active vertex and propagates the deformation using the brush falloff into the mesh. It includes bend, expand, inflate, grab and twist deform modes. The main use cases of this brush are the Bend and Expand deformation modes, which depend on a grid topology to create the best results. In order to do further adjustments and tweaks to the result of these deformation modes, the brush also includes the Inflate, Grab and Twist deformation modes, which do not depend that much on the topology. Grab and Inflate are the same operation that is implemented in the Grab and Inflate tools, they are also available in the boundary brush as producing deformations with regular brushes in these areas is very hard to control. Even if this brush can produce deformations in triangle meshes and meshes with a non-regular quad grid, the more regular and clean the topology is, the better. Most of the assets this brush is intended to deform are always created from a cylindrical or plane quad grid, so it should be fine. Also, its algorithms can be improved in future versions to handle more corner cases and topology patterns. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8356
2020-08-10GPencil: Invert Filled area pressing Ctrl keyAntonio Vazquez
This feature was suggested in https://blender.community/c/rightclickselect/rggbbc/ When press `Ctrl+LMB`, the filled area is inverted. {F8749306} {F8749307} Filling several areas: {F8759399} Differential Revision: https://developer.blender.org/D8477
2020-08-07Merge branch 'blender-v2.90-release' into masterJacques Lucke
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-08-06Sculpt: Cloth Brush simulation area propertyPablo Dobarro
This makes possible to choose between a local and a global simulation when the cloth brush is used. Local simulation is the current default. When global simulation is enabled, the cloth brush simulates the entire mesh without taking any simulation limits into account. This was possible before by setting the simulation limits to 10 (the current maximum value allowed) so the entire mesh was inside the limits, but this was a hack as the limits scale with the radius and there should not be any limitation on how big the simulated area can be to be able to simulate an entire object. This also allows to make a more clear distinction between cloth brush presets that are intended to be used in local areas to add details or globally to generate the base shape of the mesh. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8481
2020-08-06Cleanup: no need for plural for term 'collision'Campbell Barton
2020-08-06Sculpt: Cloth Brush/Filter CollisionsPablo Dobarro
This implements collisions in the solver of the cloth brush/filter. It uses the scene colliders as a regular physics simulation. There are still some parameters (friction, distance to the surface...) that can be exposed as properties in later patches. Thanks to Sebastian Parborg for helping me with the implementation. Reviewed By: sergey, zeddb Differential Revision: https://developer.blender.org/D8019
2020-08-05Sculpt: Option to lock the rotation in the Pose Brush scale deform modePablo Dobarro
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
2020-08-05GPencil: Add Fill option to determine the layers used for boundary strokesAntonio Vazquez
This is a patch suggested in https://blender.community/c/rightclickselect/qggbbc/ The valid values are: * Visible Layers. * Active Layer. * Layer Above active. * Layer Below active. * All layers Above active. * All layers Below active. Differential Revision: https://developer.blender.org/D8474 Some minor UI changes done in the original patch.
2020-08-05Sculpt: Cloth brush Pin Simulation Boundary propertyPablo Dobarro
The cloth brush has a defined simulated area with a falloff. In the falloff area (the area between the dashed white circle and the exterior white circle), simulation properties change in order to fade out the simulation deformation effects towards the boundary. With some brushes and stroke types (like anchored strokes with pinching or grabbing with full strength), it is possible to apply more force than what the boundary falloff can compensate, so the simulation breaks when this happens. This option pins the falloff area with softbody constraints, This produces a much better deformation falloff and it is no longer possible to move the vertices near the simulation boundary, so the simulation won't break no matter the strength of the forces applied inside the simulated areas. This is an option as it is particularly useful for some brushes to add localized details, but for brushes that are supposed to deform the entire mesh (like the grab brush in D8424), this can add unwanted softbody constraints that affect the simulation result. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8435
2020-08-04Merge branch 'blender-v2.90-release'Bastien Montagne
Conflicts: source/blender/editors/gpencil/gpencil_primitive.c
2020-08-04Cleanup: typos & co in UI messages (and some other places).Bastien Montagne
2020-07-29Sculpt: Cloth Brush Soft Body Influence propertyPablo Dobarro
This property adds constraints to the simulation using the initial location of the vertices, making it behave like a soft body. The strength of these constraints can be modified with the brush parameter. This makes some deformation modes more subtle and predictable, making it possible to use the cloth brush to add surface detail in a more controllable way without loosing completely the original shape of the mesh. Reviewed By: sergey Differential Revision: https://developer.blender.org/D7845
2020-07-29GPencil: New Brush predefined modeAntonio Vazquez
it's good to have an option to ' pin' a mode to the brush, to use that mode always, independent of the current viewport selected mode. {F8723224} Reviewed By: pepeland Differential Revision: https://developer.blender.org/D8399 81a002
2020-07-21Sculpt: Add extra deform types to SlidePablo Dobarro
This adds extra deform modes to the slide mode of the Topology Slide/Relax brush (both slide and smear are almost identical). This is useful to move topology to a specific area to add more localized details Reviewed By: sergey Differential Revision: https://developer.blender.org/D8349
2020-07-21Sculpt: Support pen pressure modulation in Paint Brush propertiesPablo Dobarro
This allows to use pen pressure modulation in hardness, wet mix, wet persistence, flow and density, as well as inverting the modulation (more pressure, less density...). With this, it is possible to create brushes that mix paint or apply a new color based on the pressure. Reviewed By: sergey, campbellbarton Differential Revision: https://developer.blender.org/D8267
2020-07-13Sculpt: Add extra deform types to SmearPablo Dobarro
The smear brush was using the stroke direction to slide colors across the mesh surface (this is called drag in other sculpt tools). Similarly, other deformations can be included. The most common ones in image editing are pinch and expand, which can be used to sharpen transitions between colors. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8270
2020-06-30Sculpt: Pose Brush option to affect loose partsPablo Dobarro
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
2020-06-23Sculpt Vertex Colors: Initial implementationPablo Dobarro
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time. This commit includes: - SCULPT_UNDO_COLOR for undo support in sculpt mode - SCULPT_UPDATE_COLOR and PBVH flags and rendering - Sculpt Color API functions - Sculpt capability for sculpt tools (only enabled in the Paint Brush for now) - Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint) - Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint) - Remesher reprojection in the Voxel Remehser - Paint Brush and Smear Brush with color smoothing in alt-smooth mode - Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors - Color Filter - Color picker (uses S shortcut, replaces smooth) - Color selector in the top bar Reviewed By: brecht Maniphest Tasks: T72866 Differential Revision: https://developer.blender.org/D5975
2020-06-09Sculpt: Pose Squash and Stretch deform modePablo Dobarro
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
2020-06-01Sculpt: Pose Brush Face Sets FK modePablo Dobarro
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
2020-05-25Sculpt: Pose Brush Scale/Transform deform modePablo Dobarro
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
2020-05-07GPencil: Include new Brush random curvesAntonio Vazquez
Now the brushes have several new random settings and use curves to define the effect. The curves have been moved below the parameter to keep UI standards and extra curve panels have been removed. {F8505387} The new curves are: * Hue. * Saturation. * Value. New option to random at stroke level instead to random at point level for the following values: * Thickness. * Strength. * UV. * Hue. * Saturation. * Value. Curves have been moved below the corresponding parameter and only are displayed in properties panel. Display the curves in the popover made it unusable. {F8505392} Also, the Pressure random has been renamed to Radius because the old name was not clear enough. Reviewed By: mendio, pablovazquez Differential Revision: https://developer.blender.org/D7577
2020-04-24Cleanup: declare values for enum typesCampbell Barton
Avoids accidents when adding/removing items from an enum.
2020-04-14Sculpt: New Layer BrushPablo Dobarro
The Layer brush was in Blender before 2.81, when the sculpt API was introduced. It had a huge amount of bugs and glitches which made it almost unusable for anything but the most trivial cases. Also, it needed some hacks in the code just to support the persistent base. The brush was completely rewritten using the Sculpt API. It fulfills the same use case as the old one, but it has: - All previous artifacts fixed - Simpler code - Persistent base now works with multires thanks to the sculpt API - Small cursor widget to preview the layer height - More controllable and smoother strength and deformation - More correct masking support - More predictable invert support. When using persistent base, the brush invert mode resets to layer height 0, instead of jumping from +1 to -1. The brush can still be inverted in the brush direction property. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7147
2020-04-02Scultp: Face Set boundary automaskingPablo Dobarro
With this brush option it is possible to mask the boundary vertices of all face sets. This is especially useful in the cloth brush, where face sets can be used to simulate seams between different patches of cloth and produce different patterns and effects. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D7230
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-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-09Sculpt: Edge AutomaskingPablo Dobarro
This automasking option protects the open boundary edges of the mesh from the brush deformation. This is needed to sculpt cloths and it works nicely with the cloth brush. It has a Propagation Steps property that controls the falloff of the mask from the edge. Limitations: - The automask is recalculated at the beginning of each stroke, creating a little bit of lag in high poly meshes, but it is not necessary. This can be fixed in the future by caching the edge distances, increasing a little bit the complexity of the code. - The boundary vertex detection in meshes is not ideal and it fails with triangulated geometry, but it is the same as in the smooth brush. After fixing this, we should refactor the smooth brush to use the API and let the automasking option manually control the affected vertices. - It does not work in Multires (it needs to be implemented in the API). The smooth brush in Multires is also not making boundary vertices. - The falloff has a visible line artifact on grid patterns. We can smooth the final automasking factors several iterations, but it will make the initialization much slower. This can also be added in the future if we decided to cache the distances. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6705
2020-03-09GPencil: Refactor of Draw Engine, Vertex Paint and all internal functionsAntonio Vazquez
This commit is a full refactor of the grease pencil modules including Draw Engine, Modifiers, VFX, depsgraph update, improvements in operators and conversion of Sculpt and Weight paint tools to real brushes. Also, a huge code cleanup has been done at all levels. Thanks to @fclem for his work and yo @pepeland and @mendio for the testing and help in the development. Differential Revision: https://developer.blender.org/D6293
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-01Sculpt: Hardness brush propertyPablo Dobarro
The hardness property moves the brush falloff towards the edges, making the brush sharper. This should be the intended way to control the brush falloff instead of tweaking the falloff curve manually, as it can be mapped to pressure to make the falloff variable during the stroke. It is also a good idea to show in the UI that the custom curves is an advance features and it should almost never be modified when sculpting/ painting unless you want to create some advanced effects. By modifying the curves freely it is really easy to break the brushes and make them produce artifacts. This needs to be done in a later after merging the pending projects to reorganize all the brush properties accordingly. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6902
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-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-11Pose Brush: Option to disable the IK anchor pointPablo Dobarro
The IK chain was using an anchor point by default as it makes sense for posing, but for creating curved shapes it is useful to be able to disable it. Reviewed By: jbakker Differential Revision: https://developer.blender.org/D6584
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-01-24Sculpt: Rename Topology Brush to Slide Relax BrushPablo Dobarro
The full name was "Topology Slide/Relax", but it didn't fit in the toolbar UI. This was causing some problems: - The mesh filter that does the same thing is called "Relax" - We may want to add a "Topology Brush" tool in the future that is more oriented to retopology task (like creating strips of quads), so by doing this we avoid having two tools with the same name in the UI. Reviewed By: billreynish Differential Revision: https://developer.blender.org/D6590