Board index FlightGear Development Effects and shaders

The Compositor

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

Re: The Compositor

Postby Icecode GL » Sat Nov 30, 2019 6:05 pm

Understood, should it be working "as is" then if I turn it on in the GUI under the compositor build (ALS pipeline) or does it require the shaders to still be ported to compositor/ALS?


The random vegetation shadows should be working as they did if you enable them in the Rendering menu (Vegetation Shadows), yes.
Icecode GL
 
Posts: 616
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Compositor

Postby Thorsten » Sat Nov 30, 2019 6:28 pm

They actually do, but some tweaking is required. You can discard the depth value of transparent pixels in the shadow map.


Provided we're talking about an 'either 0 or 1' situation of the transparency... I doubt a shadow map would create a colored shadow for light falling through tinted glass... :D
Thorsten
 
Posts: 11605
Joined: Mon Nov 02, 2009 8:33 am

Re: The Compositor

Postby Icecode GL » Sat Nov 30, 2019 6:36 pm

Icecode GL
 
Posts: 616
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Compositor

Postby Thorsten » Sat Nov 30, 2019 6:36 pm

Yes, I am.
Thorsten
 
Posts: 11605
Joined: Mon Nov 02, 2009 8:33 am

Re: The Compositor

Postby Icecode GL » Sat Nov 30, 2019 6:41 pm

I don't plan on implementing it though, too much performance cost for such a "simple" effect. FG doesn't heavily rely on transparent surfaces. Cockpit glass is near 100% transparent, and transparency on trees can be handled correctly by 1-bit transparency. The only issue would be rotor blades for example, where some "fading out" effect would be nice. My recommendation is to just use a noshadow animation on them.
Icecode GL
 
Posts: 616
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Compositor

Postby Thorsten » Sat Nov 30, 2019 6:48 pm

Well, we do have the opacity map as alternative for in-cockpit shadows - it can do tinted glass (I've always thought it'd be nice to have that beneath a hang-glider for instance...
Thorsten
 
Posts: 11605
Joined: Mon Nov 02, 2009 8:33 am

Re: The Compositor

Postby Gijs » Tue Dec 03, 2019 3:00 pm

Hi,

I've just had a very quick look at adding lights with the compositor. Shadows work (nice!), but I cannot seem to get the lights to work. Their volumes do show correctly when setting /sim/debug/show-light-volumes to true, so it is not an orientation or sizing issue. I've tried both spot and point lights, but even the example from the wiki does not seem to cast any light. Neither on the runway, nor the aircraft itself.

Did I miss something? Does it require a special setting to work? Is there a working example in FGAddon that I can try?
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9424
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: The Compositor

Postby Icecode GL » Tue Dec 03, 2019 3:01 pm

The merge request that implements them on FGData is pending.
Icecode GL
 
Posts: 616
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Compositor

Postby slawekmikula » Tue Dec 03, 2019 3:19 pm

Hi Icecode GL,

May I ask about testing and reporting of how Compositor works to you ?

TL;DR - what should be reported here in this thread and what should be reported to the aircraft maintainer ? What information should be included in the report ?

I'm asking what should be reported and what should be kept without any report. I know more work should be done on the aircraft side and this is not issue directly involving the Compositor itself. And (maybe) it will be frustrating to report issues that should be implemented on the Aircraft side. I'm using Compositor with Intel HD 5500 and with Nvidia 840M so rather low end specs. Nonetheless there would be some users that are going to run FG even on this hardware.

Some notes:
- visuals are very nice ! (doh)
- it seems to me that latest git version with compositor enabled is faster on above specs than without Compsitor (default or ALS). Even when there is no such gain in the FPS counter, the visual smoothness is better - flying is more enjoyable
- when aircraft have shadow map (?) e.g. C172, C182 when FG starts the shadow is opaque and there is no outside visibility. Some aircrafts (C182, PA28) have in their options checkboxes to disable shadows and then it looks OK. Some not so C172 can't be flown ATM

and thanks for this great effort :)
slawekmikula
 
Posts: 82
Joined: Sun Feb 19, 2017 9:31 am

Re: The Compositor

Postby Icecode GL » Tue Dec 03, 2019 3:29 pm

In general it's still a bit early to take "serious" bug reports, but they are welcome nevertheless. I'd ask anyone who is willing to test the Compositor to first have a look at the wiki (specially the Known Issues section) and this forum topic to see if any of the issues are already known. I don't have commit access to any of the FG repos so it's hard for me to push any quick fixes. Many bugs will stay unfixed for some time. If in doubt just write a quick report here, I prefer to see duplicate feedback than none at all. :)

it seems to me that latest git version with compositor enabled is faster on above specs than without Compsitor (default or ALS)


The removal of the near/far cameras kind of helps when using single thread mode. There is some noticeable z-fighting on the trees because of that though.

when aircraft have shadow map (?) e.g. C172, C182 when FG starts the shadow is opaque and there is no outside visibility.


Yes, that's the responsibility of the aircraft maintainer. It's too early to remove anything or to port an aircraft to the Compositor as it's not even enabled by default, but yes, the "fake" shadow Effect will have to be removed manually by the aircraft maintainer if they didn't include the option to disable.

and thanks for this great effort


Thanks for the feedback!
Icecode GL
 
Posts: 616
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Compositor

Postby Gijs » Tue Dec 03, 2019 3:39 pm

Icecode GL wrote in Tue Dec 03, 2019 3:01 pm:The merge request that implements them on FGData is pending.

Aha, I see. Adding that merge request does indeed show something. Thanks! I'll have something to play with.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9424
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: The Compositor

Postby Thorsten » Tue Dec 03, 2019 6:13 pm

Yes, that's the responsibility of the aircraft maintainer. It's too early to remove anything or to port an aircraft to the Compositor as it's not even enabled by default, but yes, the "fake" shadow Effect will have to be removed manually by the aircraft maintainer if they didn't include the option to disable.


Actually, could we not just do a compositor variant of the fake shadow effects which basically contains a discard(); in the fragment shader? That would automatically take care of the issue and discarding doesn't seem complicated.
Thorsten
 
Posts: 11605
Joined: Mon Nov 02, 2009 8:33 am

Re: The Compositor

Postby Icecode GL » Tue Dec 03, 2019 6:17 pm

Yes, in fact it's implemented like that on my personal fork. But I think it's better to recommend people to just remove it entirely as it won't be supported anymore.
Icecode GL
 
Posts: 616
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

Re: The Compositor

Postby Thorsten » Tue Dec 03, 2019 6:54 pm

But I think it's better to recommend people to just remove it entirely as it won't be supported anymore.


The maintainers who are around will do that anyway once the compositor becomes the default - as usual my worry is for the aircraft where no maintainer is around - they'll be summarily broken then.

We should try to avoid (or at least minimize) any need for manual intervention - it's ugly if you end up having to do it.
Thorsten
 
Posts: 11605
Joined: Mon Nov 02, 2009 8:33 am

Re: The Compositor

Postby Icecode GL » Tue Dec 03, 2019 7:18 pm

The maintainers who are around will do that anyway once the compositor becomes the default


They still need some kind of guideline to know what to remove, what to keep and what to add though. But yeah, I agree. :)
Icecode GL
 
Posts: 616
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Arch Linux

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest