Blender Git Loki
Git Commits -> Revision f0ac641
Revision f0ac641 by Alexander Gavrilov December 26, 2021, 15:10 (GMT) |
Force Fields: implement new true power and custom falloff options. The 'power' falloff option in Blender force fields does not actually generate a true power falloff function, as pointed out in D2389. However, that patch adds a special 'gravity' falloff option to Force fields, without addressing the shortcoming in the common options. The reason for not using the true curve in the options, as far as one can tell, is that the power curve goes up to infinity as the distance is reduced to 0, while the falloff options are designed so that the maximum value of the curve is 1. However, in reality forces with a power falloff don't actually go to infinity, because real objects have a nonzero size, and the force reaches its maximum at the surface of the object. This can be used to integrate an option to use a true power falloff with the design of falloff settings, if it requires a nonzero 'minimum' distance to be set, and uses a curve that reaches 1 at that distance. Since this is adding a new feature to the minimum distance value, it is also a good opportunity to add a feature to the maximum distance. Specifically, the new options can be used to apply arbitrary brush-style falloff curves between min and max, including a fully custom curve option. When used together with power falloff, the two curves are multiplied together. While the true power option allows creating more physically correct forces, the custom curves aid artistic effects. Differential Revision: https://developer.blender.org/D8075 |
Commit Details:
Full Hash: f0ac641c6fa9b8c33dd7c80ed159578169c8dfb0
Parent Commit: 2d0ff55
Lines Changed: +351, -44
9 Modified Paths:
/release/scripts/startup/bl_ui/properties_physics_common.py (+11, -0) (Diff)
/release/scripts/startup/bl_ui/properties_physics_field.py (+53, -20) (Diff)
/source/blender/blenkernel/BKE_effect.h (+7, -0) (Diff)
/source/blender/blenkernel/BKE_particle.h (+2, -0) (Diff)
/source/blender/blenkernel/intern/effect.c (+143, -14) (Diff)
/source/blender/blenkernel/intern/object.cc (+3, -5) (Diff)
/source/blender/blenkernel/intern/particle.c (+27, -3) (Diff)
/source/blender/makesdna/DNA_object_force_types.h (+22, -2) (Diff)
/source/blender/makesrna/intern/rna_object_force.c (+83, -0) (Diff)
/release/scripts/startup/bl_ui/properties_physics_field.py (+53, -20) (Diff)
/source/blender/blenkernel/BKE_effect.h (+7, -0) (Diff)
/source/blender/blenkernel/BKE_particle.h (+2, -0) (Diff)
/source/blender/blenkernel/intern/effect.c (+143, -14) (Diff)
/source/blender/blenkernel/intern/object.cc (+3, -5) (Diff)
/source/blender/blenkernel/intern/particle.c (+27, -3) (Diff)
/source/blender/makesdna/DNA_object_force_types.h (+22, -2) (Diff)
/source/blender/makesrna/intern/rna_object_force.c (+83, -0) (Diff)