Board index FlightGear Support Graphics

Shadow problem on 2020.4?

Graphics issues like: bad framerates, weird colors, OpenGL errors etc. Bad graphics ar usually the result of bad graphics cards or drivers.
Forum rules
In order to help you, we need to know a lot of information. Make sure to include answers to at least the following questions in your initial post.

- what OS (Windows Xp/Vista, Mac etc.) are you running?
- what FlightGear version do you use?
- what graphics card do you have?
- does the problem occur with any aircraft, at any airport?
- is there any output printed to the console (black window)?
- copy&paste your commandline (tick the "Show commandline box on the last page of FGRun or the "Others" section on the Mac launcher).
- please upload a screenshot of the problem.

If you experience FlightGear crashes, please report a bug using the issue tracker (can be also used for feature requests).
To run FlightGear on old computers with bad OpenGL support, please take a look at this wiki article. If you are seeing corrupted/broken textures, please see this article.

Note: If you did not get a reponse, even after 7 days, you may want to check out the FlightGear mailing lists to ask your question there.

Shadow problem on 2020.4?

Postby Delta5142 » Wed Jun 29, 2022 6:39 pm

Hello FG'ers,
I loaded up 2020.4 today to test out the shadows, but when I turned them on. The sim just displayed a large square shadow all around my plane:
Image

MacOS 10.12

Is there a way I can avoid this?

Thank you in advance,
Delta5142
Delta5142
 
Posts: 340
Joined: Thu Jul 02, 2020 4:18 pm
Location: Northern California
Callsign: DAL5142
Version: next
OS: Mac OS X

Re: Shadow problem on 2020.4?

Postby erik » Thu Jun 30, 2022 7:29 am

Usually this means there is an invisible object which isn't marked as "noshadow". Most commonly these are light definitions.
https://wiki.flightgear.org/Compositor#Shadows

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2245
Joined: Thu Nov 01, 2007 2:41 pm

Re: Shadow problem on 2020.4?

Postby Fahim Dalvi » Thu Jun 30, 2022 10:17 am

Hi Delta5142,

This is a known bug on macOS and Compositor. To fix, make the following change to fgdata/Compositor/Classic/csm-pass.xml:

Code: Select all
 <PropertyList>
   <type>csm</type>
+  <implicit-attachment-mask>color depth</implicit-attachment-mask>
   <effect-scheme>classic-shadow</effect-scheme>
   <clear-mask>depth</clear-mask>
   <!-- Only render objects with the CAST_SHADOW bit flag -->


The issue is that Compositor's implementation only requires a "depth" mask, but macOS does not like buffers without a "color" mask. Adding the "color" mask increases memory usage by about 5x, and thats why it's disabled by default.

Hope this helps!
User avatar
Fahim Dalvi
 
Posts: 1352
Joined: Sun Oct 14, 2007 2:08 pm
Location: Qatar
Callsign: Fahim
Version: 2020.3.11
OS: macOS

Re: Shadow problem on 2020.4?

Postby Avionyx » Thu Jun 30, 2022 1:20 pm

I've had an issue with shadows in 2020.4 on Manjaro since last September:

https://sourceforge.net/p/flightgear/codetickets/2663/

I've posted on here, on the issue tracker and on the dev list but I haven't found a solution that works yet. It's on every 2020.4 build that I've tried and with every graphics driver solution.
It got so annoying that I've switched all my FG stuff to Windows. Hopefully a fix will pop up some day and I can revert.

Alex
Avionyx
 
Posts: 531
Joined: Mon Jan 11, 2010 4:07 pm
Location: EGMD
Callsign: G-AVYX
Version: 2020.4
OS: Manjaro

Re: Shadow problem on 2020.4?

Postby Delta5142 » Thu Jun 30, 2022 3:47 pm

Thank you all for your help.
Fahim Dalvi, Compositer shadows work just fine after editing csm-pass.xml. :)
Image

Thank you,
Delta
Delta5142
 
Posts: 340
Joined: Thu Jul 02, 2020 4:18 pm
Location: Northern California
Callsign: DAL5142
Version: next
OS: Mac OS X

Re: Shadow problem on 2020.4?

Postby benih » Thu Jun 30, 2022 3:52 pm

I still have the issue that the interiour shadow is rendered onto the propeller disc (cockpit view, c182 and c172)
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Shadow problem on 2020.4?

Postby TheEagle » Thu Jun 30, 2022 4:35 pm

@benih: do you mean the one from the cube map, or the compositor shadows ? (i.e. does it also appear on the fastpropeller with ALS off ?)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Shadow problem on 2020.4?

