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 6:35 pm

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

Re: The Compositor

Postby Icecode GL » Thu Nov 07, 2019 5: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 GL
 
Posts: 633
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Fedora

Re: The Compositor

Postby legoboyvdlp » Thu Nov 07, 2019 6: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: 7778
Joined: Sat Jul 26, 2014 1:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: The Compositor

Postby Icecode GL » Thu Nov 07, 2019 7: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 GL
 
Posts: 633
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Fedora

Re: The Compositor

Postby wkitty42 » Thu Nov 07, 2019 8: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: 6658
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: The Compositor

Postby Icecode GL » Thu Nov 07, 2019 8: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 GL
 
Posts: 633
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Fedora

Re: The Compositor

Postby wkitty42 » Thu Nov 07, 2019 11:29 pm

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: 6658
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: The Compositor

Postby Icecode GL » Fri Nov 08, 2019 12: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 GL
 
Posts: 633
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Fedora

Re: The Compositor

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

legoboyvdlp wrote in Thu Nov 07, 2019 6: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: 783
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: The Compositor

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

Icecode GL wrote in Thu Nov 07, 2019 5: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: 783
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: The Compositor

Postby Gijs » Fri Nov 08, 2019 8: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: 9456
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: The Compositor

Postby Icecode GL » Fri Nov 08, 2019 12: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 GL
 
Posts: 633
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Fedora

Re: The Compositor

Postby Thorsten » Fri Nov 08, 2019 12: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: 11747
Joined: Mon Nov 02, 2009 8:33 am

Re: The Compositor

Postby Icecode GL » Fri Nov 08, 2019 12: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 GL
 
Posts: 633
Joined: Thu Aug 12, 2010 12:17 pm
Location: Spain
Callsign: icecode
Version: GIT
OS: Fedora

Re: The Compositor

Postby Thorsten » Fri Nov 08, 2019 1: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: 11747
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 1 guest