Board index FlightGear Development Scenery

Coverage of the current material regions in FGDATA

Questions and discussion about enhancing and populating the FlightGear world.

Re: Coverage of the current material regions in FGDATA

Postby stuart » Sat May 23, 2020 8:59 am

If it’s easier for you, just send me the file and I’ll work it out and commit it on your behalf.
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1587
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: Coverage of the current material regions in FGDATA

Postby vnts » Sat May 23, 2020 4:07 pm

As there wasn't an update to FGData, and Thorsten said it was a 2 line fix I had a look at the effects file hoping it wasn't the technique selection logic. No idea what the full formula for quality settings& selection is, and how it changed in the compositor - and not sure it's documented anywhere so I didn't try to fix back then as I thought it might be a convoluted selection logic problem.

The culprit was the 1st pass rendering of the normal terrain underneath the overlays with full lighting/haze as screenshots implied. That pass is just missing the 2 shadow-includes. Just a WiP porting thing.

Code: Select all
      <program>
        <vertex-shader>Shaders/ALS/terrain-ultra.vert</vertex-shader>
        <vertex-shader>Shaders/ALS/filters.vert</vertex-shader>
        <vertex-shader>Shaders/ALS/shadows-include.vert</vertex-shader> <!-- new -->
        <fragment-shader>Shaders/ALS/terrain-ultra.frag</fragment-shader>
        <fragment-shader>Shaders/ALS/noise.frag</fragment-shader>
        <fragment-shader>Shaders/ALS/cloud-shadowfunc.frag</fragment-shader>
        <fragment-shader>Shaders/ALS/hazes.frag</fragment-shader>
        <fragment-shader>Shaders/ALS/secondary_lights.frag</fragment-shader>
        <fragment-shader>Shaders/ALS/filters.frag</fragment-shader>
        <fragment-shader>Shaders/ALS/shadows-include.frag</fragment-shader> <!-- new -->
      </program>


That's 2 lines accounted for: )
Maybe in time for the bug fix release.
:mrgreen: :mrgreen: https://imgur.com/a/YIRRtt2

Kind regards
vnts
 
Posts: 262
Joined: Thu Apr 02, 2015 12:29 am

Re: Coverage of the current material regions in FGDATA

Postby stuart » Sat May 23, 2020 5:42 pm

Marvellous! That's fixed it. Thanks very much to both of you for being able to diagnose and fix the problem.

I'll get it checked in, and also set the minimum latitude for the north_atlantic_islands to 60 to it doesn't over-ride the UK materials.

-Stuart
G-MWLX
User avatar
stuart
Moderator
 
Posts: 1587
Joined: Wed Nov 29, 2006 9:56 am
Location: Edinburgh
Callsign: G-MWLX

Re: Coverage of the current material regions in FGDATA

Postby vnts » Thu Oct 01, 2020 8:16 am

ludomotico wrote in Fri Apr 03, 2020 3:50 pm:Also, california.xml is a great region with very good custom materials, and it is not loaded in materials.xml

Thorsten wrote in Sat Apr 04, 2020 5:42 am:I've disabled it because it is a region exclusively designed for low-level flight - it has very strong and pronounced tiling from airliner altitude and this needs fixing.

I agree that the textures are great and that the low-level visuals are very compelling, but things really need to work for more use cases.


I've been working towards detiling this work by Glibertohasnofb, to be hopefully/maybe included in the LTS :mrgreen: if it's deemed not too risky.

Is there anything specific (textures, materials, landclasses, locations) that I need to look at?

References to current files in sourceforge:
Materials.xml: link (uncomment california.xml here if anyone wants to see the effect in their system)
California.xml: link
Textures folder: link


----

Problem 1: Material: DryCropPastureCover, DryCrop. Effect: Forest. Texture: Terrain/california-drycrop.png is a square agriculture tile, but it's repeated and shows tiling.

Solution so far: Use agriculture effect with rotation flag of 2 for 90 degree. It's not perfect - but the imperfection looks like it might be due to the mesh uv not being continuous (?). If so, it should go away with a correct rebuild.

Code: Select all
<!--New definition -->
<!-- Notes for review: detiled, not perfect probably due to terrain mesh issues. -->
  <material>
    <name>DryCropPastureCover</name>
    <name>DryCrop</name>
    <effect>Effects/agriculture</effect>
    <texture-set>
       <texture>Terrain/california-drycrop.png</texture>
    </texture-set>
    <object-mask>Terrain/california-drycrop-mask.png</object-mask>
    <parameters>
        <rotation_flag>2</rotation_flag>
        <rotation_scale>2000.0</rotation_scale>
        <uv_xoffset>0.0</uv_xoffset>
        <uv_yoffset>0.0</uv_yoffset>
    </parameters>
    <xsize>2000</xsize>
    <ysize>2000</ysize>
    <light-coverage>900000000.0</light-coverage>
    <wood-coverage>1500000.0</wood-coverage>
    <tree-texture>Trees/deciduous-alt.png</tree-texture>
    <tree-varieties>8</tree-varieties>
    <tree-height-m>8.0</tree-height-m>
    <tree-width-m>8.0</tree-width-m>
    <rolling-friction>0.7</rolling-friction>
    <bumpiness>0.8</bumpiness>
  </material>
