Board index FlightGear Development Effects and shaders

Updated default Fuselagereflect

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

Updated default Fuselagereflect

Postby erik » Wed Feb 16, 2022 11:26 am

I've updated the Fuselagereflect which can be found in Aircraft/Generic/Effects considerably.
The old one was from 2010 and I think pre-ALS.

To be able to see the glossy effect the shininess value for the color of the affected model parts must be somewhere high, at least 100 and preferable 128: https://learnopengl.com/Lighting/Materials

There is a help section at the beginning of the file which I will post here for convenience:

Parameters:
  • Boolean to enable or disable the reflection.
    Civilian aircraft are usually glossy but military aircraft are not.
    sim/model/civilian

  • Floating point value to specify the reflection factor.
    The range is between -1.0 and 0.0
    sim/model/livery/shininess

  • Floating point value to specify the Fresnel factor.
    The range is between 0.0 and 1.0
    sim/model/livery/fresnel

These parameters can all be defined within a livery configuration file:
Code: Select all
  <PropertyList>
    <sim>
      <model>
        <civilian type="bool">true</civilian>
        <livery>
          <name type="string">Factory Demonstrator</name>
         <texture>Liveries/factory.png</texture>
         <shininess type="float">-0.5</shininess>
         <fresnel type="float">0.7</fresnel>
        </livery>
      </model>
    </sim>
  </PropertyList>


Usage:
Add one of the following examples to your model configuration file.
  • Minimal configuration
    Code: Select all
      <effect>
        <name>Effects/normalmap-reflection</name>
        <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
        <object-name>fuselage</object-name>
        <object-name>wing</object-name>
      </effect>

  • Adding a normal-map:
    Code: Select all
      <effect>
        <name>Effects/normalmap-reflection</name>
        <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
        <object-name>fuselage</object-name>
        <object-name>wing</object-name>
        <parameters>
          <texture n="2">
            <image>Aircraft/AircraftName/Models/normalmap.png</image>
          </texture>
        </parameters>
      </effect>


Further reading:
https://wiki.flightgear.org/ALS_technical_notes

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: 2248
Joined: Thu Nov 01, 2007 2:41 pm

Return to Effects and shaders

Who is online

Users browsing this forum: No registered users and 3 guests