Board index FlightGear Development Effects and shaders

Slope line patterns

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

Slope line patterns

Postby Thorsten » Sun Apr 20, 2014 2:56 pm

I've finally sort of succeeded to elongate noise pattern along the direction of steepest descent. This is a surprisingly hard problem, and it has taken me four attempts to get something halfway reasonable, but I think the technique might now be viable.

Here's an example for slope line patterns in snow:

Image

For comparison without the feature:

Image

And this is how the added noise distortion affects vegetation patterns:

Image

So, this is something that can be combined with curvature information to specifically model erosion patterns etc.
Thorsten
 
Posts: 10827
Joined: Mon Nov 02, 2009 8:33 am

Re: Slope line patterns

Postby Johan G » Mon Apr 21, 2014 1:53 pm

Is this an early attempt at the improvement possibilities mentioned in Towards better scenery rendering - what do we really need?? :D

Looks promising anyway. :D
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)
Johan G
Moderator
 
Posts: 5480
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Slope line patterns

Postby Thorsten » Mon Apr 21, 2014 3:17 pm

Sort of - the steepest descent is available as is, but curvature needs to be done outside of the shaders.
Thorsten
 
Posts: 10827
Joined: Mon Nov 02, 2009 8:33 am

Re: Slope line patterns

Postby wlbragg » Thu Apr 24, 2014 12:49 pm

Impressive!
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4808
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Slope line patterns

Postby vanosten » Sun May 25, 2014 2:59 pm

Thorsten wrote in Sun Apr 20, 2014 2:56 pm:So, this is something that can be combined with curvature information to specifically model erosion patterns etc.


  • Could you please elaborate a bit what you mean with "curvature information"? Where does this information come from? Is it the elevation model, preprocessing of location specific textures?

The reason I am asking is that the biggest thorn in my eye (also compared to X-Plane) is that rocky areas do not look very plausible in FG. Actually your picture above with vegation looks much more plausible than the ones I get. So I would like to know what I should do to get something equal (I would not mind using GIS, terragear etc).

Please see my screenshots below taken from a very recent Windows Git version (Windows 8.1 64bit, Nvidia 780M, all shader settings to full, Terrasync near LSZC, i.e. near Lucern in Switzerland):
  • Why do I not get the same nice green vegetation in the rocky areas? It looks ok with some green areas without ALS on some textures with trees, but not in the exclusive rock areas
[list][*]Why is there such a big difference with ALS/Rembrandt compared to without? It looks like there is not only some light scattering, but a total replacement of textures. And the light green ALS texture really looks bad in the mountains.

Bürgenstock real, without ALS and with ALS:
Image
Image
Image

Pilatus real (different angle), without ALS and with ALS:
Image
Image
Image

Mountain without ALS and with ALS:
Image
Image
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 410
Joined: Sat Sep 25, 2010 5:38 pm
Location: Denmark - but I am Swiss
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: Slope line patterns

Postby Thorsten » Sun May 25, 2014 6:20 pm

Could you please elaborate a bit what you mean with "curvature information"?


Curvature is the rate of change of the slope as you go into x and y direction. Since this requires information away from the vertex, it has to be precomputed. A round summit has zero slope, but positive curvature into all directions. A flat valley bottom has zero slope as well, but small positive curvature in one direction (alone the valley) and strong negative curvature (perpendicular to the valley). So having curvature info, we could selectively change the overlay pattern along valley floors without touching summits.

So I would like to know what I should do to get something equal (I would not mind using GIS, terragear etc).


Judging from the screenshots, despite of what you're saying you are running ALS at lowest quality setting, so you get low visual quality. I can see none of the higher quality ALS effects anywhere. For instance in the Bürgenstock picture, ALS at high quality would change the forest slope into rock at just the same threshold as the old forest effect, and the fact that you're not seeing this tells me you're running on low quality level.

Yosemite is quite the same situation where the base texture is forest, and it looks like this when rendered at high quality:

Image

Another possibility is that you are using custom scenery/ a custom materials file which doesn't define any overlay texture effects - see Procedural Texturing for an introduction.

