# Windshield And Windows This page talks about how to texture all the glass elements (windshields and windows) of the aircraft being modeled. For these textures you will need to use the [windshield](../../../../textures/materials/flightsim-materials/#windshield) material, unless you want to setup "simulated" windows, in which case you should see the page on [Parallax Windows](../parallax-windows/) (these are useful for large aircraft like airliners where you don't want to model the entire interior geometry). You are also encouraged to add [Sky Portals](../exterior-lights/#sky-portals), which are a type of *light* used to simulate the way sunlight is channeled through a window and which should be placed on *all* aircraft windows (including the windshield) where there is an interior.   To set up the WindShield material you have multiple parameters that can be changed to affect the final look of the glass. To start with we'll look at the basic parameter setup, then further down this page we'll go into more detail about specific options: {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_1_material_params.png" alt="The Basic Windshield Material Parameters" >}} 1. Create a new **FlightSim** material 2. Call it "WINDSHIELD" and set the **Material Type** to *[Windshield](../../../../textures/materials/flightsim-materials/#windshield)* as well 3. Set the alpha of the **Base Colour** to approximately 0.01, and set the base colour to white (you can use another colour if you want to tint the window, or you can supply a [Base Color (Albedo)](../../../../textures/materials/flightsim-material-textures/#base-color-albedo) texture to give colour). Note that you can change the alpha value to change the opacity of the glass. Alternatively you can set the colour to white and the alpha to 0 and supply a [Base Color (Albedo)](../../../../textures/materials/flightsim-material-textures/#base-color-albedo) texture instead, where the colour components will be the glass tint and the alpha component will set the opacity (this is not the recommended method, however). 4. Set the **Roughness** to either 0.0, or a very small value if you want to use the roughness channel, and the **Metalness** should be set to 0.0. The **Reflection Mask** should be set to 1 (as the reflection amount is controlled by the **Red** component of the [Reflection (R), Roughness (G), Metallic (B)](../../../../textures/materials/flightsim-material-textures//#reflection-r-roughness-g-metallic-b)). The **Normal Strength** is usually set to 0.0 as well, unless you supply a [Normal](../../../../textures/materials/flightsim-material-textures/#normal) texture, which isn't necessary and not recommended. You can create your own textures for this, or you can find versions of these textures which you can use in your own aircraft in the [Shared Assets](../../../../models-materials-and-textures/#shared-assets) folder installed as part of the Microsoft Flight Simulator 2024 SDK. 5. To start with, the detail values may be greyed out or be set to their default values, but they will be required later when you add a [Details 1 (R), Icing Mask (G), Details 2 (B)](../../../../textures/materials/flightsim-material-textures/#details-1-r-icing-mask-g-details-2-b) texture and a [Detail Reflection (R), Detail Roughness (G), Detail Metallic (B)](../../../../textures/materials/flightsim-material-textures/#detail-reflection-r-detail-roughness-g-detail-metallic-b) texture.   The different textures that you will need are explained in each of the sections below, as well as the other parameters that are available. When working on the windshield, it is worth noting that you have some extra debug parameters included as part of the windshield material. You can find more information from the following link: - [Windshield Parameters (Debug Shader Windshield)](../../../../textures/materials/flightsim-material-parameters/#windshield-parameters-debug-shader-windshield)     ### Rain Effects Unlike previous versions of the simulation, in Microsoft Flight Simulator 2024 you do not need to set up specific UV's to handle the rain, as it is now all handled by a shader in the simulation automatically. However you still need to enable this shader using the **Receive Rain** parameter in the Windshield material options:   {{< image-center src="images/3_Models_And_Textures/Materials/Materials/Parameters/mat_11_param_rain.png" alt="Windshield Rain Parameters" >}} After exporting the aircraft you can then test the rain effect in the simulation by using the [Windshield Rain](../../../../../devmode/menus/options/#windshield-rain) option in DevMode: {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_3_rain.png" alt="Example of Rain Effects On Windshield" >}}   Note that when creating the **cockpit** (or **cabin**) windshield glass (rather than the **airframe** windshield glass) you will need to check the **Rain On Backface** option, which will invert the vertex position in the shader for spawning the rain.     ### Scratches and Fingerprints To make things more realistic you can have dirt, scratches and even fingerprints on the windows of your aircraft. {{< callout context="note" title="NOTE" icon="outline/bulb" >}} this section is specific to glass elements, but if you want information on adding dirt to the airframe, please see the [Dirt And Grime](../dirt-and-grime/) section. {{< /callout >}} This is done using a composite material texture placed in the [Details 1 (R), Icing Mask (G), Details 2 (B)](../../../../textures/materials/flightsim-material-textures/#details-1-r-icing-mask-g-details-2-b) texture slot where the colour components correspond to the following (note that the contrasts of the components have been exaggerated so the actual image contained is clearer): {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_4_comp.png" alt="Comp Texture Component Layers" >}} You can then apply the two channel textures using the **vertex paint** modifier to paint on the vertex colours, where: - Red = Scratches - Blue = Fingerprints {{< callout context="note" title="NOTE" icon="outline/bulb" >}} The icing mask channel (G) is discussed in the section on [Icing](#icing). {{< /callout >}} {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_5_vertexcolour.png" alt="Vertex Colour Painting In 3DS Max" >}}   Note that you can use the [Detail UV Tiling](../../../../textures/materials/flightsim-materials/#detail-uv-scale) parameter to adjust the scale of the texture as it is applied to the windshield to ensure that everything looks just right. You can also use the [Detail 1 (R) Rough](../../../../textures/materials/flightsim-material-parameters/#detail-1-r-rough), [Detail 1 (R) Opacity](../../../../textures/materials/flightsim-material-parameters/#detail-1-r-opacity), [Detail 2 (B) Rough](../../../../textures/materials/flightsim-material-parameters/#detail-2-b-rough), and [Detail 2 (B) Opacity](../../../../textures/materials/flightsim-material-parameters/#detail-2-b-opacity) values to adjust the global opacity and roughness for the material.     ### Icing To show ice creeping over the windshield, we will use a couple of textures and some vertex painting: essentially a combination of vertex alpha, the (G) component of the [Details 1 (R), Icing Mask (G), Details 2 (B)](../../../../textures/materials/flightsim-material-textures/#details-1-r-icing-mask-g-details-2-b) texture, and an [Icing Normal](../../../../textures/materials/flightsim-material-textures/#icing-normal-use-detail-uv-tiling) texture. {{< callout context="note" title="NOTE" icon="outline/bulb" >}} this section is specific to glass elements, but if you want information on adding ice to the airframe, please see the page on [Ice](../frost-and-ice/). {{< /callout >}} To start with, use the vertex paint modifier to paint the vertex alpha on the windshield and windows, paying attention to higher alpha values where more icing will appear (generally around the corners and edges), and lower alpha values for the areas with least icing, for example: {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_6_icevertexpainting.png" alt="Vertex Alpha Painting In 3DS Max" >}}   Once that's done you can add in the required textures, which will look something like this: {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_7_icetextures.png" alt="Normal And Secondary Details Textures" >}}   You can create your own textures for this, or you can find versions of these textures which you can use in your own aircraft in the [Shared Assets](../../../../models-and-textures/models-materials-and-textures/#shared-assets) folder installed as part of the Microsoft Flight Simulator 2024 SDK. They are called: - `GLASS_DetailMap01_mask.png` - `Frost_Detail_norm.png`   Note that you can adjust the UV scales to ensure that everything looks just right, and you can test the results in the game by using the [Icing](../../../../../devmode/menus/options/#icing) option in DevMode. {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_8_iceexample.png" alt="Example of Ice Effects On Windshield" >}}     ### Wipers The [Windshield](../../../../textures/materials/flightsim-materials/#windshield) material has an option to use a [Wiper Mask (RGBA)](../../../../textures/materials/flightsim-material-textures/#wiper-mask-rgba) texture to create realistic wiper effects, including dust streaks and the clearing of raindrops as the wiper moves. {{< image-center src="images/3_Models_And_Textures/Plugins/WiperMask/wiper_mask_3_texture.png" alt="Example Of The Wiper Mask Texture" >}}   Creating this texture can be quite tricky and so there is a tool available to you (installed as part of the modelling [Plugins](../../../../plugins/plugins/) with the SDK) to help with this process. Instructions on how to use the tool to generate the wiper mask texture can be found for both Blender and 3DS Max on the following page: - [Wiper Mask Generator Tool](../../../../plugins/wiper-mask-generator-tool/)   Once you have generated the texture and added it into the [Wiper Mask (RGBA)](../../../../textures/materials/flightsim-material-textures/#wiper-mask-rgba) texture slot, you can then set up the material [Windshield Parameters (Wipers)](../../../../textures/materials/flightsim-material-parameters/#windshield-parameters-wipers).Since the material is an **animated** material you will need to setup the keyframes and values for the [Wiper Animation](../../../../textures/materials/flightsim-material-parameters/#wiper-animation) ***Wiper1 State*** value. The animation needs to be over **10 frames** where frame 1 is the rest position and frame 10 is the wiper at full rotation, the *highest* position. So for frame 0, *Wiper1 State* should be 1, and for frame 10, *Wiper1 State* should be 1. You can then set the rest of the wiper parameters as required. {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} The Material animation feature works only with FlightSim materials, MultiMaterials are not supported. {{< /callout >}}   An additional step is required in 3DS Max, which is to set up the animation groups. So, with the Windshield node selected, open the [Babylon Animation Groups](../../../../plugins/3ds-max-plugin/the-3ds-max-plugin/#animation-groups) window and, on the assigned Animation Group, add the material selecting the "Animated Materials" panel in blue and clicking `Add Viewport Selection`: {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_13_wipersbabylon.png" alt="Setting The Material As An Animated Material In The Babylon Animation Group Window" >}}   After having followed these steps, you can export the aircraft at any time. The material and its animation will now be used within the simulation and you will get the full benefit of the visual effects and realism that they offer.   {{< image-center src="images/3_Models_And_Textures/Aircraft/airframe/windshield/windshield_14_wipers.gif" alt="Example Of A Correctly Setup And Applied Wiper Mask In The Simulation" >}}     ### Insect Splatter One of the window effects available to you is that of having realistic window impacts from insects over time when flying. This effect is simple to set up and only requires two textures, however you **must use the supplied textures** for this effect, which you can get from the [Shared Assets](../../../../models-and-textures/models-materials-and-textures/#shared-assets) *texture* folder. The exact paths are as follows: <SDK Root>\(SharedAssets\)texture\(Dirts\)Insects\_Helico\_Windshield\_albd.png <SDK Root>\(SharedAssets\)texture\(Dirts\)Insects\_Helico\_Windshield\_mask.png   These go in the **Insects Albedo (RGBA)** texture slot and the **Insects Mask (A)** texture slot, and **must be applied to the UV2**. There are no additional parameters related to this effect, as it is all handled by the simulation, however you can debug the effect using the [Windshield Parameters (Debug Shader Windshield)](../../../../textures/materials/flightsim-material-parameters/#windshield-parameters-debug-shader-windshield) section: {{< callout context="note" title="NOTE" icon="outline/bulb" >}} The image below has had the brightness augmented to better show the effect. {{< /callout >}} {{< image-center src="images/3_Models_And_Textures/Materials/Materials/Parameters/mat_11_param_windshield_debug4.gif" alt="Animated Example Of The Insects Mask Value Changing" >}} Having added this component to the windshield material, the [Model Behaviors](../../../../../content-configuration/models/modelbehaviors/model-behaviors/) XML file will need to call the `ASOBO_ET_COMMON_Dirt_Multiple_Template` and include, as parameter tags, each of the window **node names** which use the windshield material, for example: ``` xml REGULAR ```     ### Additional Details There are a number of additional details that can be added to the windshield, all of which require a texture to be setup correctly, and some of them also have the possibility of being tweaked using specific vertex colours and parameters. These are all very straightforward to use and the instructions are given in the following sections related to the textures they use: - [Secondary Details (RGBA)](../../../../textures/materials/flightsim-material-textures/#windshield_secondary) - [Detail Normal](../../../../textures/materials/flightsim-material-textures/#detail-normal) - [Scratches Normal](../../../../textures/materials/flightsim-material-textures/#windshield_scratches) - [Iridescent Thickness (R)](../../../../textures/materials/flightsim-material-textures/#windshield_iridescent)