Board index FlightGear Development Effects and shaders

Water shader

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

Re: Water shader

Postby mifi » Sat Oct 16, 2010 1:52 pm

I know this has been discussed before in another thread, but I do not remember the outcome.

I just made a picture in which the sun and its reflection in the new water shader do not line up.

Image

What was causing this again? Should it not be corrected?

m
mifi
 
Posts: 327
Joined: Mon Jul 23, 2007 4:24 pm
Location: NL
Version: git next
OS: Ubuntu 18.04.x Gnome

Re: Water shader

Postby fredb » Sat Oct 16, 2010 2:15 pm

I was thinking the issue was that the sun is misplaced, but comparing with an image made with a previous version of the shader :
Image
It may be that the shader is at fault.
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Water shader

Postby Gijs » Sat Oct 16, 2010 2:45 pm

Could it be related to viewtopic.php?p=97274#p97274 ?
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Water shader

Postby mifi » Sat Oct 16, 2010 2:50 pm

It looks like the sun is about one sun-width off. Coincidence?

m
mifi
 
Posts: 327
Joined: Mon Jul 23, 2007 4:24 pm
Location: NL
Version: git next
OS: Ubuntu 18.04.x Gnome

Re: Water shader

Postby flak » Mon Oct 18, 2010 9:44 am

Is it possible to try out this code without having the GIT version of FG??
I have FG 2.0
flak
 
Posts: 76
Joined: Mon Feb 22, 2010 6:20 pm
Callsign: Anant
Version: Git
OS: Windows 7

Re: Water shader

Postby Pilot Penguin » Mon Oct 18, 2010 7:39 pm

Hi everybody!

I have been having this same problem too, it does look like it is a problem with the shader. Could it be that the texture is misplaced and is always a little off from the sun?

Cheers!
Pilot Penguin
"Life is like a box of chocolates: you never know what you're gonna get." --Forest Gump

Current Project: BAe-146
User avatar
Pilot Penguin
 
Posts: 122
Joined: Wed Sep 15, 2010 12:51 am
Location: BGR
Callsign: Pilot_P
Version: GIT
OS: Mac OS X

Re: Water shader

Postby Johan G » Mon Oct 18, 2010 8:46 pm

I think Gijs have pointed to a proper reason for the glitch a few posts above:
Gijs wrote:Could it be related to viewtopic.php?p=97274#p97274 ?


HHS wrote:As I found out, it has nothing to do with the water-shader.

When you increase time (T/t-key) you will notice, that the specular effect on scenery and objects changes in steps.
As you can see here:


That happens also when you disable all materials shader, so it has nothing to do with the shader.

Though I haven't tested it myself.
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)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Water shader

Postby flak » Thu Oct 21, 2010 7:21 am

the file at http://terra.sablonier.ch/water/water-next.zip seems to have been removed :(

Where can i download the file(s) from, without GIT?
flak
 
Posts: 76
Joined: Mon Feb 22, 2010 6:20 pm
Callsign: Anant
Version: Git
OS: Windows 7

Re: Water shader

Postby planetacancun » Fri Oct 22, 2010 8:07 pm

Yay this is on GIT now, good job guys and thank you!
Callsign:Fallen-
Videos: http://youtube.com/planetacancun2
planetacancun
 
Posts: 322
Joined: Thu Jul 30, 2009 5:52 pm
Callsign: Fallen-
IRC name: Fallen-
Version: GIT
OS: Ubuntu

Re: Water shader

Postby Oscar » Wed Oct 27, 2010 9:06 pm

Ok I have no idea if this is possible, but this idea just came up in my mind: wouldn't it be very cool to apply this shader (actually a similar version of it) to runways and taxiways when it's raining? I know there's not much sunshine when it's raining, but I mean just the light-reflecting idea.

Would this be possible?
User avatar
Oscar
 
Posts: 425
Joined: Sat Sep 05, 2009 2:12 pm
Location: The Netherlands
OS: Mac OS X

Re: Water shader

Postby Liam » Thu Oct 28, 2010 9:16 pm

Oscar wrote:Ok I have no idea if this is possible,
... Would this be possible?


Of course, anything is possible.

Oscar wrote:Wouldn't it be very cool to apply this shader (actually a similar version of it) to runways and taxiways when it's raining? I know there's not much sunshine when it's raining, but I mean just the light-reflecting idea.

It would certainly be possible, however to be realistic lighting would need to be included for runway lights reflections as well as lunar reflection, something the ocean shaders do not even comprise of. Alternatively; similarly to aircraft reflective shaders there could be an image map used to reflect when the camera is tilted, neither being very realistic nor effective at showing where the light is really coming from.

Work on the water shaders and possible integration of TRUE reflections would probably need to be discovered before true reflections of things like runways would work- unless you want one which just reflects the sun (which isn't very realistic IMO).
User avatar
Liam
 
Posts: 1905
Joined: Tue Dec 23, 2008 4:33 pm
Location: United Kingdom
Callsign: Liam
Version: GIT
OS: MAC OS X

Re: Water shader

Postby Hooray » Wed Nov 17, 2010 10:48 am

Oscar wrote:Ok I have no idea if this is possible, but this idea just came up in my mind: wouldn't it be very cool to apply this shader (actually a similar version of it) to runways and taxiways when it's raining? I know there's not much sunshine when it's raining, but I mean just the light-reflecting idea.


I like this idea, visualizing (and eventually simulating) runway contamination would be a great feature.
I have created a new wiki page dedicated to collecting shader related ideas: http://wiki.flightgear.org/index.php/Shader_requests
This is linked to from the volunteer page: http://wiki.flightgear.org/index.php/Volunteer

I have already added your idea there.

So if you have any other ideas for new shaders (or improvements to existing ones), please add those there.
I think it's a good idea to collect such ideas in a central place, so that new contributors can get started more easily.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Water shader

Postby i4dnf » Wed Nov 17, 2010 10:53 am

I think that the effect for contaminated runways could be achieved by using the reflect-bump-spec shader, with different settings for rain/snow.
i4dnf
Retired
 
Posts: 743
Joined: Wed Sep 09, 2009 8:17 am
Location: LRBS
Callsign: YR-I4D
Version: GIT
OS: Gentoo Linux ~amd64

Re: Water shader

Postby HatB » Thu Nov 18, 2010 9:59 pm

hey.. how can i install this shader? i have the Git version of FG on my Macbook White, running OS X 10.6 , and i always use the bar Performance/Quality in 2.5 .. can someone please help me? i'd be veeery pleased =))
HatB
 
Posts: 7
Joined: Tue Nov 02, 2010 8:18 pm

Re: Water shader

Postby curt » Fri Nov 19, 2010 5:55 pm

fredb wrote:It happens that the light direction is not updated every frame, so sun position and light direction are most of the time out of sync. You can see it when using time acceleration, or look my video posted in this thread. This is not gral's fault, but a core feature to save precious cpu resources. Without this kind of eye candy, it is barely noticeable.

Edit: beaten by Heiko :wink:


But wouldn't the sun/reflection be in sync periodically when the math is updated? I'm seeing a constant offset and it's never lined up right.

Curt.
curt
Administrator
 
Posts: 1168
Joined: Thu Jan 01, 1970 1:00 am
Location: Minneapolis, MN

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 8 guests