Why do I not get the same nice green vegetation in the rocky areas?


I guess niceness is in the eye of the beholder here... I don't find this particular effect visually consistent, and I have no plans of porting it.

Why is there such a big difference with ALS/Rembrandt compared to without? It looks like there is not only some light scattering, but a total replacement of textures.


Well, Rembrandt does the replacement of textures here, ALS shows you the actually defined base texture (try lowering quality level in Rembrandt, and you'll see). But the observation is quite correct as such, ALS by now has a rather sophisticated toolkit for procedural texturing and environment effects which Rembrandt simply doesn't have - see the wiki link above for what it can do.

And the light green ALS texture really looks bad in the mountains.


That's not an ALS problem - it just takes the texture which is defined in materials. If the landclass at the summit is classified as irrigated crop, you get to see whatever is defined as irrigated crop in materials.xml , the shader doesn't correct that for you, the idea is that you make a regional definition instead. Rembrandt has a different philosophy, I think it was intended to work all over the world. In ALS you can draw any texture you like, define small-sized overlay patches of vegetation on the rock, whatever takes your fancy... Procedural texturing is a very neat toolkit.
Thorsten
 
Posts: 10827
Joined: Mon Nov 02, 2009 8:33 am

Re: Slope line patterns

Postby Thorsten » Mon May 26, 2014 1:17 pm

Quick test - this is what I am getting for the Bürgenstock and surroundings out of the box (i.e. without changing any texture definitions):

Image

This is a view of Pilatus and surrounding area:

Image

Sure isn't perfect (regionalizing would probably improve it), but it looks quite acceptable to me...
Thorsten
 
Posts: 10827
Joined: Mon Nov 02, 2009 8:33 am

Re: Slope line patterns

Postby vanosten » Mon May 26, 2014 5:49 pm

Thank you for your reply. I found the error. I was not aware of the fact that under View -> Render Options -> Shader Options you actually have to define the options twice: once for without ALS (which I already have a max quality) and then again for ALS (which I did not touch before and therefore "Transition" was not set to high).
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 410
Joined: Sat Sep 25, 2010 5:38 pm
Location: Denmark - but I am Swiss
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: Slope line patterns

Postby vanosten » Thu Jun 05, 2014 5:09 pm

Unfortunately I stiil do not get it. While the slope stuff is solved as per my previous post, I still cannot find out how to "get rid" of the lightgreen texture.
  • It seems to me that the texture is fgdata\Textures\Terrain\cropgrass-hires.png, however this texture is neither referenced in fgdata\Materials\default\materials.xml, nor in fgdata\Materials\base\materials-base.xml nor in fgdata\Materials\regions\europe.xml.

I would be glad if you could elaborate more, how to get rid of this sppecific texture in this specific context.
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 410
Joined: Sat Sep 25, 2010 5:38 pm
Location: Denmark - but I am Swiss
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: Slope line patterns

Postby Thorsten » Thu Jun 05, 2014 5:21 pm

It's probably cropgrass-hires-autumn.png (with the alpha-channel edited to encode autumn coloring) and it's probably referenced in Materials/regions/materials.xml.

As for how to get rid of it privately, simply edit materials.xml to include what you want. As for how to get rid of it on GIT, make a regional definition for Switzerland or whatever region you like (similar to how other regional definitions are done in Materials/regions/...) and demonstrate to me that it doesn't make other areas look much worse and doesn't screw up the autumn colors in Europe - if you can come up with something better, I'll be happy to commit it.
Thorsten
 
Posts: 10827
Joined: Mon Nov 02, 2009 8:33 am

Re: Slope line patterns

Postby vanosten » Sun Jun 08, 2014 6:27 am

Well, I do not share the basic position and tone in the above statements.
[Iist][*] I have started to make experiments with regional texturing/procedural texturing and do see some fine results. There is just no way that any shader will be able to visualize e.g. the Alps in a plausible way based on Corine data only. Those of us like me, who want to have more than what is out of the box, need to do a combination of some pre-processing in GIS and regional texturing.[/list]
  • ALS shaders and thereby framerate can be tuned using View -> Render Options -> Shader Options (from a usability point of view maybe there should be a special dialog for ALS as there is for Rembrand)
Maintaining osm2city. Contributing with ground attack stuff to the OPRF FlightGear military-simulation community.
vanosten
 
Posts: 410
Joined: Sat Sep 25, 2010 5:38 pm
Location: Denmark - but I am Swiss
Callsign: HB-VANO
Version: latest
OS: Win 10 and Ubuntu

Re: Slope line patterns

Postby wlbragg » Sun Jun 08, 2014 6:45 am

I think ALS and Rembrandt both have an off switch!
I have a low to med end box and ALS works just fine. Could the fps be improved, probably. Know how? Go for it.
Please keep going Thorsten, some of us really appreciate what your doing and for those that don't, well, there is that off switch.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4808
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Slope line patterns

Postby Thorsten » Sun Jun 08, 2014 8:29 am

There is just no way that any shader will be able to visualize e.g. the Alps in a plausible way based on Corine data only


I wouldn't say that in general. Shaders are an awfully flexible technology, and if we were to write custom shaders for the task, we could introduce a model in which we for instance switch the texture for pasture cover based on altitude, introduce differences between northern and southern slopes and even take the latitude into account to make the Italian Alps different from the German Alps.

It's not that it can't be done, but I largely try to develop general-purpose tools which can be customized to some degree - so there's a limit how accurate the tools will be in any particular test case.

Having said that - that's French Alps, and I would call that plausible (also, most of the pics are pre-procedural texturing, it's quite a bit better now)...

