Debian Codegraph @

Aircraft/Generic/Effects/Fuselagereflect.eff

raw
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!--
4 Note:
5 To be able to see the glossy effect the shininess value for the color of the
6 affected model parts must be somewhere high, at least 100 and preferable 128:
7 https://learnopengl.com/Lighting/Materials
8
9 Note:
10 Objects without a texture applied will cause a segmentation fault.
11
12
13 Parameters:
14 * Boolean to enable or disable the reflection.
15 Civilian aircraft are usually glossy but military aircraft are not.
16 sim/model/civilian
17
18 * Floating point value to specify the reflection factor.
19 The range is between -1.0 and 0.0
20 sim/model/livery/shininess
21
22 * Floating point value to specify the Fresnel factor.
23 The range is between 0.0 and 1.0
24 sim/model/livery/fresnel
25
26 These parameters can all be defined within a livery configuration file:
27 <PropertyList>
28 <sim>
29 <model>
30 <civilian type="bool">true</civilian>
31 <livery>
32 <name type="string">Factory Demonstrator</name>
33 <texture>Liveries/factory.png</texture>
34 <shininess type="float">-0.5</shininess>
35 <fresnel type="float">0.7</fresnel>
36 </livery>
37 </model>
38 </sim>
39 </PropertyList>
40
41
42 Usage:
43 Add one of the following examples to your model configuration file.
44
45 * Minimal configuration
46 <effect>
47 <name>Effects/normalmap-reflection</name>
48 <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
49 <object-name>fuselage</object-name>
50 <object-name>wing</object-name>
51 </effect>
52
53 * Adding a normal-map:
54 <effect>
55 <name>Effects/normalmap-reflection</name>
56 <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
57 <object-name>fuselage</object-name>
58 <object-name>wing</object-name>
59 <parameters>
60 <texture n="2">
61 <image>Aircraft/AircraftName/Models/normalmap.png</image>
62 </texture>
63 </parameters>
64 </effect>
65
66
67 Further reading:
68 https://wiki.flightgear.org/ALS_technical_notes
69 -->
70
71 <PropertyList>
72 <name>Aircraft/Generic/Effects/Fuselagereflect</name>
73 <inherits-from>Effects/model-combined</inherits-from>
74 <parameters>
75 <rain-enabled type="int"> 2 </rain-enabled>
76 <normalmap-enabled type="int"> 1 </normalmap-enabled>
77 <normalmap-dds type="int"> 0 </normalmap-dds>
78 <normalmap-tiling type="float"> 1.0 </normalmap-tiling>
79 <lightmap-enabled type="int"> 0 </lightmap-enabled>
80 <ambient-correction type="float"> 0.1 </ambient-correction>
81 <reflection-enabled type="int"><use>sim/model/civilian</use></reflection-enabled>
82 <reflection-type type="int"> 1 </reflection-type>
83 <reflection-dynamic type="int"> 1 </reflection-dynamic>
84 <reflection-rainbow type="float"> 0.0 </reflection-rainbow>
85 <reflection-noise type="float"> 0.0 </reflection-noise>
86 <reflection-fresnel-factor type="float"> 1.0 </reflection-fresnel-factor>
87 <reflection-correction type="float"><use>sim/model/livery/shininess</use></reflection-correction>
88 <reflection-fresnel type="float"><use>sim/model/livery/fresnel</use></reflection-fresnel>
89 <texture n="2">
90 <image>Aircraft/Generic/Effects/null_bumpspec.png</image>
91 <filter>linear-mipmap-linear</filter>
92 <wrap-s>repeat</wrap-s>
93 <wrap-t>repeat</wrap-t>
94 <internal-format>normalized</internal-format>
95 </texture>
96 <texture n= "5" >
97 <type>cubemap</type>
98 <images>
99 <positive-x>Aircraft/Generic/Effects/CubeMaps/buildings/N.png</positive-x>
100 <negative-x>Aircraft/Generic/Effects/CubeMaps/buildings/S.png</negative-x>
101 <positive-y>Aircraft/Generic/Effects/CubeMaps/buildings/W.png</positive-y>
102 <negative-y>Aircraft/Generic/Effects/CubeMaps/buildings/E.png</negative-y>
103 <positive-z>Aircraft/Generic/Effects/CubeMaps/buildings/U.png</positive-z>
104 <negative-z>Aircraft/Generic/Effects/CubeMaps/buildings/D.png</negative-z>
105 </images>
106 </texture>
107 </parameters>
108
109 <generate>
110 <tangent type="int">6</tangent>
111 <binormal type="int">7</binormal>
112 </generate>
113
114 <technique n="4">
115 <pass>
116 <program>
117 <attribute>
118 <name>tangent</name>
119 <index>6</index>
120 </attribute>
121 <attribute>
122 <name>binormal</name>
123 <index>7</index>
124 </attribute>
125 </program>
126 </pass>
127 </technique>
128
129 <technique n="7">
130 <pass>
131 <program>
132 <attribute>
133 <name>tangent</name>
134 <index>6</index>
135 </attribute>
136 <attribute>
137 <name>binormal</name>
138 <index>7</index>
139 </attribute>
140 </program>
141 </pass>
142 </technique>
143
144 <technique n="9">
145 <pass>
146 <program>
147 <attribute>
148 <name>tangent</name>
149 <index>6</index>
150 </attribute>
151 <attribute>
152 <name>binormal</name>
153 <index>7</index>
154 </attribute>
155 </program>
156 </pass>
157 </technique>
158
159 </PropertyList>