Howto:Aircraft reflection shader

From FlightGear wiki
Jump to navigation Jump to search

Within Flightgear 2.0 and later, a reflection shader effect is available. Aircrafts which utilise this include the AC-130, and the EC-135.


How to implement

Inside the Aircraft/AircraftName/Models folder, the main xml file, which should be the AircraftName.xml. This file should be the one holding all information on visuals used in the aircraft. As such, we need to indicate which are to be reflectable!

Inside the model.xml, we need to put the following in, shortly after or before other <animation> tag entries:


   <effect>
       <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
       <object-name>Fuselage</object-name>
       <object-name>RFdoor</object-name>
       <object-name>LFdoor</object-name>
       <object-name>LRdoor</object-name>
       <object-name>RRdoor</object-name>
       <object-name>Rmain.geardoor</object-name>
       <object-name>Lmain.geardoor</object-name>
       <object-name>Engines</object-name>
       <object-name>Reversers</object-name>
       <object-name>Tail</object-name>
       <object-name>Rudder</object-name>
       <object-name>RHstab</object-name>
       <object-name>LHstab</object-name>
       <object-name>LHelevator</object-name>
       <object-name>RHelevator</object-name>

</effect> -->


Note that for each <object-name> tag, you need to indicate the aircrafts objects. If you are not the original plane author and do not know which parts to enter, or how they are named, use the other animations tags object names which indicate the pieces you require to be reflected (such as <object-name>fuselage</object_name> is an obvious one). Obviously do not enter things which you don't want to be reflected!.

To see them in sim, ensure your properties>rendering options effects & shaders options are checked.