Blender Git Loki

Git Commits -> Revision 1e6de47

Revision 1e6de47 by Alexander Gavrilov
October 6, 2021, 09:49 (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: 1e6de4732697507d7c59e715664375be2c6423af
Parent Commit: 6f6e33e
Lines Changed: +352, -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.c (+3, -5) (Diff)
/source/blender/blenkernel/intern/particle.c (+27, -3) (Diff)
/source/blender/makesdna/DNA_object_force_types.h (+23, -2) (Diff)
/source/blender/makesrna/intern/rna_object_force.c (+83, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021