Howto:Aircraft reflection shader: Difference between revisions

Jump to navigation Jump to search
Added Code
(Added Code)
Line 40: Line 40:
To see them in sim, ensure your View > Rendering options > Effects & shaders options are checked.
To see them in sim, ensure your View > Rendering options > Effects & shaders options are checked.
As an example the C160 Transall by helijah makes use of this simple method.
As an example the C160 Transall by helijah makes use of this simple method.
===a bit more difficult Method- but more freedom!===
The next method describes how to add the effect of a customized simple ReflectionShader, which allows more freedom.
Creates a Folder inside your Models-folder called "Effects".
Now you create a new .eff-file and insert it into the "Effects"-folder:
Called like that:<nowiki>foo_effects.eff</nowiki>
<PropertyList>
<name>Effects/ec130reflect</name>
<inherits-from>Effects/reflect</inherits-from>
  <parameters>
    <texture n="5">
    <type>cubemap</type>
<!-- use this form for a cube cross
    <image>Aircraft/Generic/Effects/CubeCrosses/real.blue_sky.png</image>-->
<!-- use this form for a 6 image cube map -->
    <images>
        <positive-x>Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_px.png</positive-x>
        <negative-x>Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_nx.png</negative-x>
        <positive-y>Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_py.png</positive-y>
        <negative-y>Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_ny.png</negative-y>
        <positive-z>Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_pz.png</positive-z>
        <negative-z>Aircraft/Generic/Effects/CubeMaps/real.blue-sky/fair-sky_nz.png</negative-z>
      </images>
    </texture>
<texture n="6">
    <image>Aircraft/Generic/Effects/Rainbow.png</image>
    <filter>linear-mipmap-linear</filter>
    <wrap-s>repeat</wrap-s>
    <wrap-t>repeat</wrap-t>
    <internal-format>normalized</internal-format>
</texture>
<texture n="7">
    <image>Aircraft/Generic/Effects/FresnelLookUp.png</image>
    <filter>linear-mipmap-linear</filter>
    <wrap-s>repeat</wrap-s>
    <wrap-t>repeat</wrap-t>
    <internal-format>normalized</internal-format>
</texture>
    <texture n="8">
    <image>Aircraft/ec130/Models/Effects/greymap.png</image>
    <filter>linear-mipmap-linear</filter>
    <wrap-s>repeat</wrap-s>
    <wrap-t>repeat</wrap-t>
    <internal-format>normalized</internal-format>
</texture>
  <rendering-hint>transparent</rendering-hint>
  <shade-model>smooth</shade-model>
  <rainbowiness type="float">0.01</rainbowiness>
  <fresneliness>0.0</fresneliness>
  <noisiness>0.0</noisiness>
  <refl_correction>0.0</refl_correction>
  <ambient_correction>0.0</ambient_correction>
  <reflect_map>1</reflect_map>
  </parameters>
</PropertyList>




884

edits

Navigation menu