Evolve state

From PopcornFX
Jump to: navigation, search

Evolve state Last update: v1.9.0 - Main page : Particle evolvers Particle evolvers


An evolve state defines how the particle will evolve during each frame of its lifetime. It contains multiple Particle evolvers Particle evolvers.


Popcorn is designed to be able to handle multiple evolve states per layer. Currently there is a single evolve state per layer.
In the future, this will be extended to multiple states, and dynamic switching from one state to the other using Particle events Particle events.
This will allow particles to dynamically change behaviors based on custom conditions, like entering a volume, or colliding somewhere, etc...


Evolve state Node properties

Field name Default value Description
Evolve state General
StateName name of the evolve state.
MicroUpdatesMinFPS 60.0 Minimum number of updates per second this state should run at.
MaxMicroUpdatesPerFrame 1.0 Maximum number of sub-steps acceptable (to avoid the simulation going down a vicious circles of more updates causing slower framerate causing more updates causing slower framerate, etc...)
Evolve state layout


Evolve state Micro-updates

By default, the states will only perform one update step per real ingame frame. This can be changed.

To customize the Micro-Updates behavior, you can tweak tweak the 'MicroUpdatesMinFPS' and 'MaxMicroUpdatesPerFrame' properties.


For example, let's say we have the following values:

  • MicroUpdatesMinFPS = 60
  • MaxMicroUpdatesPerFrame = 3


if the framerate is 120 fps, the state will be updated once per frame, with a timestep of 1/120 = 8.33 milliseconds
if the framerate is 80 fps, the state will be updated once per frame, with a timestep of 1/80 = 12.5 milliseconds
if the framerate is 60 fps, the state will be updated once per frame, with a timestep of 1/60 = 16.66 milliseconds
if the framerate is 50 fps, the state will be updated twice per frame, with two timesteps of (1/50)/2 = 10.0 milliseconds
if the framerate is 30 fps, the state will be updated twice per frame, with two timesteps of (1/30)/2 = 16.66 milliseconds
if the framerate is 25 fps, the state will be updated 3 times per frame, with two timesteps of (1/20)/3 = 13.33 milliseconds
etc, etc...


Micro-updates


The system will always try to keep the simulation step below or equal to : 1.0 / MicroUpdatesMinFPS
However, it the example above, if the framerate drops below 20 fps, requiring more than 4 updates per frame, it will be clamped to 3 updates per frame, due to MaxMicroUpdatesPerFrame = 3.