Board index FlightGear Development Effects and shaders

ALS Intensity to be reduced during Day mode

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

ALS Intensity to be reduced during Day mode

Postby sathish » Wed Jun 26, 2019 8:58 am

Hi,
Iam using Flightgear2017.3.1,installed this version mainly to use ALS features.Its working fine but fine tuning is required to have controls like changing light intensity to make it more realistic.That is i have difficulty in changing its intensity based on different time of day(in day time light looks so bright and it has effect on some texture part which looks different from normal).How can i able to achieve it.
sathish
 
Posts: 42
Joined: Tue Mar 13, 2018 12:51 pm

Re: ALS Intensity to be reduced during Day mode

Postby Thorsten » Wed Jun 26, 2019 10:20 am

I'm sorry, I do not understand the question - what exactly is it you would like to tune?

Light during the day can be blindingly bright in reality, leading to reduced color perception and whiteout, so generally you can not expect a texture to look as in the graphics program once the lighting equations are applied to it.

If that was the question...
Thorsten
 
Posts: 11190
Joined: Mon Nov 02, 2009 8:33 am

Re: ALS Intensity to be reduced during Day mode

Postby wkitty42 » Wed Jun 26, 2019 12:51 pm

some monitors have a self-adjusting brightness wherein they detect the ambient light in a room and become brighter or dimmer based on that ambient light... if your monitor has a feature like that, try turning it off and adjusting your monitor brightness and contrast to your liking... you might also want to calibrate your monitor settings which should help to keep the view more accurate...
"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: 5757
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: ALS Intensity to be reduced during Day mode

Postby sathish » Thu Jun 27, 2019 9:02 am

Thorsten wrote in Wed Jun 26, 2019 10:20 am:I'm sorry, I do not understand the question - what exactly is it you would like to tune?

Light during the day can be blindingly bright in reality, leading to reduced color perception and whiteout, so generally you can not expect a texture to look as in the graphics program once the lighting equations are applied to it.

If that was the question...

yes..for better understanding can refer to below link
https://drive.google.com/open?id=1OoENP ... ZfCmc5kqsY
sathish
 
Posts: 42
Joined: Tue Mar 13, 2018 12:51 pm

Re: ALS Intensity to be reduced during Day mode

Postby sathish » Thu Jun 27, 2019 9:11 am

wkitty42 wrote in Wed Jun 26, 2019 12:51 pm:some monitors have a self-adjusting brightness wherein they detect the ambient light in a room and become brighter or dimmer based on that ambient light... if your monitor has a feature like that, try turning it off and adjusting your monitor brightness and contrast to your liking... you might also want to calibrate your monitor settings which should help to keep the view more accurate...



Thanks..i can try adjusting the monitor brightness which wont be correct way for me since i am dealing with multi display projectors.
My problem is mainly i want to control the als light brightness based on different time of day. In night time i need light with more sharp and bright but the same light when i enable in day time it shouldn't look much bright and sharp as shown in below link. And also because of white runway strips it reflects als light and thus makes it to look much bright in day time which is not realistic.
https://drive.google.com/open?id=1OoENP ... ZfCmc5kqsY

Can you suggest any shader or effect file which responsible to control it in code.
sathish
 
Posts: 42
Joined: Tue Mar 13, 2018 12:51 pm

Re: ALS Intensity to be reduced during Day mode

Postby Thorsten » Thu Jun 27, 2019 11:42 am

yes..for better understanding can refer to below link


Sorry - there's nothing on the picture that looks outright wrong to me. Obviously you have a landing light on - if that is what is bothersome, perhaps switch it off (?). If not, then you need to explain what you expect to see but do not.

And also because of white runway strips it reflects als light and thus makes it to look much bright in day time which is not realistic.


Why would it not be realistic if you illuminate a white surface that it comes back white (I mean, it doesn't get brighter than white on the screen...) ?
Thorsten
 
Posts: 11190
Joined: Mon Nov 02, 2009 8:33 am

Re: ALS Intensity to be reduced during Day mode

Postby sathish » Fri Jun 28, 2019 5:43 am

Thorsten wrote in Thu Jun 27, 2019 11:42 am:
yes..for better understanding can refer to below link


Sorry - there's nothing on the picture that looks outright wrong to me. .

ya you are correct ..But actually what i meant to explain is ...
I want to control the brightness[i.e, illumination on white surface] during day time is it possible...That is i don't want the landing light to behave same in all time of day..
sathish
 
Posts: 42
Joined: Tue Mar 13, 2018 12:51 pm

Re: ALS Intensity to be reduced during Day mode

Postby Thorsten » Fri Jun 28, 2019 6:03 am

That is i don't want the landing light to behave same in all time of day..


Ah - sorry - when you say 'light' you refer to the landing light - I thought you mean the sunlight...

Lights are hard-coded in the GLSL shaders (in the example, runway-ALS.frag), you're looking for code blocks like

Code: Select all
 vec3 secondary_light = vec3 (0.0,0.0,0.0);

    if (use_searchlight == 1)
   {
   secondary_light.rgb += searchlight();
   }
    if (use_landing_light == 1)
   {
   secondary_light += landing_light(landing_light1_offset, landing_light3_offset);
   }
    if (use_alt_landing_light == 1)
   {
   secondary_light += landing_light(landing_light2_offset, landing_light3_offset);
   }

    color.rgb +=secondary_light * light_distance_fading(dist) + lightspot(relPos);


It's a pretty simple implementation, never intended to be more (and we'll be getting better lights with the compositor and ALS 2.0 in the mid-future). If I understand you correctly, the problem is that the intensities should not be just added like above (which I know...)

If you want to improve the existing implementation, the intensities would need to be added under the log - i.e. by using the addLights routine

Code: Select all
vec3 addLights(in vec3 color1, in vec3 color2)
{
vec3 outcolor;

outcolor.r  = 0.14 * log(exp(color1.r/0.14) + exp(color2.r/0.14)-1.0);
outcolor.g  = 0.14 * log(exp(color1.g/0.14) + exp(color2.g/0.14)-1.0);
outcolor.b  = 0.14 * log(exp(color1.b/0.14) + exp(color2.b/0.14)-1.0);

return outcolor;
}


You're welcome if you want to make the change, but I have to warn you in advance that there's plenty of places where the same change needs to be made unfortunately...
Thorsten
 
Posts: 11190
Joined: Mon Nov 02, 2009 8:33 am

Re: ALS Intensity to be reduced during Day mode

Postby wlbragg » Fri Jun 28, 2019 4:17 pm

Quick search for secondary_light includes the following shaders...

/home/wayne/FGFS/install/flightgear/fgdata/Shaders/agriculture-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/airfield-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/cliffs-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/drunway-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/model-ALS-base.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/model-ALS-ultra.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/model-interior-ALS-base.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/model-interior-ALS-detailed.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/model-interior-display-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/road-ALS-ultra.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/rock-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/runway-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/skydome-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/space-ALS-base.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/space-ALS-ultra.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/terrain-ALS-ultra.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/tree-ALS-shadow.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/tree-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/urban-ALS.frag:
/home/wayne/FGFS/install/flightgear/fgdata/Shaders/water-ALS-high.frag:
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 4988
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480


Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest