Howto:Aircraft reflection shader: Difference between revisions

Jump to navigation Jump to search
m
Robot: Cosmetic changes
m (Bot: Automated text replacement (-aircrafts +aircraft))
m (Robot: Cosmetic changes)
Line 1: Line 1:
[[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.]]
[[File: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]] GIT and later, a reflection [[Shaders|shader]] effect is available. Only few aircraft make already use of it, but much more will be expected soon.
Within [[Flightgear]] GIT and later, a reflection [[Shaders|shader]] effect is available. Only few aircraft make already use of it, but much more will be expected soon.


==Reflection-Shader and Reflect-Bump-Spec-Shader==
== Reflection-Shader and Reflect-Bump-Spec-Shader ==
We have currently two different Reflection-Shaders. A simple ReflectionShader which works also on not-UVmapped surfaces and a ReflectionShader including [http://wiki.flightgear.org/index.php/Howto:_Use_the_normal_map_effect_in_aircraft Normalmap]. The later one only works on UVmapped surfaces.  
We have currently two different Reflection-Shaders. A simple ReflectionShader which works also on not-UVmapped surfaces and a ReflectionShader including [http://wiki.flightgear.org/index.php/Howto:_Use_the_normal_map_effect_in_aircraft Normalmap]. The later one only works on UVmapped surfaces.  
The first one is ideal for windows and even surfaces, the second one for bumpy surfaces.
The first one is ideal for windows and even surfaces, the second one for bumpy surfaces.
This effect uses Cubemaps and Cubecrosses from data/Aircraft/Generic/Effects which contains the image of the environment which will be visible as Reflection. Depending on which you choose, the appearance of the model will later change dramatically.
This effect uses Cubemaps and Cubecrosses from data/Aircraft/Generic/Effects which contains the image of the environment which will be visible as Reflection. Depending on which you choose, the appearance of the model will later change dramatically.


==How to implement==
== How to implement ==
===the simple and quick Method===
=== the simple and quick Method ===


This is a simple and quick method for the simple ReflectionShader, but gives not the freedom to change the later appearance of the aircraft like setting the strength of the reflection or choosing a different cubemap.
This is a simple and quick method for the simple ReflectionShader, but gives not the freedom to change the later appearance of the aircraft like setting the strength of the reflection or choosing a different cubemap.
Line 41: Line 41:
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!===
=== 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.
The next method describes how to add the effect of a customized simple ReflectionShader, which allows more freedom.
Line 108: Line 108:
* <ambient_correction> = correct the appearance of the reflection at shadowed parts.  
* <ambient_correction> = correct the appearance of the reflection at shadowed parts.  
* <reflect_map> = enables the use of a greymap. If enabled the greymap will controll the strength of the reflection. Black = zero reflection, White = full reflection. For modern aircraft coatings a grey of 75-90% is usefull, for chromish parts about 10-25%.
* <reflect_map> = enables the use of a greymap. If enabled the greymap will controll the strength of the reflection. Black = zero reflection, White = full reflection. For modern aircraft coatings a grey of 75-90% is usefull, for chromish parts about 10-25%.
* <refl_correction> = another parameter for controlling the strength of the reflection. Reflect_map and refl_correction are working together.
* <refl_correction> = another parameter for controlling the strength of the reflection. Reflect_map and refl_correction are working together.  
* ''"texture= n5"'' is the path to the image wich will be later the reflection. You can choose between cubemaps with 6 single images or a cubecross. You can take the one included in ''data/Aircraft/Generic/Effects'' or you can use your own.
* ''"texture= n5"'' is the path to the image wich will be later the reflection. You can choose between cubemaps with 6 single images or a cubecross. You can take the one included in ''data/Aircraft/Generic/Effects'' or you can use your own.
* ''"texture= n6"'' is the path to the rainbow-texture.
* ''"texture= n6"'' is the path to the rainbow-texture.

Navigation menu