Effects BUG! Randomized emitter rate goes haywire

Good morning, I spent the past few days with the updated FX editor and found a
bug: I have a fairly complex node graph for engine smoke effects. A lot of
particle parameters are dynamic, which works fine. However, when trying to add
some randomness to the “Rate” node of the emitter, the effect won’t work
properly anymore. It works while it is still loaded in the editor, but if the
package is then rebuild and a new flight loaded, the rate at which the
particles spawn is out of control. Once the randomization is removed from the
spawn rate of the emitter, the effects loads correctly. Exhibit 1:

This is how the effect looks
like after a rebuild with a randomizer node in the emitter rate. Exhibit 2:
This is the same effect, only
with the randomizer node removed from the emitter rate. The effect is still
dynamic though - for instance I check the manifold pressure and velocity to
dynamically change the spawn rate of the particles. All that seems to be
working fine, it’s just the randomization that screws things up. btw: I tried
to add this to the topic “FX”, but since I have to enter at least three
characters to set a topic, I can’t do so. :wink:

Hello @Vitus , Thanks for reporting this issue, We are investigating about it.
Regards, Boris

Hello @Vitus, I can confirm this is the same issue as reported here:
https://devsupport.flightsimulator.com/t/3890. The explanation I gave there
is also valid here as the Rate parameter on the Emitter block is not
particle specific, rather it is computed for the whole effect and cannot rely
on a graph that includes a GetParticleAttribute node. With the release of
SU10 it should no longer cause the rest of the graph to be messed up by an
incorrect cached value. If you want to add some randomness to the rate you can
use the Random node as follows:

  • Create a GetInstanceAttribute node set up to return the age of the effect
  • Multiply that value by some amount so the rate changes more often than once every second,
  • Plug the result in the RandIndex property of the Random node
  • Profit :slight_smile:

Regards, Matthieu