Postby benih » Fri Jul 01, 2022 12:24 pm

The one from the cubemap
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Shadow problem on 2020.4?

Postby TheEagle » Fri Jul 01, 2022 4:42 pm

Okay, can you try adding these lines:
Code: Select all
<params>
    <opacity-cube-center type="vec3d" n="0"> 0.5 0.0 0.3</opacity-cube-center>
    <opacity-cube-scale type="vec3d" n="0">0 0 0</opacity-cube-scale>
    <shadow-mapping-enabled>fale</shadow-mapping-enabled>
</params>

to the <effect> in Models/c182s.xml starting line 327 ? This should disable the shadow mapping for those objects if it was somehow inherited in any way.
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Shadow problem on 2020.4?

Postby benih » Mon Jul 04, 2022 9:11 am

Hi Eagle,
that did not work - it makes the model not load:
Code: Select all
65.09 [ALRT]:io         Failed to load xml: Unrecognized data type 'vec3d'
 at /home/beni/Dokumente/FGFS/Aircraft/c182s/Models/c182s.xml,
line 341, column 62
65.09 [ALRT]:io         Failed to load model: Unrecognized data type 'vec3d'
 at /home/beni/Dokumente/FGFS/Aircraft/c182s/Models/c182s.xml,
line 341, column 62
        from:/home/beni/Dokumente/FGFS/Aircraft/c182s/Models/c182s.xml
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Shadow problem on 2020.4?

Postby TheEagle » Mon Jul 04, 2022 9:55 am

But all I changed were the numbers, the type="vec3d" worked in the original file ??? :? Maybe the problem is that I used 0 0 0 instead of 0.0 0.0 0.0 - so please try that, and fix the value of fale of the shadow-mapping-enabled ! ;)
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Shadow problem on 2020.4?

Postby benih » Mon Jul 04, 2022 10:13 am

Still the same:
Code: Select all
<effect>
       <inherits-from>Effects/model-transparent</inherits-from>
       <object-name>FastProp</object-name>
       <object-name>SlowProp</object-name>
        <object-name>TaxiLight</object-name>
      <object-name>PlaneX</object-name>
      <object-name>Plane.002X</object-name>
      <object-name>Plane.003X</object-name>
        <object-name>LandingLight</object-name>
        <object-name>TaxiLight</object-name>
        <object-name>PlaneTailLight</object-name>
        <object-name>NavLightRed</object-name>
        <object-name>NavLightGreen</object-name>
        <params>
          <opacity-cube-center type="vec3d" n="0"> 0.5 0.0 0.3 </opacity-cube-center>
          <opacity-cube-scale  type="vec3d" n="0"> 0.0 0.0 0.0 </opacity-cube-scale>
          <shadow-mapping-enabled>false</shadow-mapping-enabled>
        </params>
   </effect>


triggers:
Code: Select all
   5.55 [ALRT]:io         Failed to load xml: Unrecognized data type 'vec3d'
 at /home/beni/Dokumente/FGFS/Aircraft/c182s/Models/c182s.xml,
line 341, column 63
    5.55 [ALRT]:io         Failed to load model: Unrecognized data type 'vec3d'
 at /home/beni/Dokumente/FGFS/Aircraft/c182s/Models/c182s.xml,
line 341, column 63
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Shadow problem on 2020.4?

Postby TheEagle » Mon Jul 04, 2022 10:30 am

Okay, leave out the first two lines then and use just <shadow-mapping-enabled type="bool">false</shadow-mapping-enabled> - it should normally be enough.
EDIT: you need to change <params> to <parameters> for effects ! ;)
Forget the rest … I just looked in model-transparent.eff which inherits from model-default.eff, and none if the two have any shadow-mapping properties because model-interior has to be used for that. I guess your only choice is to see if you get the same problem on the C172P and if not find the difference ! :(
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Shadow problem on 2020.4?

Postby benih » Mon Jul 04, 2022 1:09 pm

The C172p is also affected.
But thanks for your efforts.

There is also a sourceforge ticket for that i think, and also a thread on the mailinglist
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Shadow problem on 2020.4?

Postby TheEagle » Mon Jul 04, 2022 2:31 pm

benih wrote in Mon Jul 04, 2022 1:09 pm:There is also a sourceforge ticket for that i think, and also a thread on the mailinglist

Yeah, I noticed the thread on the mailing list when you put it up, but no one seems to have noticed it, as well as the thread I put recently about a YASim bug some user reported on the forum. No idea what's (not :mrgreen: ) going on …
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3411
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04


Return to Graphics

Who is online

Users browsing this forum: No registered users and 5 guests