Image
Image
Image

a driving simulator can easily turn to impostors to speed up rendering, in a flight simulator not so much. You can't cut corners without the result starting to look silly at some point.


Well, in addition to that, z-buffering is vastly more effective on the ground than in air, agressive optimization of the scene can be done by dividing it into 'levels' since it's clear what can be seen from any of the rather restricted possible points of view,... knowing we render from the ground only, it'd be no problem at all making FG run 10 times as fast...

from a usability point of view maybe there should be a special dialog for ALS as there is for Rembrand


I'm not sure about that one, and we have discussed it a few times. Where would a user expect things like ice on the water, or a snowline? Environment is not a bad place - although the majority of the environment condition effects are ALS only. Likewise, air pollution or fog distribution is a weather setting - although only ALS currently is capable of rendering it.

So I think we do have things where they belong - environment-specific stuff under environment, weather specific stuff with weather and technical stuff like quality settings and rendering ranges under view. I mean, would a user suspect that he has to look under shader effects to adjust a snowline?
Thorsten
 
Posts: 10827
Joined: Mon Nov 02, 2009 8:33 am

Re: Slope line patterns

Postby radi » Sun Jun 08, 2014 10:10 am

punkepanda wrote in Sat Jun 07, 2014 9:53 pm:At this point I dont think that flightgear deserves its large community at all.


Right. Flightgear, an organization rich beyond imagination, is bribing all those individuals to pretend they like, support, or even use this crappy piece of code.

Guys, keep up the good work! Kids, go to school.
OSM buildings for LOWI, EDDC
Custom scenery for VHXX YMML
Edit .stg via the FG Object Placement Tool
radi
 
Posts: 640
Joined: Mon Aug 25, 2008 4:24 pm
Location: YMML, EDDC

Re: Slope line patterns

Postby Thorsten » Sun Jun 08, 2014 12:52 pm

@punkepanda: In case you actually have a constructive contribution to make - please be aware that you are for reasons explained elsewhere on my ignore list and I can't read anything you write. So if you want to have a serious discussion, you need to write me a PN and make a case for being taken seriously again.

If on the other hand this is (as it would seem from quotes by others) the same destructive rant we have seen before, interspersed with OpenGL buzzwords and things which (by miracle?) *should* be possible, then please just get out of this thread. We have established before that you do not understand 3D rendering to the level that you can make a meaningful contribution (which demanding miracles simply is not). The FG forum is not the place to solve your personal issues, kindly take them elsewhere.
Thorsten
 
Posts: 10827
Joined: Mon Nov 02, 2009 8:33 am

Next

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 3 guests