Howto:Aircraft reflection shader: Difference between revisions

Jump to navigation Jump to search
m
styling + image
mNo edit summary
m (styling + image)
Line 1: Line 1:
Within Flightgear 2.0 and later, a reflection shader effect is available. Aircrafts which utilise this include the [[AC-130]], and the [[EC-135]].
[[Image:B29 shader.jpg|thumb|270px|Reflection Shader applied to the [[Boeing B-29 Superfortress|B-29]]. It shows a shiny, high-reflective blank metal.]]
Within [[Flightgear]] 2.0.0 and later, a reflection [[Shaders|shader]] effect is available. [[Aircraft]] which utilise this include the [[C-130|Lockheed AC-130]], and the [[Eurocopter EC-135]].


----
==How to implement==
=How to implement=
Inside the <tt>Aircraft/AircraftName/Models</tt> folder, there should be a main xml file, which usually is <tt>AircraftName.xml</tt>. 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 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:
Inside the <tt>AircraftName.xml</tt>, we need to put the following lines of code, shortly after or before other <animation> tag entries:


----
<nowiki><!-- REFLECTION --></nowiki>
<!-- REFLECTION -->
     <effect>
     <effect>
         <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
         <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
Line 27: Line 26:
         <object-name>RHelevator</object-name>
         <object-name>RHelevator</object-name>
     </effect>
     </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.
Note that for each <object-name> tag, you need to indicate the aircraft's objects. If you are not the original aircraft 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 View > Rendering options > Effects & shaders options are checked.




article compiled by Liam Gathercole, please feel free to change/add more details if further enhancements can be made.
article compiled by Liam Gathercole, please feel free to change/add more details if further enhancements can be made.
[[Category:Aircraft enhancement|Aircraft Reflection Shader]]
[[Category:Howto|Aircraft Reflection Shader]]

Navigation menu