Jump to content

ObjectParticles Spawn Bug


photo

Recommended Posts

Problem A

 

When changing emitter spawn rate from 0 to non-0 value new particle trail includes last particle on setSpawnRate(0) and for shift emitter also invalid intermediate particles.

 

post-82-0-66018700-1306858072_thumb.jpg

 

 

Problem B

 

Non-shifting emitter does not produce constant particle trail for constant spawn rate at constant speed. Also actual particle spawning seems to be much too low for specified spawn rate 1000.

 

post-82-0-83183000-1306858095_thumb.jpg

 

 

Attached test case demonstrates both problems. Particle system rotates around z-axis and toggles between shift- and non-shift-emitter-state. During each emitter state spawn rate is toggled between 0 and 1 (shift-emitter) / 1000 (non-shift-emitter)

ParticleSpawnBugs.zip

Link to comment

Thanks.

 

I have fixed "Problem A" case.

Engine doesn't check the current spawn rate value on emitter transformation.

We disable emitters instead of changing it spawn rate in OilRush.

 

You have huge FPS in this scene and because of this shift emitter have grouping artefacts.

00003.png

Link to comment

You have huge FPS in this scene and because of this shift emitter have grouping artefacts.

 

Hi Alexander, "Problem B" grouping/missing particles artifacts happen for NON-shift emitter. Based on your huge FPS hint I would guess, that problem B is caused by the fact that per frame spawn count calculations in case of high frame rate leads to something smaller than 1.0 each frame so no particle at all will be emitted. This would explain completely missing or just sporadic particle trail for non-shift emitter (can be easily reproduced by reducing spawn rate from 1000 to 100 in test case and VSync turned off).

 

A fix could be simple aggregation of fractional part of calculated per-frame spawn count between frames. This would ensure correct particle spawning even in case of high frame rates.

Link to comment
×
×
  • Create New...