Board index FlightGear Support Graphics

Some models appearing very dark

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.

Some models appearing very dark

Postby TheEagle » Mon Oct 25, 2021 5:08 pm

I made a few seats for the inside of my C210, and see how they look:
Image
Very blackish. Changing the emission of the material in Blender to some bright color does help a bit, but then I have the same, just with another color. Also, they then are also alight in the dark. If I change the alpha value of the emission, the entire model gets transparent. I want the seats to look just like in Blender:
Image
Any tips ?
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: Some models appearing very dark

Postby ludomotico » Mon Oct 25, 2021 6:09 pm

The emission, if I remember correctly, controls the amount of light emitted from the model. This includes at night so, if you alter the emission parameter, your seats will glow at night.

I also experimented this in the past and I'm not sure how to fix this for a more natural illumination. This only happens if you use a color as material, without an image.

I don't know why but, under the same conditions, image textures reflect more ambient light than plain colors. Plain color surfaces as exported by blender reflect so little light that it seems unnatural, as you report. I'm not sure if this is a bug in either FG or the blender script, or it is exactly as intended.

The easiest option to have a consistent, soft illumination is using always image textures. Even if the texture is a plain color, as it is in your case.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Some models appearing very dark

Postby Maerchenprinz » Mon Oct 25, 2021 6:45 pm

Hi TheEagle!

When you use textures, materials settings should be set to something like that in an .ac file:
Code: Select all
MATERIAL "ac3dmat1" rgb 1 1 1  amb 1 1 1  emis 0 0 0  spec 1 1 1  shi 128  trans 0

When you don't, you'll have to play around with these values to get the desired result. A good starting point is to leave the colour values ("rgb") as is and either
a) set ambient ("amb") and specular (yes, "spec", you get it!) to 1 1 1
or
b) set amb and spec to the values of rgb
Then play around with amb and spec values between 1 1 1 and rgb values until you're happy with the result.
After that, shininess is also a value which has some effect on the outcome.
Emission should be 0 0 0.
I remember that there is a(re) fgwiki article(s) about materials.
Don't forget to check results at different lightings (daytime/direction of lights)!
I think the "Reload model" menu option also reloads materials, so no need to restart FG.

Sorry that I don't know what amb and shi correspond to in Blender...

Now wait for all the responses which tell you to "always use textures"!

Ciao,

Adrian
User avatar
Maerchenprinz
 
Posts: 306
Joined: Thu Mar 15, 2007 6:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian

Re: Some models appearing very dark

Postby TheEagle » Mon Oct 25, 2021 8:05 pm

Maerchenprinz wrote in Mon Oct 25, 2021 6:45 pm:I think the "Reload model" menu option also reloads materials, so no need to restart FG.

Yep, that's right - at first I thought the "Reload materials" does that, but apparently it's used to reload the materials.xml file instead.

Maerchenprinz wrote in Mon Oct 25, 2021 6:45 pm:Sorry that I don't know what amb and shi correspond to in Blender...

I think that shi corresponds to Metallic, but amb … :?:
Maerchenprinz wrote in Mon Oct 25, 2021 6:45 pm:Now wait for all the responses which tell you to "always use textures"!

:mrgreen: Yeah, with textures I never had this kind of problem …
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: Some models appearing very dark

Postby TheEagle » Mon Oct 25, 2021 9:35 pm

ludomotico wrote in Mon Oct 25, 2021 6:09 pm:Even if the texture is a plain color, as it is in your case.

Okay, I will fire up GIMP to draw a 1x1 px texture ! :roll:
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: Some models appearing very dark

Postby TheEagle » Tue Oct 26, 2021 2:59 pm

Ah, now I know what that "Amb same as Diff" checkbox in Blenders AC3D export dialog is there for - it sets amb to the rgb value, and now the black tint is gone ! :)
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: Some models appearing very dark

Postby Maerchenprinz » Tue Oct 26, 2021 5:26 pm

Ah, now I know what that "Amb same as Diff" checkbox in Blenders AC3D export dialog is there for - it sets amb to the rgb value

That's what I call a decent script!
There's a hint on the fgwiki to that feature, too:
Be aware that Blender only has greyscale for emission and ambient colors. If you want to export/import a color for those, import/export options gives you capability to choose to use Blenders mirror color for that.

https://wiki.flightgear.org/Howto:Work_with_AC3D_files_in_Blender

Glad to hear it's working!
User avatar
Maerchenprinz
 
Posts: 306
Joined: Thu Mar 15, 2007 6:24 pm
Location: Bochum, it's better, much better than you think!
Callsign: Adrian


Return to Graphics

Who is online

Users browsing this forum: No registered users and 3 guests