Debian Codegraph @

Docs/model-combined.eff/README.model-combined.eff

raw
1 MODEL COMBINED EFFECT - INSTRUCTIONS FOR USE
2 ============================================
3
4 The model-combined effect uses the ubershader to provide any or all of diffuse,
5 light-map, reflection, bump-mapping and dirt effects on the model on which it is
6 applied. The effect responds to the quality setting of the "Model" slider in the
7 advanced shader configuration, in the following order:
8
9 -------------------------------------------------------------------------------
10 *lowest quality - enables light-map and dirt, if enabled by the effect;
11
12 *medium quality - enables reflection too, if enabled in the effect;
13
14 *highest quality - enables bump-mapping too, if enabled in the effect.
15 -------------------------------------------------------------------------------
16
17 To use this on your aircraft model, you are advised to create a local effect
18 that has the following lines:
19
20
21 1. for automatic Rembrandt support on opaque objects use this:
22
23 <name>my-aircraft-effect</name>
24 <inherits-from>Effects/model-combined-deferred</inherits-from>
25
26
27 2. for automatic Rembrandt support on transparent objects (glass) use this:
28
29 <name>my-aircraft-glass-effect</name>
30 <inherits-from>Effects/model-combined-transparent</inherits-from>
31
32 The only modeller-adjustable settings are those found in the parameters section
33 and listed here. There are other entries in the parameters section, but those
34 are for internal use only, please don't mess with them.
35
36 You only need to list in your local effect those entries that you'll modify from
37 the defaults, there's no need to repeat all of them.
38
39 Following is the list of parameters, their default setting and a short
40 explanation of what they control/affect
41
42 --------------------------------------------------------------------------------
43
44 <texture n ="0">
45
46 - the model texture, as assigned in the 3d-modelling
47 application, or by the livery select mechanism.
48 This only needs to be present in the main effect.
49 Setting this to some specific texture will override
50 the assigned texture/livery.
51
52
53 Bumpmap control:
54 ===================
55
56 -------------------------------------------------------------------------------
57 WARNING!!! Enabling this requires further modification to the local effect.
58 Please see the attached model-combined-nmap.eff stub for correct usage.
59 -------------------------------------------------------------------------------
60
61 <normalmap-enabled type="int">0</normalmap-enabled>
62
63 - enables bump-mapping (if quality is set high enough).
64 Default value is off.
65 Available values are 0 (off) and 1(on).
66 Leave off if you're not using it.
67
68
69 <normalmap-dds type="int">0</normalmap-dds>
70
71 - enable this if you're using a .dds compressed normal-map.
72 Default value is 0 (off).
73 Available values are 0 (off) and 1(on)
74
75
76 <normalmap-tiling type="float">1.0</normalmap-tiling>
77
78 - sets the repeat rate of the normal-map image, useful for covering
79 large areas with fine detail.
80 Default value is 1.0 (no-tiling).
81 If you set this to a value > 1.0, you need
82 to set wrapping mode to repeat below.
83
84 <texture n="2">
85
86 - the normal-map texture slot
87
88
89 <image></image>
90
91 - the normal-map texture path
92
93
94 <wrap-s>clamp</wrap-s>
95
96 - X-axis (U) wrapping mode of the texture.
97 Default is set to clamp.
98 If you enable the tiling feature (normalmap-tiling > 1.0), you need
99 to set this to repeat.
100
101 <wrap-t>clamp</wrap-t>
102
103 - same as above for the Y-axis (V).
104
105 </texture>
106
107 -------------------------------------------------------------------------------
108
109 Lightmap control:
110 ===================
111
112
113 <lightmap-enabled type="int">0</lightmap-enabled>
114
115 - enables the light-map.
116 Default value is 0 (off).
117 Available values are 0 (off) and 1(on).
118 If you want control over your light-maps enable this
119 and use a variable property as factor.
120
121
122 <lightmap-multi type="int">0</lightmap-multi>
123
124 - this enables multiple light-maps per light-map texture.
125 Default value is 0 (off).
126 Available values are 0 (off) and 1(on).
127 When off the shader code uses information from
128 the red channel of the light-map.
129
130
131 <lightmap-factor type="float" n="0">1.0</lightmap-factor>
132
133 - factor to multiply the value of the red channel in the light-map.
134 Default value is 1.0.
135 This product is used as a resulting factor for
136 the final light-map color.
137
138
139 <lightmap-color type="vec3d" n="0"> 1.0 1.0 1.0 </lightmap-color>
140
141 - the color of the light for the red channel in the light-map.
142 Default value is white (1.0 1.0 1.0).
143
144
145 <lightmap-factor type="float" n="1">1.0</lightmap-factor>
146
147 - same as above for the green channel.
148
149
150 <lightmap-color type="vec3d" n="1"> 1.0 1.0 1.0 </lightmap-color>
151
152 - same as above for the green channel.
153
154
155 <lightmap-factor type="float" n="2">1.0</lightmap-factor>
156
157 - same as above for the blue channel.
158
159
160 <lightmap-color type="vec3d" n="2"> 1.0 1.0 1.0 </lightmap-color>
161
162 - same as above for the blue channel.
163
164
165 <lightmap-factor type="float" n="3">1.0</lightmap-factor>
166
167 - same as above for the alpha channel.
168
169
170 <lightmap-color type="vec3d" n="3"> 1.0 1.0 1.0 </lightmap-color>
171
172 - same as above for the alpha channel.
173
174
175 <texture n="3">
176
177 - the light-map texture slot.
178
179
180 <image>Aircraft/Generic/Effects/greymap.png</image>
181
182 - the light-map texture path.
183
184
185 <filter>linear-mipmap-linear</filter>
186 <wrap-s>clamp</wrap-s>
187 <wrap-t>clamp</wrap-t>
188 <internal-format>normalized</internal-format>
189 </texture>
190
191 -------------------------------------------------------------------------------
192
193 Reflection control:
194 ===================
195 .
196
197 <reflection-enabled type="int">0</reflection-enabled>
198
199 - enables reflection (if user preference is high enough).
200 Default value is 0 (off).
201 Available values are 0 (off) and 1(on).
202
203
204 <reflection-correction type="float">0.0</reflection-correction>
205
206 - factor to add to the material specularity to give
207 the final reflection factor.
208 Default value is 0.0 (no correction).
209 Accepts values from -1.0 to 1.0.
210 If reflection-map is enabled below, this factor is added to the product
211 between the alpha channel of the texture and the material specularity.
212
213
214 <reflect-map-enabled type="int">0</reflect-map-enabled>
215
216 - enables the usage of a texture to determine reflection intensity.
217 Default value is 0 (off).
218 Available values are 0 (off) and 1(on).
219
220
221 <reflection-dynamic type="int">0</reflection-dynamic>
222
223 - enables dynamic reflections.
224 Default value is 0 (off).
225 Available values are 0 (off) and 1(on).
226 The reflection gets rotated according to the object orientation,
227 trying to keep the ground in the reflection on faces facing the ground.
228 Recommended setting for external reflections is 1 (on).
229 For internal (cockpit, instruments) leave it at 0 (off).
230
231
232
233 <texture n="4">
234
235 - texture slot for the reflect-map. This map is also used for the dynamic dirt.
236
237
238 <image>Aircraft/Generic/Effects/ReflectMaps/reflectmap.png</image>
239
240 - reflect-map texture path.
241
242
243 <filter>linear-mipmap-linear</filter>
244 <wrap-s>clamp</wrap-s>
245 <wrap-t>clamp</wrap-t>
246 <internal-format>normalized</internal-format>
247 </texture>
248
249
250 Reflection env-map:
251 -------------------
252
253 <texture n="5">
254
255 - texture slot for the texture(s) used to create
256 the cubic environment that is reflected
257
258
259 <type>cubemap</type>
260
261 There are two ways of defining the environment texture:
262 1: a cubecross texture where all faces of the cube are stitched into one texture:
263
264 <image>Aircraft/Generic/Effects/CubeCrosses/blue_sky_big.jpg</image>
265
266 or
267
268 2: 6 different textures, one for each face of the environment cube:
269
270 <images>
271 <positive-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_px.png</positive-x>
272 <negative-x>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nx.png</negative-x>
273 <positive-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_py.png</positive-y>
274 <negative-y>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_ny.png</negative-y>
275 <positive-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_pz.png</positive-z>
276 <negative-z>Aircraft/Generic/Effects/CubeMaps/fair-sky/fair-sky_nz.png</negative-z>
277 </images>
278 </texture>
279
280
281 <reflection-fresnel type="float">0.1</reflection-fresnel>
282
283 - fresnel(banding) factor for the reflection.
284 Default value is 0.1.
285 Values range from -1.0 to 1.0.
286
287
288 <texture n="6">
289
290 - fresnel texture slot
291
292 <image>Aircraft/Generic/Effects/FresnelLookUp.png</image>
293
294 - fresnel(banding) texture path
295
296
297 <filter>linear-mipmap-linear</filter>
298 <wrap-s>repeat</wrap-s>
299 <wrap-t>repeat</wrap-t>
300 <internal-format>normalized</internal-format>
301 </texture>
302
303
304 <reflection-rainbow type="float">0.01</reflection-rainbow>
305
306 - rainbow factor for the reflection.
307 Default value is 0.01.
308 Values range from -1.0 to 1.0.
309
310
311 <texture n="7">
312
313 - rainbow texture slot.
314
315
316 <image>Aircraft/Generic/Effects/Rainbow.png</image>
317
318 - rainbow texture path.
319
320
321 <filter>linear-mipmap-linear</filter>
322 <wrap-s>repeat</wrap-s>
323 <wrap-t>repeat</wrap-t>
324 <internal-format>normalized</internal-format>
325 </texture>
326
327
328 <reflection-noise type="float">0.25</reflection-noise>
329
330 - Amount of color noise to be added to the reflected image.
331 Default value is 0.25.
332 Accepts values from 0.0 to 1.0.
333
334 -------------------------------------------------------------------------------
335
336 Dirt/Grit Control:
337 ==================
338
339 <dirt-enabled type="int">0</dirt-enabled>
340
341 - enables dynamic dirt in the shader.
342 Default value is 0(off).
343 Available values are 0 (off) and 1(on).
344 This uses the red channel of the texture in slot 4 (reflection map)
345 to define areas that should be dirtied up.
346 You don't have to enable 'reflect-map-enabled' above to use this.
347
348
349 <dirt-color type="vec3d">0.0 0.0 0.0</dirt-color>
350
351 - color of the dirt added. Default is black (0.0 0.0 0.0).
352
353
354 <dirt-factor type="float">0.0</dirt-factor>
355
356 - factor to control how intense the dirt is drawn.
357 Default value is 0.0.
358 This should use a dynamic property settable at runtime.
359
360 -------------------------------------------------------------------------------
361
362 Ambient Correction:
363 ===================
364
365 <ambient-correction type="float">0.05</ambient-correction>
366
367 - factor by which to lighten/darken the final result, and to remove
368 some of the blueness induced by some of the reflection environments.
369 Default value is 0.05.
370 Values range from -1.0 to 1.0.
371
372 -------------------------------------------------------------------------------
373
374
375 FINAL WARNINGS:
376 =====================
377
378 To repeat the earlier warning:
379
380 Do NOT use in any situation the normal-map enabled effect on objects that
381 are NOT completely uv-mapped to a texture, and/or that texture is not available
382 at runtime.
383 The binormal/tangent generator needs the texture information at runtime,
384 failing to find this it crashes, causing a segfault for FlightGear.
385
386 To fix culling/sorting problems:
387
388 This effect forces objects into Render-Bin 1.
389 This makes it necessary to use a specially modified local effect
390 for transparent objects.
391 This is provided as a stub in model-combined-glass.eff that you can find in
392 the same directory along with this ReadMe.