2,732
edits
m (Bot: Automated text replacement (-informations +information, -Informations +Information)) |
Red Leader (talk | contribs) m (typo, add templates) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{caution| | |||
The [[model-combined effect]] shader has '''replaced''' the separate normal map effect shader. | |||
The separate normal map effect shader should be considered '''deprecated''' and '''should not be used for new development'''.}} | |||
[[FlightGear]] 2.0.0 introduced effects, a powerful way to use shaders within FG without having to write C code. As of March 2010, [[FlightGear Git]] has a normal map effect (Effects/bumpspec.eff), which provides both bump mapping and specular mapping. This [[:Category:Howto|howto]] provides a tutorial on using this effect for [[aircraft]]. Similar techniques can be used to use other effects on aircraft. | [[FlightGear]] 2.0.0 introduced effects, a powerful way to use shaders within FG without having to write C code. As of March 2010, [[FlightGear Git]] has a normal map effect (Effects/bumpspec.eff), which provides both bump mapping and specular mapping. This [[:Category:Howto|howto]] provides a tutorial on using this effect for [[aircraft]]. Similar techniques can be used to use other effects on aircraft. | ||
If you don't know how a normal map works, have a look | If you don't know how a normal map works, have a look {{wikipedia|normal mapping|here|noicon=1}}. | ||
The latest documentation on the FlightGear effects system is to be found in | The latest documentation on the FlightGear effects system is to be found in {{readme file|effects}}. | ||
== Creating the normal map == | == Creating the normal map == | ||
Line 98: | Line 103: | ||
* If you find that the effect is too pronounced, try varying the scaling in the normalmap filter. 0.1 seems to work well for "rivet" effects. | * If you find that the effect is too pronounced, try varying the scaling in the normalmap filter. 0.1 seems to work well for "rivet" effects. | ||
* Make sure all the faces of the object that you assign the effect to have a texture assigned to them, otherwise you will cause a crash in the [[OpenGL]] layer (below [[OSG]]), because the effect's tangent and binormal vectors are computed using object's texture mapping coordinates. If you try to feed an untextured object to the generator, it should abort with a null vector, and then passing this null vector to the driver leads to a segfault. | * Make sure all the faces of the object that you assign the effect to have a texture assigned to them, otherwise you will cause a crash in the [[OpenGL]] layer (below [[OSG]]), because the effect's tangent and binormal vectors are computed using object's texture mapping coordinates. If you try to feed an untextured object to the generator, it should abort with a null vector, and then passing this null vector to the driver leads to a segfault. | ||
[[Category:Aircraft enhancement]] | |||
[[Category:Shaders]] | |||
[[fr:Tutoriel: Usage de l'effet de Normal Maps]] | [[fr:Tutoriel: Usage de l'effet de Normal Maps]] |