Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Emitter from mesh vertices?
#1
Is it possible to just assign a mesh to ObitEmitter and make it emit one particle per vertex? I don't want to voxelize the mesh or anything. Just emitting from each vertex.
Reply
#2
(08-04-2024, 04:22 AM)kodra Wrote: Is it possible to just assign a mesh to ObitEmitter and make it emit one particle per vertex? Just emitting from each vertex.

Hi!

No, there's no built-in way to do this for a very good reason: fluid particles must keep a specific distance from each other in order to keep a specific rest density. This distance is determined by the blueprint's resolution, something that is not possible to enforce if emitting from a mesh's vertices as they may be arbitrarily close to each other.

Emitting particles too close to each other will increase density, as a result pressure will build up and fluid will "explode". This is never a desired effect. Conversely, if particles are emitted too far away from each other then they'll clump into droplets - which isn't as bad, but still often undesired. Note that this is not required by a "regular" particle system in which particles are completely independent from each other: there's no adverse effects if normal, non-fluid particles are too close to each other or even if they completely overlap.

If you want to emit from vertices at your own risk, it is fairly easy to do: create a new class derived from ObiEmitterShape, override its GenerateDistribution() method and fill its "distribution" array with one DistributionPoint per vertex.

(08-04-2024, 04:22 AM)kodra Wrote: I don't want to voxelize the mesh or anything.
There's the VoxelMesh emitter shape, which will voxelize the mesh and emit particles from each voxel. I know it is not what you want, but FYI. Sonrisa
Reply
#3
(08-04-2024, 07:48 AM)josemendez Wrote: Hi!

No, there's no built-in way to do this for a very good reason: fluid particles must keep a specific distance from each other in order to keep a specific rest density. This distance is determined by the blueprint's resolution, something that is not possible to enforce if emitting from a mesh's vertices as they may be arbitrarily close to each other.

Emitting particles too close to each other will increase density, as a result pressure will build up and fluid will "explode". This is never a desired effect. Conversely, if particles are emitted too far away from each other then they'll clump into droplets - which isn't as bad, but still often undesired. Note that this is not required by a "regular" particle system in which particles are completely independent from each other: there's no adverse effects if normal, non-fluid particles are too close to each other or even if they completely overlap.

If you want to emit from vertices at your own risk, it is fairly easy to do: create a new class derived from ObiEmitterShape, override its GenerateDistribution() method and fill its "distribution" array with one DistributionPoint per vertex.

There's the VoxelMesh emitter shape, which will voxelize the mesh and emit particles from each voxel. I know it is not what you want, but FYI. Sonrisa

Understood. Thank you very much for the answer!
Reply