2025-07-30 08:51 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003401Spring engineGeneralpublic2013-02-13 20:19
Reportermsafwan 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusnewResolutionopen 
Product Version91.0 
Target VersionFixed in Version 
Summary0003401: offscreen FX triumph/defeat over onscreen FX (non-intelligent FX cutoff when MaxParticles is reached)
DescriptionI discover this:
If you set MaxParticle to low (ie: 10) and place unit to produce CEGs at offscreen location and 2nd unit to produce CEGs at onscreen location (in your view), then onscreen CEGs will cutoff sporadically. IMO onscreen CEGs should not be defeated by offscreen CEGs. Onscreen CEGs must appear first over offscreen CEGs.

After going thru source-code:
Luckly, offscreen CEGs was not even Drawn (there was InView check for simple particles), but the Particle-COUNTER count every single particle regardless of its drawn or not (line 700 of ProjectileDrawer.cpp). When I commented line 700 of ProjectileDrawer.cpp, the MaxParticles will obey onscreen particle rather than of offscreen particle (onscreen CEG win!).

this line: https://github.com/spring/spring/blob/develop/rts/Rendering/ProjectileDrawer.cpp#L700

But not sure of performance cost (can't test sorry), but for sure: onscreen FX suppose to win over offscreen FX (not to be cutoff first. IMO)
Steps To ReproduceStep to reproduce:
1) set MaxParticle to low
2) generate CEG offscreen & onscreen
3) result: onscreen CEG will be cutoff
TagsCEG, EmitSfx, particle, particleSaturation
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0009748

jK (developer)

Last edited: 2013-02-11 15:22

View 2 revisions

It's not only the rendering that eats time, esp. the updating (which happens currently on CPU) is slow. So it makes sense to increase the counter for offscreen particles, too.

If you want to solve the issue: kill less important (non-synced, non-nano) offscreen particles when particle limit is reached.

~0009749

msafwan (reporter)

thanks for the responds :)

So we have no choice? the only solution is to increase MaxParticle if we wanted to see some particle on screen?

Could we have choice?

:P

~0009793

jK (developer)

As said, it cause a MASSIVE cpu leak. So no.

Please write a patch as suggested, or wait till a dev implements it.
+Notes

-Issue History
Date Modified Username Field Change
2013-01-17 21:08 msafwan New Issue
2013-01-17 21:10 msafwan Tag Attached: particle
2013-01-17 21:14 msafwan Tag Attached: CEG
2013-01-17 21:14 msafwan Tag Attached: EmitSfx
2013-01-17 21:17 msafwan Tag Attached: particleSaturation
2013-02-11 15:15 jK Note Added: 0009748
2013-02-11 15:22 jK Note Edited: 0009748 View Revisions
2013-02-11 15:30 msafwan Note Added: 0009749
2013-02-13 20:19 jK Note Added: 0009793
+Issue History