Board index FlightGear Development Effects and shaders

Start with rocks

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

Re: Start with rocks

Postby gral » Fri Aug 20, 2010 2:05 pm

statto wrote:You can find cs_rock in the french alps, if you have that scenery downloaded.


I didn’t find the rocks in the french alps. I checked the mapserver but then I saw that I probably have to download this scenery somewhere else? No problem, meantime I was on vacation near Innsbruck and I send you some screens (sorry, I removed some of the trees to see the bears).

Image

Image

-gral
gral
 
Posts: 325
Joined: Mon Nov 16, 2009 1:03 pm
Location: Zurich (Switzerland)
Callsign: HB-GRAL
Version: GIT

Re: Start with rocks

Postby ot-666 » Fri Aug 20, 2010 7:08 pm

Wow :shock:
Looks like Innsbruck is getting a nice upgrade.

Oliver
Callsign: ot-666
Working on LOWI and other stuff - Custom Scenery Overlay Repo: http://gitorious.org/fgfs-custom-scenery/custom-scenery-overlay/
VMX22 - Osprey... sometimes in 2014
ot-666
 
Posts: 746
Joined: Sun Nov 08, 2009 5:14 pm
Location: Germany, Konstanz
Callsign: ot-666
IRC name: ot666
Version: GIT
OS: win7 64bit

Re: Start with rocks

Postby gral » Fri Aug 20, 2010 9:52 pm

Now this is my last screen, a mix of herbtundra shader (steep=rock) and a new forest shader (steep=rock). Yes, I need some help in cleaning up this shaders. Performance is really top, no notable fps drop at all, but I guess someone should re-check this guerilla math before I post the code somewhere.

Image

Cheers, gral
gral
 
Posts: 325
Joined: Mon Nov 16, 2009 1:03 pm
Location: Zurich (Switzerland)
Callsign: HB-GRAL
Version: GIT

Re: Start with rocks

Postby erik » Sat Aug 21, 2010 7:59 am

Usually it works the other way around; you post the code and people start looking at it .. :)
Looks nice by the way!

Erik
erik
 
Posts: 1563
Joined: Thu Nov 01, 2007 1:41 pm

Re: Start with rocks

Postby Thorsten » Sat Aug 21, 2010 12:29 pm

I think the gradient-based approach works rather well - your results are pretty impressive and the distribution of textures looks very natural and relistic! I wonder if a small modification would give an even better result:

Currently mountaintops (which tend to be flat, the Matterhorn is rather exceptional) would be painted in tundra. In reality, above a given altitude they tend to be bare. So I am thinking if it makes sense to impose an altitude condition above which bare rock (or snow/ice/glacier) is always used, no matter if the terrain is flat or not.
Thorsten
 
Posts: 11464
Joined: Mon Nov 02, 2009 8:33 am

Re: Start with rocks

Postby gral » Sat Aug 21, 2010 12:43 pm

Thorsten wrote:I think the gradient-based approach works rather well - your results are pretty impressive and the distribution of textures looks very natural and relistic! I wonder if a small modification would give an even better result:

Currently mountaintops (which tend to be flat, the Matterhorn is rather exceptional) would be painted in tundra. In reality, above a given altitude they tend to be bare. So I am thinking if it makes sense to impose an altitude condition above which bare rock (or snow/ice/glacier) is always used, no matter if the terrain is flat or not.


Yes, you are right. I was thinking about that too. But first I have to check my atlas :oops: because I think there are some regions where the 'rock-level' is not at same height as here in the alps. And I will change snow/ice/glacier too, but that will take some time. I am also not very happy with the 'look-and-feel' of the snow which comes in with snow-level. But should be possible to change that once with the new transitions I do.

Cheers, gral
gral
 
Posts: 325
Joined: Mon Nov 16, 2009 1:03 pm
Location: Zurich (Switzerland)
Callsign: HB-GRAL
Version: GIT

Re: Start with rocks

Postby fredb » Sat Aug 21, 2010 1:03 pm

The snow is simply the white color applied instead of the base texture. It could be another, more appealing, texture
Edit: Rock effect is in git
User avatar
fredb
 
Posts: 756
Joined: Fri Dec 01, 2006 10:41 am
Location: Paris, France

Re: Start with rocks

Postby Thorsten » Sat Aug 21, 2010 3:40 pm

Yes, you are right. I was thinking about that too. But first I have to check my atlas because I think there are some regions where the 'rock-level' is not at same height as here in the alps.


To 0th approximation a constant value would be fine - right now you also have a constant which happens to be infinity - so any finite value is an improvement.

I suppose to 1st approximation a simple function of latitude would do for the altitude above which there is no vegetation. It's basically a function of temperature, which is a function of altitude and averaged thermal flux from the sun, which is in turn given by something like the sine of the average angle of sun and horizon - pretty much what I used for thermal activity as a function of latitude. If it's worth putting that into the shader effect I don't really know.

And to get it *really* right, a detailed landcover map is needed.
Thorsten
 
Posts: 11464
Joined: Mon Nov 02, 2009 8:33 am

Re: Start with rocks

Postby statto » Sat Aug 21, 2010 3:45 pm

