Can I update my GPU emitters once they start?

Hi there,

I think this is aimed more at one of the epic devs, but what I’m trying to do is change the constant acceleration on my emitter on the fly at run time. For example if its set to 0, 0, -980.0 can I then set it to be 0, 0, 500.0 on a button press during runtime?

I’m not sure you can due to the nature of sending stuff off to the GPU and letting it go on with it without having to send hold up things with back and forth communication with the CPU, but I thought it worth asking.

Cheers

Or is there another approach I can take, such as having a vector (which in this case is going to be the world gravity) stored on the GPU, each emitter would look to this shared vector (if set to do so) to use it as its current acceleration. Then during runtime we update the vector whenever we want to change it, only having to do it once and not update every emitters acceleration.

Is something like this possible?

Actually I’ve started work on this now in the way described in the comment. I have another related question but I’ll open a new one.

Have you experimented with using an instance parameter and modifying the acceleration with a Blueprint?

Most particle modules don’t support it including all the acceleration modules as far as I can tell. Well at least the option isn’t there when I right click the module in cascade.

Also for what I want to do, which is to make the level gravity affect the particles, this would mean that each particle systems would need its own blue print which I don’t really want to do.

I’ve managed to extend the particle simulation pixel shader by adding a shader parameter for passing the current world gravity in, and also added new module called WorldGravity whose details are passed to and stored on the GPU with the rest of the emitter info at build time. This allows me to update the gravity when I like and all particles with the WorldGravity module to be influence by it.

Particle Parameters are setup in the distribution list of the module…to your point however, yes I see we cannot make Constant Acceleration a ParticleParameter.

I honestly had not even tried this yet…I will investigate with our engine team to see if it is possible to change this. I was going to suggest doing gravity using WorldPositionOffset and a material function, but it sounds like you are using a more robust solution by extending capabilities.

The World Gravity module sounds like a feature that would be great to have, are you considering submitting it?

I’d love to be my circumstances don’t allow me to share my work unfortunately, sorry :frowning: