Obi Official Forum

Full Version: Emitter from mesh vertices?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
(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
(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!