[VFX] GroundAttributeType > Position under particle in addition of under the emitter

Currently GroundAttributeType > Position can only return the position
under the emitter.

In order to prevent a particle from going under ground around a hill, mountain
or angled terrain it would be useful to get the position under the particle so
we can clamp it.

While this would be fairly computationally intensive to get on every frame,
here are a few ideas to optimize this:

  • Having the data computed every second or so;
  • Compute as a function of how many particles are currently emitted (more particles increases the delay between updates);
  • Only compute/update if the particle moved move than a meter (or other unit) since the last update
  • Divide a group of particles into a grid projected on the ground (or use the topography grid) and extract 2, 9, 16 or 25 ground positions instead of getting it for every particle

Thank you!

Ref:
https://docs.flightsimulator.com/html/Developer_Mode/VFX_Editor/Nodes/GetGroundAttribute.htm

Great idea. Regards, Raul