Board index FlightGear Development Effects and shaders

Afterburner / thruster flames

An exciting "new" option in FlightGear, that includes reflections, lightmaps, the particle system etc.. A lot is yet to be discovered/implemented!

Re: Afterburner / thruster flames

Postby zlsa » Sun May 24, 2015 10:18 pm

Is this effect implemented in the FGAddon SpaceShuttle?
zlsa
 
Posts: 145
Joined: Fri Feb 14, 2014 2:29 am
Callsign: N275A
Version: 3.5 git
OS: Linux

Re: Afterburner / thruster flames

Postby Johan G » Mon May 25, 2015 1:11 am

Looking at the dates in the log for the SpaceShuttle in FGAddon, not just yet. The last commit was in April 26.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5885
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Afterburner / thruster flames

Postby Thorsten » Mon May 25, 2015 5:29 am

It's on the Space Shuttle devel repository here - we haven't made an FGAddon update yet, there's things still in flux (and for a while, it was even unstable on atmospheric entry).
Thorsten
 
Posts: 11695
Joined: Mon Nov 02, 2009 8:33 am

Re: Afterburner / thruster flames

Postby Johan G » Mon May 25, 2015 8:28 am

Good. I was expecting that you would wait to add it to FGAddon till things work the way you intend. :)
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5885
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Afterburner / thruster flames

Postby erik » Mon May 25, 2015 3:52 pm

This effect can also be used to generate vapor trails like the strake vorex effect of the F-16.
Image
The previous version used the particle system with a less satisfactory result.

Especially the ability to set turbulence using the noise parameters and the deflection coefficient to make the vapor trail move into the air stream are a nice bonus.

Erik
erik
 
Posts: 1605
Joined: Thu Nov 01, 2007 1:41 pm

Re: Afterburner / thruster flames

Postby Thorsten » Mon May 25, 2015 4:57 pm

Wow - I had never thought of this application, but it makes a lot of sense in retrospect and it looks really cool.

I guess there's more on the Shuttle than thrusters then which I can port to this technique...
Thorsten
 
Posts: 11695
Joined: Mon Nov 02, 2009 8:33 am

Re: Afterburner / thruster flames

Postby erik » Tue May 26, 2015 1:36 pm

I just realized it might be nice to have an option to not make the color emissive for vapor trails.
It's a tad too bright in low light situations right now.

Erik
erik
 
Posts: 1605
Joined: Thu Nov 01, 2007 1:41 pm

Re: Afterburner / thruster flames

Postby Thorsten » Tue May 26, 2015 1:43 pm

I just realized it might be nice to have an option to not make the color emissive for vapor trails.


Not making them emissive is fairly expensive in terms of having to do a complete ALS light computation for the scene (which just about doubles the length of the code...). Plus, thin vapor trails have fairly complicated Mie scattering, they look fairly dark when looking along the light direction and light up when looking through them. Adding this to an effect which presumably will render flames for which none of this is relevant creates a substantial overhead.

All colors are under user runtime control though - you can easily dim them yourself.
Last edited by Thorsten on Tue May 26, 2015 1:45 pm, edited 1 time in total.
Thorsten
 
Posts: 11695
Joined: Mon Nov 02, 2009 8:33 am

Re: Afterburner / thruster flames

Postby erik » Tue May 26, 2015 1:45 pm

Ok, good to know. Thanks.
erik
 
Posts: 1605
Joined: Thu Nov 01, 2007 1:41 pm

Re: Afterburner / thruster flames

Postby erik » Tue May 26, 2015 4:02 pm

After searching for an answer it's not yet completely obvious to me as to how I should be able to alter the color values.

Update: Another idea, would it be possible/useful to make the effect make use of the color properties of the bounding box and make the default bounding box emissive or would that require just as much work in the shader?

Erik
Last edited by erik on Tue May 26, 2015 4:13 pm, edited 1 time in total.
erik
 
Posts: 1605
Joined: Thu Nov 01, 2007 1:41 pm

Re: Afterburner / thruster flames

Postby zlsa » Tue May 26, 2015 4:12 pm

Would it be possible to do something like this; namely the strong yellow/white flame and a weaker blue flame, and the "wobblyness" of the blue flame (something like warp noise) that isn't visible in this image but is more visible in videos?
zlsa
 
Posts: 145
Joined: Fri Feb 14, 2014 2:29 am
Callsign: N275A
Version: 3.5 git
OS: Linux

Re: Afterburner / thruster flames

Postby erik » Tue May 26, 2015 4:15 pm

Both of these effects are already possible now zlsa.

Erik
erik
 
Posts: 1605
Joined: Thu Nov 01, 2007 1:41 pm

Re: Afterburner / thruster flames

Postby Thorsten » Tue May 26, 2015 5:16 pm

After searching for an answer it's not yet completely obvious to me as to how I should be able to alter the color values.


You're probably not seeing the forest between all the trees here - it's really simple.

At the point where you create a derived effect, you can make it use a property rather than a fixed value for any of the parameters. For instance, the Space Shuttle main engine flame uses

Code: Select all
<?xml version="1.0" encoding="utf-8"?>

<PropertyList>
  <name>ssme-flame</name>
  <inherits-from>Effects/thrust-flame</inherits-from>
  <parameters>
    <flame_color_low_r>0.9</flame_color_low_r>
    <flame_color_low_g>0.7</flame_color_low_g>
    <flame_color_low_b>0.5</flame_color_low_b>
    <flame_color_high_r>0.7</flame_color_high_r>
    <flame_color_high_g>0.7</flame_color_high_g>
    <flame_color_high_b>1.0</flame_color_high_b>
    <base_flame_r type="float">0.8</base_flame_r>
    <base_flame_g type="float">1.0</base_flame_g>
    <base_flame_b type="float">1.0</base_flame_b>
    <use_shocks type="int">1</use_shocks>
    <use_noise type="int">1</use_noise>
    <thrust_collimation><use>/sim/systems/various/ssme-flame-collimation</use></thrust_collimation>   
    <thrust_density><use>/sim/systems/various/ssme-flame-density</use></thrust_density>
    <base_flame_density type="float">1.0</base_flame_density>
    <shock_frequency>1.0</shock_frequency>
    <noise_strength>0.3</noise_strength>
    <noise_scale>0.1</noise_scale>
  </parameters>
</PropertyList>


where <thrust_collimation> and <thrust_density> refer to properties which are computed by a JSBSim system (and then, since they end up being tied and not seen by the effect framework, copied by a property rule...) while in the default effect they are just fixed values.

(You can do this with basically any derived effect - it's pretty neat...)
Thorsten
 
Posts: 11695
Joined: Mon Nov 02, 2009 8:33 am

Re: Afterburner / thruster flames

Postby erik » Tue May 26, 2015 6:36 pm

Thanks, I though I had tested that but ended up with black ' smoke'.
I' ll try it again using your example.

Update: it depended on the property.
I guess /rendering/scene/diffuse/red was already tied or something, using my own property path instead worked out great.

Erik
erik
 
Posts: 1605
Joined: Thu Nov 01, 2007 1:41 pm

Re: Afterburner / thruster flames

Postby Thorsten » Wed May 27, 2015 6:44 am

Some documentation summarizing the experiences so far on the wiki.
Thorsten
 
Posts: 11695
Joined: Mon Nov 02, 2009 8:33 am

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 2 guests