If we can use CORINE data then that will help a lot.

I'm also currently compiling land cover data for Switzerland, which isn't covered by CORINE. Good land cover is unfortunately the simplest way to go about these things... I say unfortunately because we have so little of it at the moment.
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2113
Joined: Fri Jan 25, 2008 9:57 pm

Re: Start with rocks

Postby gral » Sat Aug 21, 2010 10:10 pm

Thorsten wrote:To 0th approximation a constant value would be fine - right now you also have a constant which happens to be infinity - so any finite value is an improvement.


I added a simple vegetationlevel in the shader and this looks like this:

Image

This is only one landclass, and not very accurate, i.e. the trees coming from FG-trees do not care about vegetationlevel yet, and there should be other cover. I try to bring all this things together.

Thorsten wrote:I suppose to 1st approximation a simple function [...]


When you have time to write such a function for this shader you’re welcome at any time. Here is a bit overload at the moment :wink:

Statto: There is CORINE for Switzerland, but it has not come to the main CORINE database yet. Switzerland uses its own classification system and I heard that some people are working to transfer the data. Beside of that I had a look to the new Swiss Corine Data this spring and it looks like the best we can ever have is own and 'handmade' covering like you and other people do. We will need good and accurate coverage independent of improvements of the shaders, I am sure about that.

Thanks- gral
gral
 
Posts: 325
Joined: Mon Nov 16, 2009 1:03 pm
Location: Zurich (Switzerland)
Callsign: HB-GRAL
Version: GIT

Re: Start with rocks

Postby erik » Sun Aug 22, 2010 7:57 am

About this code, I really think it should be added to terrain-default.frag (and then refined in the various terrain type shaders). That way the same basic rules will also apply to (for instance) the snow cover.

Also, I've lost the bump map effect recently but am not yet sure if this effect is causing it. In fact, the effects level slider doesn't haven any effect here.

Erik
erik
 
Posts: 1563
Joined: Thu Nov 01, 2007 1:41 pm

Re: Start with rocks

Postby Thorsten » Sun Aug 22, 2010 11:51 am

Hm, quite nice :-)

I've noticed another thing - the transitions from rock to vegetation look very gradual and natural. This is rather different from the technique of actually using detailed landcover - which has sharp boundaries. This is maybe more a question to statto - I wonder if the technology gral is using could be applied to smooth transitions between different landcover textures?

Ye another thing - I wonder when the next terrain release will be - does anyone have an idea?

When you have time to write such a function for this shader you’re welcome at any time.


The function as such isn't that difficult - it's a constant plus a different constant times the cosine of the latitude. I just have no idea how to get the info at which latitude we are into the shader.
Thorsten
 
Posts: 11464
Joined: Mon Nov 02, 2009 8:33 am

Re: Start with rocks

Postby statto » Sun Aug 22, 2010 7:20 pm

gral's work does look really good, though I wonder if it's more a "simulation" of land cover than actual land cover itself. I maintain good land cover solves most problems, but considering there are very few areas with detailed land cover... (more are on the way in the next terrain build, but there aren't many large scenery areas of completely custom scenery - France, Hawai'i, Long Island, Qatar, and the USA Pacific Northwest are the only ones which spring to mind, of which only Hawai'i is currently available on TerraSync).

In real life, land cover doesn't actually have sharp boundaries - this is one of the limitations of software. I don't know how gral is doing his work, though, but that would be a great development.

Also, I'm independently developing land cover data for western Switzerland (just west of Romanshorn to the northeast, to just east of Geneva in the southwest - the LANDSAT just misses Walensee to the east, so apologies to the Appenzellers). It won't be as good as CORINE data, but Switzerland is a gorgeous country and deserves better.
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2113
Joined: Fri Jan 25, 2008 9:57 pm

Re: Start with rocks

Postby HHS » Sun Aug 22, 2010 7:44 pm

statto wrote:Also, I'm independently developing land cover data for western Switzerland (just west of Romanshorn to the northeast, to just east of Geneva in the southwest - the LANDSAT just misses Walensee to the east, so apologies to the Appenzellers). It won't be as good as CORINE data, but Switzerland is a gorgeous country and deserves better.


Great! Together with the shaders by gral that will look great!

Are you bound to the boundaries of switzerland or are some few miles around also done by you?
The real problem with our sceneries are that the SRTM datas are not exact for such high mountains like the alps. The current Matterhorn in FGF looks rather poor compared to the real one....
Up, up and away
User avatar
HHS
Retired
 
Posts: 3624
Joined: Thu Jul 19, 2007 8:09 am
Version: GIT

Re: Start with rocks

Postby statto » Sun Aug 22, 2010 9:06 pm

Actually, I flew by the Matterhorn and it's there and it's distinct. I was expecting a lot less from the scenery, to be honest. I can do where the LANDSAT image covers, but a lot of that is covered by CORINE data...

But replicating the actual Matterhorn... that would be spectacular.

Image
Custom Scenery available from http://www.stattosoftware.com/flightgear
statto
 
Posts: 2113
Joined: Fri Jan 25, 2008 9:57 pm

PreviousNext

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 1 guest