Board index FlightGear Development Effects and shaders

Adding redout and blackout

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

Adding redout and blackout

Postby OSuKaRuXD » Wed May 27, 2015 10:36 am

Split off from the topic Shader requests.

I extend MIG29pilot request and make it more generic with:

Real time cubemaps for, also, plane reflections.

Also: I want to improove (if i can) the blackout effect but... Where it's defined? i can't find it.
Last edited by Johan G on Thu May 28, 2015 5:34 pm, edited 1 time in total.
Reason: Split off from the topic "Shader requests"
OSuKaRuXD
 
Posts: 13
Joined: Wed Sep 04, 2013 4:09 pm
Version: 3.5.0
OS: UBUNTU 14.04

Re: Shader requests

Postby Johan G » Wed May 27, 2015 2:21 pm

OSuKaRuXD wrote in Wed May 27, 2015 10:36 am:I want to improove (if i can) the blackout effect but... Where it's defined? i can't find it.

I just added Howto:Add blackout and redout settings to the wiki for you. :wink: :)
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: 5546
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: Shader requests

Postby OSuKaRuXD » Wed May 27, 2015 2:43 pm

Johan G wrote in Wed May 27, 2015 2:21 pm:
OSuKaRuXD wrote in Wed May 27, 2015 10:36 am:I want to improove (if i can) the blackout effect but... Where it's defined? i can't find it.

I just added Howto:Add blackout and redout settings to the wiki for you. :wink: :)

It's not what i meant, but i apreciate it.
OSuKaRuXD
 
Posts: 13
Joined: Wed Sep 04, 2013 4:09 pm
Version: 3.5.0
OS: UBUNTU 14.04

Re: Shader requests

Postby Johan G » Wed May 27, 2015 3:58 pm

OSuKaRuXD wrote in Wed May 27, 2015 2:43 pm:It's not what i meant, but i apreciate it.

Aha. :lol: I should probably have figured that out by looking at the name of the topic. :oops:

By the way, what did you mean? :wink:
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: 5546
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: Shader requests

Postby OSuKaRuXD » Thu May 28, 2015 2:01 pm

Johan G wrote in Wed May 27, 2015 3:58 pm:Aha. :lol: I should probably have figured that out by looking at the name of the topic. :oops:

By the way, what did you mean? :wink:


I meant the shader itself. I though it was on the Effects or Shaders directory, but, mabe is this REDOUT.NAS in the Nasal directory.
OSuKaRuXD
 
Posts: 13
Joined: Wed Sep 04, 2013 4:09 pm
Version: 3.5.0
OS: UBUNTU 14.04

Re: Shader requests

Postby Johan G » Thu May 28, 2015 5:25 pm

Took a long look and managed to find where it lives. It is actually not a shader, but is partially hard coded in files related the scenery rendering, :!: see the latest changes in the article.
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: 5546
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: Shader requests

Postby Thorsten » Thu May 28, 2015 5:28 pm

Hm, does it actually work with shaders at all? I realize I never tried of late...
Thorsten
 
Posts: 11191
Joined: Mon Nov 02, 2009 8:33 am

Re: Adding redout and blackout

Postby Johan G » Thu May 28, 2015 5:40 pm

I think this effect can be improved, for example by adding vignetting and gray out. Also the associated headshake effect (in redout.nas) does not seem to be be possible to tweak by an aircraft developer.

Edit: Also redout and blackout is currently not affected by the amount of time the pilot have been exposed to the g-force.
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: 5546
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: Adding redout and blackout

Postby OSuKaRuXD » Thu May 28, 2015 5:53 pm

Vignetting, Desaturation, contrast and noise. Yes. That was my idea :D
Also, if it was possible, affecting the sound also. (fading out high frequencies and adding a high frequency backgroud tone)
A more physiological accurate effect, in resume.
OSuKaRuXD
 
Posts: 13
Joined: Wed Sep 04, 2013 4:09 pm
Version: 3.5.0
OS: UBUNTU 14.04

