Talk:Particle system: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
m (→‎Issues & Development: should probably be added to the main article as a heads-up)
(→‎Stop contrails from glowing at night and blinking at daytime: Suggestion by Mimino on Pinto's FlightGear Discord server)
 
Line 16: Line 16:


{{FGCquote|1= Regarding precipitation - the current particles code in Simgear has major performance problems - and some outright mistakes in its implementation. Notably the animation of the particles is done in the wrong phase of OSG’s frame loop, which can prevents particle animations being unloaded - i.e can cause tiles to never be unloaded. For this reason many people have been disabling particle effects to ensure stable frame-rates. However, the complication is the Simgear particle system is effectively a fork+edit of the osgParticle system, which I think is what we use for precipitation. Ideally we’d use the osgParticle system everywhere (since it has correct interactions with the rest of OSG) but it also has the issues about customising the rendering you mentioned. (I don’t think the Simgear particles are any better in that regard, but I may be wrong)|2= {{cite web  | url    = http://sourceforge.net/p/flightgear/mailman/message/32925375/  | title  = <nowiki>Re: [Flightgear-devel] Precipitation issues</nowiki>  | author = <nowiki>James Turner</nowiki>  | date  = Oct 13th, 2014  }}}}
{{FGCquote|1= Regarding precipitation - the current particles code in Simgear has major performance problems - and some outright mistakes in its implementation. Notably the animation of the particles is done in the wrong phase of OSG’s frame loop, which can prevents particle animations being unloaded - i.e can cause tiles to never be unloaded. For this reason many people have been disabling particle effects to ensure stable frame-rates. However, the complication is the Simgear particle system is effectively a fork+edit of the osgParticle system, which I think is what we use for precipitation. Ideally we’d use the osgParticle system everywhere (since it has correct interactions with the rest of OSG) but it also has the issues about customising the rendering you mentioned. (I don’t think the Simgear particles are any better in that regard, but I may be wrong)|2= {{cite web  | url    = http://sourceforge.net/p/flightgear/mailman/message/32925375/  | title  = <nowiki>Re: [Flightgear-devel] Precipitation issues</nowiki>  | author = <nowiki>James Turner</nowiki>  | date  = Oct 13th, 2014  }}}}
== Stop contrails from glowing at night and blinking at daytime ==
{{hatnote|Suggestions by Mimino on Pinto's FlightGear Discord server.[https://discord.com/channels/269552151997448197/753433855238733855/788019628730744841] I have not tested it myself, but do not want it to get lost over time.}}
I have a suggestion for [[Particle system#Example]]:
How to stop contrails from glowing at night (because of <code><nowiki><lighting>false</lighting></nowiki></code>) and blinking in the daytime (because of <code><nowiki><lighting>true</lighting></nowiki></code>):
<syntaxhighlight lang=xml>
<emissive>false</emissive>
<lighting>false</lighting>
</syntaxhighlight>
Add inside <code><nowiki><color></nowiki></code> of <code><nowiki><start></nowiki></code> and <code><nowiki><end></nowiki></code>:
<syntaxhighlight lang=xml>
<red><property>/rendering/scene/diffuse/red</property></red>
<green><property>/rendering/scene/diffuse/green</property></green>
<blue><property>/rendering/scene/diffuse/blue</property></blue>
</syntaxhighlight>
—[[User:Johan G|Johan G]] ([[User_talk:Johan_G|Talk]] | [[Special:Contributions/Johan_G|contribs]]) 07:52, 18 December 2020 (EST)

Latest revision as of 12:53, 18 December 2020

Issues & Development

ticket #305

Cquote1.png I have been unable to run FG with particles enabled since a long time due to random crashes in the particle code.
— Csaba Halász (Aug 1st, 2011). Re: [Flightgear-devel] startup crash in SimGear (with patch?).
(powered by Instant-Cquotes)
Cquote2.png
Cquote1.png I actually had it disabled for a long time. After enabling it recently, I also started having memory issues
Cquote2.png
Cquote1.png Drawback with our current codebase: Our integration of the particle systems need to be rethought as this contains geometry with culling disabled which makes a pagedlod just never expire. Switching the particle systems off works pretty good so far.
— Mathias Fröhlich (Jul 21st, 2012). Re: [Flightgear-devel] Rendering passes question.
(powered by Instant-Cquotes)
Cquote2.png
Cquote1.png IIRC each particle > system is attached to the scene graph in (at least) two places: at the > emitter's location in the graph and in a global vector of particle system > updaters. IIRC they are never removed from the global list of updaters > (a bug - but a hard one to fix due to concurrency issues). > Tim knows more about this.
— Anders Gidenstam (Apr 16th, 2011). Re: [Flightgear-devel] OSG caching.
(powered by Instant-Cquotes)
Cquote2.png
Cquote1.png If I'm not mistaken the particles issue has been around since we got particles, so it is apparently not that bad (leak and race condition) in practice.
— Anders Gidenstam (Apr 16th, 2011). Re: [Flightgear-devel] OSG caching.
(powered by Instant-Cquotes)
Cquote2.png
Cquote1.png I guess the issues with "Effect" objects is probably worse than with particles. There's a larger number of Effect objects - and each is connected to a texture (.rgb/.png images) - which may occupy a lot of memory. Just by starting at KSFO, loads of KSFO terminal textures - and textures of 15 different MP aircraft immediately stick in memory...
— ThorstenB (Apr 16th, 2011). Re: [Flightgear-devel] OSG caching.
(powered by Instant-Cquotes)
Cquote2.png
Cquote1.png Regarding precipitation - the current particles code in Simgear has major performance problems - and some outright mistakes in its implementation. Notably the animation of the particles is done in the wrong phase of OSG’s frame loop, which can prevents particle animations being unloaded - i.e can cause tiles to never be unloaded. For this reason many people have been disabling particle effects to ensure stable frame-rates. However, the complication is the Simgear particle system is effectively a fork+edit of the osgParticle system, which I think is what we use for precipitation. Ideally we’d use the osgParticle system everywhere (since it has correct interactions with the rest of OSG) but it also has the issues about customising the rendering you mentioned. (I don’t think the Simgear particles are any better in that regard, but I may be wrong)
— James Turner (Oct 13th, 2014). Re: [Flightgear-devel] Precipitation issues.
(powered by Instant-Cquotes)
Cquote2.png

Stop contrails from glowing at night and blinking at daytime

I have a suggestion for Particle system#Example:

How to stop contrails from glowing at night (because of <lighting>false</lighting>) and blinking in the daytime (because of <lighting>true</lighting>):

<emissive>false</emissive>
<lighting>false</lighting>

Add inside <color> of <start> and <end>:

<red><property>/rendering/scene/diffuse/red</property></red>
<green><property>/rendering/scene/diffuse/green</property></green>
<blue><property>/rendering/scene/diffuse/blue</property></blue>

Johan G (Talk | contribs) 07:52, 18 December 2020 (EST)