How to create a particle system with variable area coverage?

I need to spawn an explosion that covers a particular area. That area can be an axis-aligned bounding box (although I imagine a rotated bounding box would be no harder.) I’m thinking this should be a Niagara effect.

This explosion will be visible from many directions (both sideways and from the top) so I’ll probably have to build it “volumetrically” rather than “flipbook style.”

What’s the best way to combine emitters and user parameters such that the effect, when it runs, covers the intended area, and not too much more?

Is using collision reasonable to constrain the particles? (Think “explode in a tunnel crossing” versus “explode in the middle of a single tunnel.”) If so, what’s a recommended way to set this up (haven’t used collision in Niagara before)?

How do I get the same density of particles when the covered area is 20 square meters, as when it’s 2 square meters? (I’m imagining some user parameter that controls particle spawner count?)

None of the examples I’ve found cover interactive effects like these; they’re either of the “we sample the scene and make it cool!” kind, or they’re “put an emitter here! make it emit meshes! it’s particles!” kind. Maybe my search-fu just isn’t enough…

What I ended up doing, and it works pretty OK, is to make the necessary area a user parameter for the particle system, and then set the “spawn count” to multiply width times height times a density constant (which is pretty small, given that we’re dealing with square centimeters here.)

I then use a Box Location step in the particle-init stack to randomly pick a location within the given supplied width/height, and, voila, I have a constant-density area-coverage particle system!

This might have seemed obvious to experienced Niagara people, but I’m not one of those :slight_smile:

Pics or it didn’t happen: