Add a more comprehensive standard fuselage reflection configuration
- use ALS shaders - Add parameters to enable or disable the effect and influence the shininess and fresnel factor
This commit is contained in:
parent
5c6ab27c98
commit
706afafb60
3 changed files with 157 additions and 49 deletions
|
@ -1,49 +1,150 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<PropertyList>
|
||||
<!--
|
||||
Parameters:
|
||||
* Boolean to enable or disable the reflection.
|
||||
Civilian aircraft are usually glossy but military aircraft are not.
|
||||
sim/model/civilian
|
||||
|
||||
<name>Fuselagereflect</name>
|
||||
<inherits-from>Effects/reflect</inherits-from>
|
||||
* Floating point value to specify the reflection factor.
|
||||
The range is between -1.0 and 0.0
|
||||
sim/model/livery/shininess
|
||||
|
||||
* Floating point value to specify the Fresnel factor.
|
||||
The range is between 0.0 and 1.0
|
||||
sim/model/livery/fresnel
|
||||
|
||||
These parameters can all be defined within a livery configuration file:
|
||||
<PropertyList>
|
||||
<sim>
|
||||
<model>
|
||||
<civilian type="bool">true</civilian>
|
||||
<livery>
|
||||
<name type="string">Factory Demonstrator</name>
|
||||
<texture>Liveries/factory.png</texture>
|
||||
<shininess type="float">-0.5</shininess>
|
||||
<fresnel type="float">0.7</fresnel>
|
||||
</livery>
|
||||
</model>
|
||||
</sim>
|
||||
</PropertyList>
|
||||
|
||||
|
||||
Usage:
|
||||
Add one of the following examples to your model configuration file.
|
||||
|
||||
* Minimal configuration
|
||||
<effect>
|
||||
<name>Effects/normalmap-reflection</name>
|
||||
<inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
|
||||
<object-name>fuselage</object-name>
|
||||
<object-name>wing</object-name>
|
||||
</effect>
|
||||
|
||||
* Adding a normal-map:
|
||||
<effect>
|
||||
<name>Effects/normalmap-reflection</name>
|
||||
<inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
|
||||
<object-name>fuselage</object-name>
|
||||
<object-name>wing</object-name>
|
||||
<parameters>
|
||||
<texture n="2">
|
||||
<image>Aircraft/AircraftName/Models/normalmap.png</image>
|
||||
</texture>
|
||||
</parameters>
|
||||
</effect>
|
||||
|
||||
|
||||
Further reading:
|
||||
https://wiki.flightgear.org/ALS_technical_notes
|
||||
-->
|
||||
|
||||
<PropertyList>
|
||||
<name>Aircraft/Generic/Effects/Fuselagereflect</name>
|
||||
<inherits-from>Effects/model-combined-deferred</inherits-from>
|
||||
<parameters>
|
||||
<rain-enabled type="int"> 2 </rain-enabled>
|
||||
<normalmap-enabled type="int"> 1 </normalmap-enabled>
|
||||
<normalmap-dds type="int"> 0 </normalmap-dds>
|
||||
<normalmap-tiling type="float"> 1.0 </normalmap-tiling>
|
||||
<lightmap-enabled type="int"> 0 </lightmap-enabled>
|
||||
<ambient-correction type="float"> 0.1 </ambient-correction>
|
||||
<reflection-enabled type="int"><use>sim/model/civilian</use></reflection-enabled>
|
||||
<reflection-type type="int"> 1 </reflection-type>
|
||||
<reflection-dynamic type="int"> 1 </reflection-dynamic>
|
||||
<reflection-rainbow type="float"> 0.0 </reflection-rainbow>
|
||||
<reflection-noise type="float"> 0.0 </reflection-noise>
|
||||
<reflection-fresnel-factor type="float"> 1.0 </reflection-fresnel-factor>
|
||||
<reflection-correction type="float"><use>sim/model/livery/shininess</use></reflection-correction>
|
||||
<reflection-fresnel type="float"><use>sim/model/livery/fresnel</use></reflection-fresnel>
|
||||
<texture n="2">
|
||||
<image>Aircraft/Generic/Effects/null_bumpspec.png</image>
|
||||
<filter>linear-mipmap-linear</filter>
|
||||
<wrap-s>clamp</wrap-s>
|
||||
<wrap-t>clamp</wrap-t>
|
||||
<internal-format>normalized</internal-format>
|
||||
</texture>
|
||||
<texture n= "5" >
|
||||
<type>cubemap</type>
|
||||
<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>
|
||||
<positive-x>Aircraft/Generic/Effects/CubeMaps/buildings/N.png</positive-x>
|
||||
<negative-x>Aircraft/Generic/Effects/CubeMaps/buildings/S.png</negative-x>
|
||||
<positive-y>Aircraft/Generic/Effects/CubeMaps/buildings/W.png</positive-y>
|
||||
<negative-y>Aircraft/Generic/Effects/CubeMaps/buildings/E.png</negative-y>
|
||||
<positive-z>Aircraft/Generic/Effects/CubeMaps/buildings/U.png</positive-z>
|
||||
<negative-z>Aircraft/Generic/Effects/CubeMaps/buildings/D.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>
|
||||
</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/Generic/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="double">0.1</rainbowiness>
|
||||
<fresneliness type="double">0.1</fresneliness>
|
||||
<noisiness type="double">0.1</noisiness>
|
||||
<refl_correction type="double">-0.2</refl_correction>
|
||||
<ambient_correction type="double">0.1</ambient_correction>
|
||||
<reflect_map type="double">0</reflect_map>
|
||||
</parameters>
|
||||
|
||||
<generate>
|
||||
<tangent type="int">6</tangent>
|
||||
<binormal type="int">7</binormal>
|
||||
</generate>
|
||||
|
||||
<technique n="4">
|
||||
<pass>
|
||||
<program>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
</pass>
|
||||
</technique>
|
||||
|
||||
<technique n="7">
|
||||
<pass>
|
||||
<program>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
</pass>
|
||||
</technique>
|
||||
|
||||
<technique n="9">
|
||||
<pass>
|
||||
<program>
|
||||
<attribute>
|
||||
<name>tangent</name>
|
||||
<index>6</index>
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>binormal</name>
|
||||
<index>7</index>
|
||||
</attribute>
|
||||
</program>
|
||||
</pass>
|
||||
</technique>
|
||||
|
||||
</PropertyList>
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 102 B |
|
@ -1022,6 +1022,13 @@ Started September 2000 by David Megginson, david@megginson.com
|
|||
<speed type="double">1.0</speed>
|
||||
<codec>libx265</codec>
|
||||
</video>
|
||||
<model>
|
||||
<civilian type="bool">false</civilian>
|
||||
<livery>
|
||||
<fresnel type="double">0.7</fresnel>
|
||||
<shininess type="double">-0.5</shininess>
|
||||
</livery>
|
||||
</model>
|
||||
</sim>
|
||||
<!-- accelerations -->
|
||||
<accelerations>
|
||||
|
|
Loading…
Add table
Reference in a new issue