Re: Adding redout and blackout

Postby Johan G » Thu May 28, 2015 6:00 pm

Not to mention fading the HUD. ;)
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: 5546
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: Adding redout and blackout

Postby simbambim » Thu May 28, 2015 9:58 pm

Do you want us to become sick at the computer? :lol:
Fly on VATSIM and die.
simbambim
 
Posts: 260
Joined: Mon Sep 29, 2014 5:41 pm
Version: 3.2

Re: Adding redout and blackout

Postby Johan G » Thu May 28, 2015 10:38 pm

With enough of turbulence and headshake, preferably in an aircraft with metal bending sounds during heavy loads... :twisted:
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: 5546
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: Shader requests

Postby Johan G » Fri May 29, 2015 4:03 pm

Thorsten wrote in Thu May 28, 2015 5:28 pm:Hm, does it actually work with shaders at all?

To a laymen it looks like flightgear/src/Scenery/redout.cxx is an OpenGL hack:

Code: Select all
osg::Node* FGCreateRedoutNode()
{
  // ...
  osg::StateSet* stateSet = geometry->getOrCreateStateSet();
  stateSet->setMode(GL_ALPHA_TEST, osg::StateAttribute::OFF);
  stateSet->setMode(GL_BLEND, osg::StateAttribute::ON);
  stateSet->setAttribute(new osg::BlendFunc);
  stateSet->setMode(GL_CULL_FACE, osg::StateAttribute::OFF);
  stateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
  stateSet->setAttribute(new osg::Depth(osg::Depth::ALWAYS, 0, 1, false));
  stateSet->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
  // ...
};
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: 5546
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: Adding redout and blackout

Postby OSuKaRuXD » Fri May 29, 2015 4:32 pm

Johan G wrote in Thu May 28, 2015 10:38 pm:With enough of turbulence and headshake, preferably in an aircraft with metal bending sounds during heavy loads... :twisted:


Yeaaahhh!! Pure adrenaline!! xD
OSuKaRuXD
 
Posts: 13
Joined: Wed Sep 04, 2013 4:09 pm
Version: 3.5.0
OS: UBUNTU 14.04

Re: Adding redout and blackout

Postby tigert » Sat May 30, 2015 10:19 am

simbambim wrote in Thu May 28, 2015 9:58 pm:Do you want us to become sick at the computer? :lol:


Not necessarily sick - but the biggest thing missing from desktop simulators is the feeling of the g-force. It is very easy to pull crazy G-forces because all it takes is a simple push or pull on the joystick.

Maybe the awareness of G-force is something that *might* be possible to enhance throuhg "secondary" senses - like the effects on hearing, or vision, which can be simulated on the computer, while actual physical motion is much harder.

Jet fighters also have the "G-pants" which basically inflate with air when you pull high positive G's - to keep your blood out of your feet and in your head, so you don't faint so easily. This could be something you *could* do for a simulator, but it would also require special hardware. But I think the brain might be able to adapt to the understanding that pressure on your legs means higher positive G.

Vision and hearing, *might* also be used to enhance the feeling of g-force so you sense how the aircraft is moving, even though you don't sense it as motion. And that wouldnt require special hardware. It would indeed be interesting to try how adding a "hum" or whine sound that increases as you pull G's would complement the red/blackout effect.

Also, would those things work, if they were "supersensitive" even to low g-forces? A bit like the the head tracker devices that enable you to look all around the scene by moving your head a lot less to the sides (because you still need to see the screen!) - those are over-sensitive, but the brain adapts to the setup very quickly.

Maybe our brain could do something similar with exxagerated g-force cues through hearing and vision? Might there be some other ways to do this? Maybe a low bass rumble that could be felt though a subwoofer? This stuff might be interesting to play with and maybe it could work out!

//T
tigert
 
Posts: 106
Joined: Sat Nov 08, 2014 9:57 am


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest