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 material, unless you want to setup "simulated" windows, in which case you should see the page on 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, 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:

The Basic Windshield Material Parameters

  1. Create a new FlightSim material
  2. Call it "WINDSHIELD" and set the Material Type to 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) 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) 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)). The Normal Strength is usually set to 0.0 as well, unless you supply a Normal texture, which isn't necessary and not recommended.
  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) texture and a 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:

 

 

Rain Effects

To ensure that rain and moisture effects are correctly rendered on any windshield, a UV2 channel will needs to be created for it. This channel will be dedicated to the rain effect, and controls the direction of the rain drops and how they will move as the aircraft flies. The image below shows an example of this UV2 channel mapping, with arrows showing the direction of the rain, and how this will be interpreted when applied in the simulation:

Windshield Rain UV Mapping

 

Once you have the UVs setup you will need to ensure that you have enabled rain on the glass in the parameters:

Windshield Rain Parameters

After exporting the aircraft you can then test the rain effect in the simulation by using the Windshield Rain option in DevMode:

Example of Rain Effects On Windshield

 

 

Scratches and Fingerprints

To make things more realistic you can have dirt, scratches and even fingerprints on the windows of your aircraft.

NOTE: this section is specific to glass elements, but if you want information on adding dirt to the airframe, please see the Dirt And Grime section.

This is done using a composite material texture placed in the Details 1 (R), Icing Mask (G), Details 2 (B) texture slot where the colour components correspond to the following:

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

NOTE: The icing mask channel (G) is discussed in the section on Icing.

Vertex Colour Painting In 3DS Max

 

Note that you can use the Detail UV Tiling 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, Detail 1 (R) Opacity, Detail 2 (R) Rough, and Detail 2 (R) 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) texture, and an Icing Normal texture.

NOTE: this section is specific to glass elements, but if you want information on adding ice to the airframe, please see the page on Ice.

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:

Vertex Alpha Painting In 3DS Max

 

Once that's done you can add in the required textures, which will look something like this:

Normal And Secondary Details Textures

 

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 option in DevMode.

Example of Ice Effects On Windshield

 

 

Wipers

The Windshield material has an option to use a Wiper Mask (RGBA) texture to create realistic wiper effects, including dust streaks and the clearing of raindrops as the wiper moves. However, creating this texture can be quite tricky and so there is a tool available to you (installed as part of the modelling Plugins with the SDK) to help with this process. You can find an overview of the tool here: Wiper Mask Generator.

 

To use this tool to generate the required wiper mask texture you will need to do the following:

 

  • You should first ensure that you have set up the wiper models and animated them, as well as have created a corresponding Animation Group:
    Wiper Model And Animation Group Example

 

  • You would then place two helpers as a children of the animated wiper nodes. The area defined between the two helpers will later be projected onto a texture, so make sure to place the helpers correctly in the upper and lower points of the wiper:
    Helpers Example

 

  • You can now open the Wiper Mask Generator and fill in the data as requested:
    • Animation In - This is the clockwise movement.
    • Animation Out - This is the return anti-clockwise movement.
    • Windshield - This is the node name of the of the windshield mesh.
    • Output Path - The path where you wish to output the wiper mask texture.

 

  • With that initial data filled in you will then need to specify the name of the helpers you created previously, for each wiper assigned to the windshield. You can click the + or - buttons to add/remove helpers:
    Example Of How To Set Up The Wiper Mask Generator Tool

 

  • Once you have set everything up in the tool, you can go ahead and click on the Bake Texture button. This will save the generated texture to the specified output folder. The texture should look something like this when all this has been done correctly:
    Example Of The Wiper Texture Output

 

  • This texture can now be applied to the Windshield material, in the Wiper Mask (RGBA) texture slot.
    IMPORTANT! If you have wipers which can work separately, you will need to create one material per windshield with a wiper. Only wipers which work in unison and have the same animation frames should be using the same material.

 

  • You should now set up the Windshield Material parameters, as explained here: Windshield Parameters (Wipers).
    IMPORTANT! The Material animation feature works only with FlightSim materials, MultiMaterials are not supported.

 

  • With the Windshield node selected, open the Babylon Animation Groups window and, on the assigned Animation Group, add the material selecting the "Animated Materials" panel in blue and clicking Add Viewport Selection:
    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.

 

 

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 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. 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) section:

NOTE: The image below has had the brightness augmented to better show the effect.

Animated Example Of The Insects Mask Value Changing 

Having added this component to the windshield material, the 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:

<Component ID="Dirt">
    <Component ID="Regular_Dirt">
        <UseTemplate Name="ASOBO_ET_COMMON_Dirt_Multiple_Template">
            <TYPE>REGULAR</TYPE>
            <SaveParameters ID="Dirt_NODE_IDs">
                <Windshield_FL/>  <!-- Front left windshield node -->
                <Windshield_F/>   <!-- Front center windshield node -->
                <Windshield_FR/>  <!-- Front right windshield node -->
            </SaveParameters>
        </UseTemplate>
    </Component>
</Component>

 

 

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: