CParticleEvolver Projection

From PopcornFX
Jump to: navigation, search

Projection evolver Last update: v1.9.0 - Main page : Particle evolvers Particle evolvers


The projection evolver is a pretty powerful evolver that can constrain particles to a shape's surface (works on mesh shapes).
It can be used alone, but gives more interesting effects with particles in motion (using for example the Shape sampler Physics evolver), giving the effect of particles moving on the shape's surface.
Unless you want to project on a custom mesh representing a worldspace object (like a whole level's floors), the attractor evolver will usually be used inside a Localspace evolver Localspace evolver


Projection evolver


Projection evolver Node properties

Field name Default value Description
Projection evolver General
Shape <none> Shape to project particles on.
OutputParametricCoordsField None Name of the particle field of type <int3> where the evolver should store the parametric coords of the reprojected shape location of the particle.
ReprojectedField Velocity Name of an additional particle field of type <float3> to project on the shape surface.
Projection evolver Field customization
PositionField Position If this field is declared as a <float3>, it will be used as the particle position to be projected
Projection evolver layout


Projection evolver Auto-fields

The projection evolver does not automatically create any particle fields.


Projection evolver Side-effects

The projection evolver will modify the following fields:

  • Position
  • The field referenced in 'OutputParametricCoordsField'
  • The field referenced in 'ReprojectedField'


It will always project the 'Position' field on the shape surface, and if 'ReprojectedField' is not empty, it will also project that additional field.
This is useful to reproject the particle's Velocity on the shape surface.


Note: The projection evolver should usually be used _After_ the physics evolver.
The physics evolver will often move the particles away from the surface, and running the projection evolver afterwards will make sure they stay constrained on the surface at the end of the frame.


Projection evolver Performance

The projection evolver is pretty efficient for all basic shapes. It is also quite fast for meshes, but some care should be taken with these:

For best performance, avoid having too many particles totally off the mesh surface each frame. The projection works fastest for particles whose distance to the surface is small.
So for instance, having a huge gravity or turbulence that will each frame move the particles a large step away from their previously on-surface positions will degrade the projection evolver's performance.