Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion / Idea  Cone Shaped Force
#1
A cone shaped force coming from an origin point would be quite useful for localized affects.
This can be used to simulate both a hair dryer or a vacuum. 
The sphere and ambient forces don't seem like they'd do the job. 
(Or maybe something else already exists to do this??)

Perhaps something like the following:
  • Strength - Can be positive (from force origin along direction vector) or negative (from force origin opposite direction vector).
  • Origin Direction Vector - Central axis of cone and force origin.
  • Start Directional Falloff - Origin to this value is 100% strength along the direction vector.
  • End Directional Falloff - Start to end ramps from 100% down to 0% along the direction vector.
  • Inner Angle Falloff - Degrees from direction vector where the strength is 100%.
  • Outer Angle Falloff - Degrees from inner falloff ramps from 100% down to 0%.
Note: 
  • No forces are applied to anything outside of the cone.
  • Even a square cone would probably suffice (like a camera frustum) if that's easier/cheaper to implement.
  • The gizmo would likely just look like two nested cones with perhaps a central arrow with length representing strength.
Reply
#2
(07-02-2020, 08:41 PM)Wade Howard Wrote: A cone shaped force coming from an origin point would be quite useful for localized affects.
This can be used to simulate both a hair dryer or a vacuum. 
The sphere and ambient forces don't seem like they'd do the job. 
(Or maybe something else already exists to do this??)

Perhaps something like the following:
  • Strength - Can be positive (from force origin along direction vector) or negative (from force origin opposite direction vector).
  • Origin Direction Vector - Central axis of cone and force origin.
  • Start Directional Falloff - Origin to this value is 100% strength along the direction vector.
  • End Directional Falloff - Start to end ramps from 100% down to 0% along the direction vector.
  • Inner Angle Falloff - Degrees from direction vector where the strength is 100%.
  • Outer Angle Falloff - Degrees from inner falloff ramps from 100% down to 0%.
Note: 
  • No forces are applied to anything outside of the cone.
  • Even a square cone would probably suffice (like a camera frustum) if that's easier/cheaper to implement.
  • The gizmo would likely just look like two nested cones with perhaps a central arrow with length representing strength.

Hi Wade,

Sphere and ambient force zones are the basic ones included. You can write your own force zones by extending ObiExternalForce, and implementing its ApplyForcesToActor() and OnDrawGizmosSelected() methods.

- ApplyForcesToActor: calculate the force you want to add to each particle, and write it in the solver.externalForces array.
- OnDrawGizmosSelected: draw any gizmos you want for the force zone.

There's lots of possible force zones (box shaped, vortex shaped, torus shaped, spline shaped, velocity field, etc) so we opted to include the basic ones and give users a mechanism to write their own in case of need.

Also, remember that disabling the "radial" checkbox of the spherical force zone turns it into a linear force zone, with distance falloff, which behaves quite similar to a wide cone.

We will consider including more built-in basic shapes in the future, but this is low-priority for us.
Reply