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 slawekmikula » Fri Nov 01, 2019 7:35 pm

Impressive. Especially the last screen.
slawekmikula
 
Posts: 128
Joined: Sun Feb 19, 2017 10:31 am

Re: The Compositor

Postby icecode » Thu Nov 07, 2019 6:51 pm

More testing with the F-14, this time clustered shading lights:

Image

Image

Image

I'll write a small section on the wiki article detailing how to add support for these lights in aircrafts. The light definition is very similar to Rembrandt's (almost the same), so I'll also provide a small script so people who already ported their aircraft to Rembrandt don't even have to bother reimplementing them.
icecode
 
Posts: 710
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Compositor

Postby legoboyvdlp » Thu Nov 07, 2019 7:45 pm

Could you make the lights directional? The F-14's lights are embedded in the wing as such:

Image

So, the lights wouldn't really illuminate the wing at all.
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: The Compositor

Postby icecode » Thu Nov 07, 2019 8:01 pm

I'm not an aircraft developer, I just changed the F-14 light definitions to use the Compositor's lights instead of Rembrandt's. I guess you could change the light type to be a spotlight instead. I don't intend to commit this anyway, it's just that the F-14 is a good aircraft to test stuff on.
icecode
 
Posts: 710
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Compositor

Postby wkitty42 » Thu Nov 07, 2019 9:45 pm

how do we fix this? i'm starting FG with --compositor=Compositor/ALS/als... i think i see this also without the --compositor option...
Code: Select all
  121.83 [ALRT]:input      can't find "Compositor/Effects/light-spot.eff"
  121.83 [ALRT]:input      can't find base effect Effects/light-spot
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9161
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: The Compositor

Postby icecode » Thu Nov 07, 2019 9:51 pm

That's just FG complaining about the Rembrandt lights being missing, but it's not a problem, everything should load up just fine. If you still want to get rid of the spam, just create two files in "$FG_ROOT/Compositor/Effects" called light-spot.eff and light-point.eff with the following contents:

light-spot.eff
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
  <name>Effects/light-spot</name>
</PropertyList>


light-point.eff
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<PropertyList>
  <name>Effects/light-point</name>
</PropertyList>
icecode
 
Posts: 710
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Compositor

Postby wkitty42 » Fri Nov 08, 2019 12:29 am

thanks! i guess i haven't seen that before because i mainly only use ALS ;)

can you say if the infrared and night vision options in normal ALS also work in Compositor/ALS/als mode? they're the experimental button in the rendering dialog in-sim... i use infrared a lot when flying at night... i can understand if they're not yet ported to the compositor...

also, where do you prefer to get questions and bug reports? here, mailing list, somewhere else?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9161
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 22.04

Re: The Compositor

Postby icecode » Fri Nov 08, 2019 1:15 am

can you say if the infrared and night vision options in normal ALS also work in Compositor/ALS/als mode? they're the experimental button in the rendering dialog in-sim... i use infrared a lot when flying at night... i can understand if they're not yet ported to the compositor...


They should work the same way as before already.

also, where do you prefer to get questions and bug reports? here, mailing list, somewhere else?


Wherever you prefer, I read all of them. I'll try to collect most questions and their answers in the wiki article as I'd like to keep it as the central resource for anything related to the Compositor. Everyone is welcome to contribute with their findings.
icecode
 
Posts: 710
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Compositor

Postby Richard » Fri Nov 08, 2019 9:12 am

legoboyvdlp wrote in Thu Nov 07, 2019 7:45 pm:Could you make the lights directional? The F-14's lights are embedded in the wing as such:

So, the lights wouldn't really illuminate the wing at all.


That's how the model has always had the illuminating lights - so it's something that I need to fix.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: The Compositor

Postby Richard » Fri Nov 08, 2019 9:13 am

Icecode GL wrote in Thu Nov 07, 2019 6:51 pm:More testing with the F-14, this time clustered shading lights:

I'll write a small section on the wiki article detailing how to add support for these lights in aircrafts. The light definition is very similar to Rembrandt's (almost the same), so I'll also provide a small script so people who already ported their aircraft to Rembrandt don't even have to bother reimplementing them.


That is fantastic progress and looks great. Thanks for you hard work getting this far with the Compositor.
Richard
 
Posts: 810
Joined: Sun Nov 02, 2014 11:17 pm
Version: Git
OS: Win10

Re: The Compositor

Postby Gijs » Fri Nov 08, 2019 9:51 am

Awesome work! Looking forward to try this on my aircraft :-)
Thanks to your accompanying documentation, that should be no problem.

EDIT: Actually I do have a question/request. Is it possible to have elliptical spot lights? The 744's anti collision lights in the wingtips for example produce a light beam that covers 70 degree vertical angle and 140 degree horizontal angle...
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9548
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: The Compositor

Postby icecode » Fri Nov 08, 2019 1:11 pm

Thanks everyone for the kind words. :)

EDIT: Actually I do have a question/request. Is it possible to have elliptical spot lights? The 744's anti collision lights in the wingtips for example produce a light beam that covers 70 degree vertical angle and 140 degree horizontal angle...


Hmm, interesting. I tried to adhere as much as I could to the default OpenGL fixed pipeline definition for lights, which only defines a single cutoff angle, so it can only produce cones with circular bases. The light culling code also assumes they have circular bases (which simplifies the culling a lot). I can't think of any way to support this without excesively complicating culling, but I'll add it to the wiki anyway.
icecode
 
Posts: 710
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Compositor

Postby Thorsten » Fri Nov 08, 2019 1:34 pm

Can't we have a circular cross section of the bounding volume but make the light profile inside non-circular? Solving an elliptical intensity profile inside the shader is near-trivial.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: The Compositor

Postby icecode » Fri Nov 08, 2019 1:47 pm

That sounds good, yeah, no need to complicate anything if we just assume it is circular for culling purposes. :) What extra parameters would the shader need to solve the elliptical intensity?
icecode
 
Posts: 710
Joined: Thu Aug 12, 2010 1:17 pm
Location: Spain
Version: next
OS: Fedora

Re: The Compositor

Postby Thorsten » Fri Nov 08, 2019 2:08 pm

A vec3 perpendicular to the axis to indicate both direction and relative amplitude of the shorter elongation would probably do nicely...
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 3 guests