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.
Details
Diff Detail
- Repository
- rB Blender
- Branch
- sculpt-cloth-softbody (branched from master)
- Build Status
Buildable 8228 Build 8228: arc lint + arc unit
Event Timeline
Is there a more descriptive name that could be used like "Shape Preservation" or similar? Soft body doesn't tell me anything like that as an artist.
| source/blender/blenkernel/BKE_paint.h | ||
|---|---|---|
| 261–265 | What are the v's and p's here? | |
| source/blender/editors/sculpt_paint/sculpt_cloth.c | ||
| 133 | This seems weird to me. | |
| 144–151 | You can avoid having repetitive cloth_sim->length_constraints[cloth_sim->tot_length_constraints]. by storing constraint you're writing to in a variable: SculptClothLengthConstraint *length_constraint = &cloth_sim->length_constraints[cloth_sim->tot_length_constraints]; length_constraint->v1 = v; ... Same goes to the cloth_brush_add_length_constraint(). | |
| 533–535 | Can move this outside of if() statement, (aka, always do it) and then have if (v1 != v2) { /* madd v2 */ }. | |
| source/blender/makesrna/intern/rna_brush.c | ||
| 2398–2399 | I don't think strength is a correct word here. It is usually called influence in other areas of Blender. But then semantic seems to be inverted: higher the strength closer to original shape object is (so influence is actually lower?) | |
| source/blender/makesrna/intern/rna_brush.c | ||
|---|---|---|
| 2398–2399 | I renamed the property to influence only in the UI. I would like to check what you think before renaming all the internal properties because my idea would be to use this same implementation to add controls for the tension/compression, shear and bending constraints in the future. This property should just be another one on that list. In that case, it would be the influence of the original shape in the result, not the influence of the brush. | |
I renamed the property to influence only in the UI. I would like to check what you think before renaming all the internal properties because my idea would be to use this same implementation to add controls for the tension/compression, shear and bending constraints in the future. This property should just be another one on that list. In that case, it would be the influence of the original shape in the result, not the influence of the brush.
I feel weird about such "inversed" meaning of slider in the brush settings: something in the brush settings which means brush has less effect when slider is at higher values? Seems counter-intuitive and not aligned with the rest of Blender UI.
@Julian Eisel (Severin), can I have input and suggestions from the UI team here? ;)
| source/blender/blenkernel/BKE_paint.h | ||
|---|---|---|
| 270 | Add a note that elem_position points to the position which is owned by the element. | |
'Soft Body Strength' is kinda unclear if i were u i would consider another name, my suggestion is 'Deformation Resistance'
@Sergey Sharybin (sergey) @Julian Eisel (Severin) I think this is now ready, the only thing missing is to decide a final name for the property. To me, it makes sense to have it as it is now because the property controls the strength of a set of constraints (similar to what is being developed in D8062). The strength of these constraints is what limits the effect of the brush, not the other way around. The mass property also works this way, the higher the mass the weaker the brush deformation is.
@Sergey Sharybin (sergey) Is it ok to commit this? I need the softbody constraints to fix a bug with the simulation of the grab brush
From my side its fine.
Still didn't hear anything from Julian. Not sure if he wants to have a pass here.