<!-- End new definition -->


Tiling:
Image

De-tiled:
Image

Image

The subtle imperfection looks like it's due to the mesh(?) uv. Should go away with a rebuild
Image

---

Problem 2: Material: Greenspace,Grassland,NaturalCrop,Marsh,FloodLand,SaltMarsh,HerbWetlandCover, WoodedWetlandCover

Effect: I'm not sure what effect this is calling, as using ctrl+alt+click in ufo gives multiple landclasses, and makes it hard to trace the effect in upstream references for a landclass. How do you identify exactly which landclass is at a location?

Texture 1: Terrain/california-grass.png nice texture, but tiling is visible. There are subtle horizontal lines that mess with the natural look. Example: lat:36.8409 lon:-121.4399.

The parallel lines look artificial - these could be suitable for NaturalCrop whatever that is (grass for livestock?)? I can create another less tiled texture showing more of the lines if needed.

Texture 2: n="13" is Terrain/california-rock.png (link). This is the only place california-grass.png is used, other than for [Edit:] BarrenCover/Dirt/OpenMining. I don't see this being alongside grass.png. Can't say what the intended use is, as I'm unsure of what effect is being called.

Solution texture 1: Detile. Re-mix texture to remove line features. Effect parameters: Distorsion = 1.0, rotation scale = 1000. Remix: GIMP re-synthesise with: Neighbourhood=10,Search thoroughness=200, Sensitivity to outliers = 1.0.

- Re-mixing was used as horizontal lines were apparent even after detiling with distorsion = 1.0. Rotation scale less than full was used to get rid of hints of long parallel lines, while preserving some line structure as that was assumed the intent. To get rid of lines use Search Thoroughness = 500.
- Fixing texture doesn't easily look as good due to the high contrast structure. Unsure of the intended target effect.

Edit: Update. New "California-grass2.png" for Erik's HSV matching for textures: link

New "California-grass2.png" : link

Code: Select all
<!-- New definition -->
  <material>
    <name>Greenspace</name>
    <name>Grassland</name>
    <name>NaturalCrop</name>
    <name>Marsh</name>
    <name>FloodLand</name>
    <name>SaltMarsh</name>
    <name>HerbWetlandCover</name>
    <name>WoodedWetlandCover</name>
    <effect>Effects/agriculture</effect>
    <texture-set>
      <texture>Terrain/california-grass2.png</texture>   
      <!--<texture n="16">Terrain/california-rock.png</texture>--> 
    </texture-set>
    <parameters>
        <rotation_flag>1</rotation_flag>
        <rotation_scale>1000.0</rotation_scale>
        <distortion_factor>1.0</distortion_factor>
    </parameters>
    <xsize>2000</xsize>
    <ysize>2000</ysize>
    <light-coverage>4000000.0</light-coverage>
    <diffuse>
      <r>0.93</r>
      <g>0.95</g>
      <b>0.93</b>
      <a>1.0</a>
    </diffuse>
    <specular>
      <r>0.1</r>
      <g>0.12</g>
      <b>0.1</b>
      <a>1.0</a>
    </specular>
    <shininess>1.2</shininess>
    <solid>1</solid>
    <friction-factor>0.7</friction-factor>
    <rolling-friction>0.1</rolling-friction>
    <bumpiness>0.1</bumpiness>
    <load-resistance>1e30</load-resistance>
  </material>
<!-- End new definition -->


Long parallel lines:
Image

Detiled, Resynthesised to remove large scale patterns. Some subtle line-ness was left in (also makes the texture look less homogeneous).
Image

Image
----

Really nice work by Gilbertohasnofb. Looks wonderful :mrgreen: :mrgreen: and matches the brief look I had in instantstreetview. Goes well with an increase in dust for California flying. I can't comment on exact hues & colours.

There is some visible tiling in the default Town/SubUrban material using the urban effect (no rotation/detiling), from california-town2.png. Partly due to a repeated white bit. This isn't a California.xml problem.

I had a further look around California, and wasn't able to find any superficial tiling sources. A lot of parts of Nevada seem to be compatible with California textures.

If there aren't any further issues the detiled definitions and png could be added to FGData by a scenery developer.

Album: link

Before (bare terrain)
Image
After
Image

Image

Kind regards
Last edited by vnts on Tue Oct 06, 2020 11:26 am, edited 2 times in total.
vnts
 
Posts: 262
Joined: Thu Apr 02, 2015 12:29 am

Re: Coverage of the current material regions in FGDATA

Postby Johan G » Thu Oct 01, 2020 12:20 pm

That is quite an improvement. :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: 6089
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Coverage of the current material regions in FGDATA

Postby gsagostinho » Thu Oct 08, 2020 2:27 pm

That's an amazing work guys, very nice improvements indeed. Do let me know if I can help with anything; I'm quite busy with RL these days but I'll be watching this thread. Keep up the good work!
User avatar
gsagostinho
 
Posts: 1806
Joined: Thu Jan 15, 2015 6:27 pm
Location: London, UK

Previous

Return to Scenery

Who is online

Users browsing this forum: No registered users and 3 guests