[ParticleFX] Access emitter/modifier parameter(s) or particleFX script? (DEF-2389)

Hi everyone,

I’ve been playing with particleFX object recently and I was wondering if you could have an associated particleFX script or a way to access and modify parameters of emitters/modifiers programmatically.
There is plenty to like with the current builtin particle system but I find it to be a bit limited. Being able to add some custom logic would be of great help and would avoid reinventing the wheel by building a custom particle system with game objects every time a simple feature is missing.

Best,
Nicolas.

1 Like

Hi nicolas,

I spent a lot of time looking into the particle system and I managed to achieve everything I wanted by:

1- giving an object various particle fx files and access each of the individually
2- give a particle fx various emitters and using the delay function
3- curvy curvy curves.

However, it’s true that being able to access an particlefx’s variables would be a little simpler.

2 Likes

Thanks Josh.

I’m already having many particleFX files to handle pre-roll/pre-warm and/or using tricks such as switching from one simulation to another but there are some things difficult to achieve with this method (such a having particles starting with a non-null direction and velocity).
Eventually I guess I’ll have to write my own particle system but it really seems to me that I’m fighting against the engine.

Nicolas.

I’ve created a ticket to address the need to modify a particle fx programatically: DEF-2389

Hi there, I see this is an old topic. In my opinion it is crucial to be able to modify particle emitter properties via script. Are there any update about this ticket DEF-2389? Am I missing something and this has already been implemented?

Many thanks!

+1. I would love more control over particle FX (and they are one of my favourite parts of the engine)

1 Like

There’s no update on this and it is not something we have planned to address soon.

I would like to poke this feature request and mention a usage scenario that would benefit. I wanted to make a simple, old-style scrolling stars background for a simple shmup. I created a particleFX version and it works well enough, I can rotate the game object to move the stars in any direction. However, without access to modify the acceleration parameter of the particleFX, it is impossible to control the movement. It would otherwise be perfect for making flowing fields of particles.

3 Likes

Welcome to the forum @Nad_Maximus!

I agree there is a lot of use cases, where custom code for controlling particles might be useful. It could be done of course with sprites which can be totally programmable, but it’s tedious work. Particle FX simplify a lot of work for a lot of random “sprites” and controlling it from script would be a blast.

Here is a feature requests for this, you can vote it up to give them more attention:

Some things might be addressed by function: particlefx.set_constant(url,emitter,constant,value)

API reference (particlefx)

2 Likes

Voted for this on GitHub just now. My use case is simply to edit an emitter’s spawn rate, lifespan, and initial speed for a somewhat realistic precipitation system. For example, a mild rain density and speed while the sky is overcast, versus a high density and speed while a storm is passing through.

I can see how modifiable emitter properties might be difficult to design though, due to the various types of inputs like ranges and curves. Maybe a first step to this kind of API could exclude the more complicated stuff, while still allowing edits to the more basic properties.

I suppose creating multiple copies of the same emitter with slightly different values is a reasonable work-around for the time being.

2 Likes