Board index FlightGear Development Effects and shaders

Rembrandt, lights and shaders

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

Rembrandt, lights and shaders

Postby Harald » Sun Jun 03, 2012 8:08 am

Hi,

I was wondering, since we can have a lot of lights in a scene, which light(s) we can have in a pixel shader.
Of course in day time the dominant light is the one from the sun so the problem is solved, but what about night time ? Do we still get the sun light ? or the moon light ? or the light from the nearest / strongest light source ?
I now this won't have any visual impact in most situations and it's only important for shaders that use more than just the geometry normals (bump mapping, reflection mapping, etc) but I was just wondering ;)

Also, can the 'normal' buffer be fed by the pixel shader to alter the normals or will this buffer only contain normals that come from the geometry ?

HJ.
Last edited by Gijs on Sun Jun 03, 2012 3:57 pm, edited 1 time in total.
Reason: Rembrandt, with an "e" ;-)
Harald
 
Posts: 179
Joined: Fri Mar 02, 2007 5:30 pm
Location: Strasbourg, France
Version: nightly
OS: Windows 10

Re: Rambrandt, lights and shaders

Postby Thorsten » Sun Jun 03, 2012 2:28 pm

In Rembrandt, you get all the light from the light sources which are declared (I think usually that would be the sun and anything that is declared in scenery models - I don't think the moon is done yet, but in principle it could be).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Rembrandt, lights and shaders

Postby fredb » Sun Jun 03, 2012 3:39 pm

If you write a shader, you don't have to worry about lights. All you have to do is to write the right, unlit, values in the right buffers (normals, diffuse and combined specular and emissive, see the wiki). If you do that, your material will respond to every light in the vicinity, even if we decide to enable moonlight.
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Rembrandt, lights and shaders

Postby Gijs » Thu Jun 14, 2012 12:47 pm

Fred, is there a way to adjust the bloom intensity, just like ambient occlusion? I think the bloom effect is a little too strong.
This video is unedited (basic weather, no shaders apart from water), but looks edited because of all the bloom. Especially the horizon lights up a lot...



PS: First time using Camtasia, but it seems to be the holy grail for capturing videos without significant framerate loss!
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: Rembrandt, lights and shaders

Postby fredb » Thu Jun 14, 2012 1:03 pm

The water shader is not rembrandt compatible and react to bloom because it puts blue values in the emission buffer. The blue channel is used for emission and bloom blurs the emission.
Check the debug buffers and disable water to see the difference
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Rembrandt, lights and shaders

Postby LukeaFG » Thu Jun 14, 2012 2:10 pm

How come I cant get the rembrandt options in my rendering menu, I am using the latest GIT. Is it to do with the graphics card?
Cheers
LukeaFG
 
Posts: 269
Joined: Sun May 06, 2012 10:19 am

Re: Rembrandt, lights and shaders

Postby Gijs » Thu Jun 14, 2012 2:14 pm

http://wiki.flightgear.org/Project_Remb ... _Rembrandt

@Fred: ah ok. The water shader looked quite good, so I assumed it was fixed. But the horizon still has the strong bloom, independent of the water shader (see 0:18 in the video)...
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: Rembrandt, lights and shaders

Postby LukeaFG » Thu Jun 14, 2012 2:38 pm

Sorry again, I use the GUI menu to start FG. Where do I paste the (--enable-rembrandt)
LukeaFG
 
Posts: 269
Joined: Sun May 06, 2012 10:19 am

Re: Rembrandt, lights and shaders

Postby Gijs » Thu Jun 14, 2012 2:49 pm

Behind FG_EXECUTABLE, first page.
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: Rembrandt, lights and shaders

Postby LukeaFG » Thu Jun 14, 2012 3:19 pm

sorry im completely lost.. This is the first page i get
Image
LukeaFG
 
Posts: 269
Joined: Sun May 06, 2012 10:19 am

Re: Rembrandt, lights and shaders

Postby Gijs » Thu Jun 14, 2012 3:39 pm

Excutable then. Simply add it behind the path that's there (with a space between it of course) :P
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: Rembrandt, lights and shaders

Postby LukeaFG » Thu Jun 14, 2012 3:43 pm

Ohhh right,I never knew you could do that, Thanks again Gijs :)
LukeaFG
 
Posts: 269
Joined: Sun May 06, 2012 10:19 am

Re: Rembrandt, lights and shaders

Postby fredb » Thu Jun 14, 2012 7:26 pm

or
Image
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Re: Rembrandt, lights and shaders

Postby LukeaFG » Thu Jun 14, 2012 7:54 pm

My FlightGear doesnt even start not even the launcher to get to the flightsim world :P I would love to try this.. Is this effect really GPU intensive?
LukeaFG
 
Posts: 269
Joined: Sun May 06, 2012 10:19 am

Re: Rembrandt, lights and shaders

Postby fredb » Thu Jun 14, 2012 8:45 pm

Gijs wrote in Thu Jun 14, 2012 2:14 pm:@Fred: ah ok. The water shader looked quite good, so I assumed it was fixed. But the horizon still has the strong bloom, independent of the water shader (see 0:18 in the video)...


Really ?

Image
User avatar
fredb
 
Posts: 753
Joined: Fri Dec 01, 2006 11:41 am
Location: Paris, France

Next

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 4 guests