X-Plane 11’s Physically Based Rendering (PBR) uses a new material model for solid textured objects and meshes.

Physical Simulation

The X-Plane lighting and material model divide the light interaction with materials into two categories:

  • Specular reflection – this is light that bounces directly off the surface of a material. Speuclar reflection is responsible for mirror-like reflections, glossy appearances on materials and any white “sun spot”.
  • Diffuse reflection – this is light that makes it past the surface of the material and is partly absorbed. Diffuse reflection is significantly less directional and may be strongly tinted.  Diffuse reflection gives materials a “matte” look.

X-Plane 11 conserves energy between diffuse and specular reflection – having a stronger specular reflection reduces the amount of diffuse reflection automatically; in this way highly glossy and reflective materials don’t appear to be overly bright compared to matte materials.

Comparison to X-Plane 10: in X-Plane 10, specularity could be added without reducing diffuse reflectance; this meant that most reflective materials were brighter than non-reflective ones. An artist could choose to manually darken the albedo of a texture to compensate.

The microsurface of a material is considered to be rough or glossy (or some measure in between); roughness and glossiness are measures of how smooth the surface is, not how reflective it is. A surface can be highly reflective and highly rough at the same time.

Roughness serves to spread out specular reflections; a mirror image in a rough surface appears blurry, as each ray of incoming light bounces in several directions.

X-Plane 11 conserves energy as roughness is adjusted; the same amount of energy is reflected in a rough or glossy surface. The difference is that a glossy surface has a highly focused reflection; a light source’s specular reflection will go in one direction on a glossy surface, resulting in a specular highlight that is very bright but small.

By comparison, a rough surface diffuses the specular energy in all directions; the specular reflection is visible over a wide range of angles but is not very strong.

Comparison to X-Plane 10: in X-Plane 10, all surfaces are glossy and only the overall specular reflectance could be changed. Therefore it was impossible in X-Plane 10 to model a surface like asphalt, which is simultaneously very reflective and very rough. An artist could attempt to simulate this by creating a high frequency noise pattern of highly reflective and non-reflective pixels to manually “break up” the reflection, but when zoomed out this effect is incorrect.

Surfaces become more reflective when viewed at glancing angles; this is called the Fresnel effect. X-Plane 11’s rendering engine simulates this automatically. The specular reflectance of a material that is specified by the artist is its minimum reflectance, when the material is viewed directly (e.g. the camera is orthogonal to the surface).

X-Plane 11 automatically decreases diffuse light as the effective reflectivity increases. This avoids materials appearing too bright at glancing angles.

(This is probably a bug – the incoming light is not more glancing based on view angle! The actual effect of fresnel is more complicated because it is affected by the integral of all incoming light.)

Comparison to X-Plane 10: X-Plane 10 does not provide camera-angle-based variable reflectivity; as a result, materials often have to be made too reflective at all angles to make glancing angles look adequately reflective.

Material Properties

The major properties of a material are controlled by two channels of the normal map of a model:

  • Roughness is stored in the alpha channel of the object, with 1.0 (maximum opacity) being the most glossy surface, and 0.0 (the most transparent) being the roughest surface.
  • Base reflectance (how much light is reflected off of the surface at an orthogonal angle) is optionally stored in the blue channel; no blue means no base reflectance and maximum blue means a completely reflective material at all viewing angles.

This scheme is opt-in; objects use the NORMAL_METALNESS directive to indicate that the blue channel is suitable for base reflectance. (Since legacy models typically have strong blue values from tangent space normal maps, the blue channel must be ignored in legacy models.)

If metalness is not used, a base reflectance of 0.04 is assigned to the entire material; this is a good approximation for most dielectrics (plastic, wood, concrete, etc.) and also a reasonable backward-compatible value for X-Plane 10 content. The roughness channel is intentionally encoded to have the highest gloss value in X-Plane 11 match the most reflective material in X-Plane 10. (Since X-Plane 10 specular reflections were all highly glossy, this means that at least plastics and matte materials “just work” in X-Plane 11.)

X-Plane 11’s treatment of the albedo color (day texture) changes as base reflectance increases:

  • The albedo is used to tint specular reflections. While this is not strictly physically correct, it provides an affordable way to create tinted metallic reflections.
  • Because base reflection is increasing, the diffuse color becomes darker due to energy conservation.

Glass Effects vs Decals

The alpha channel of the albedo (day texture) is used to create translucent rendering, e.g. the mesh being drawn is blended with the mesh behind it to create a mixture of both colors. There are two physical interpretations of this alpha effect:

  • The top mesh is “translucent”, e.g. like tinted glass; the color taken from behind the mesh represents light transferred through the top mesh (translucency).
  • The top mesh does not always exist in the alpha-clear parts of the texture, e.g. like the holes in a fence. The top texture acts like a ‘decal’ over what is behind it. In this situation, partial alpha represents a blend of both materials as if there is a pattern of holes in the top mesh so small that both the presence and absence of the material happen in a single pixel. (Think of zooming out with a chain-link fence – the result is translucency.)

In practice, authors use one effect (alpha blending) for both physical cases (translucency and decals). The meaning of alpha matters for physical correctness.

When alpha means ‘decal’, clear alpha removes all lighting effects from the mesh. This is the correct simulation of the mesh not existing.

When alpha means ‘glass’, clear alpha removes the diffuse but not specular component of lighting effects from the mesh. This is the correct simulation of light passing through the boundary layer from ‘stuff behind the mesh’, rather than being absorbed.

X-Plane 11’s default interpretation is the ‘decal’ interpretation, which:

  • Matches X-Plane 10.
  • Is HDR/deferred rendering compatible.
  • Preserves decal behavior on surfaces like runway pavement.

Authors have the option in X-Plane 11 to use glass alpha as long as:

  1. The object is attached to an aircraft and
  2. The aircraft’s lighting mode is marked as “glass”.

In this situation, authors can put the BLEND_GLASS directive into an object header; this will cause alpha to make the diffuse channel translucent while keeping specular effects, for reflections on clear glass.

12 comments on “X-Plane 11 Material Model

  1. I’m not an expert designer/programmer, so I need to see an example of an object with these atributes. I added NORMAL_METALNESS and the texture with blue channels, but nothing happened. Does it go below the TEXTURE and TEXTRE_LIT lines (and then the texture)? Or is it after the ATTR…etc. Help, please. Sorry for being ignorant.

    ax

      1. I’m sorry, I didn’t see this reply until now. I’m using Blender to export the obj, but I’m editing the obj in text (using NotePad++).
        So it would be something like:
        A
        850

        DRAPED_POLYGON

        NORMAL_METALNESS Apron_1_NM.png
        TEXTURE Apron_1.png
        LAYER_GROUP taxiways +1

        SURFACE asphalt
        SCALE 35 35
        MIRROR

        DECAL_LIB lib/g10/decals/apt_asphalt.dcl

        1. NORMAL_METALNESS doesn’t have a parameter – it doesn’t have have anything afterwards like a file path. I’m surprised that the log doesn’t have a relevant message about that. It it doesn’t or it wasn’t helpful I suggest filing a bug saying what you thought it meant and what you think might communicate it better.

        2. The NORMAL_METALNESS should just be used to tell X-Plane it uses the new PBR functionality. Your file should look like this instead.

          A
          850

          DRAPED_POLYGON

          TEXTURE Apron_1.png
          TEXTURE_NORMAL Apron_1_NM.png
          NORMAL_METALNESS
          GLOBAL_specular 1
          LAYER_GROUP taxiways +1

          SURFACE asphalt
          SCALE 35 35
          MIRROR

          DECAL_LIB lib/g10/decals/apt_asphalt.dcl

  2. In the text above it states

    “Roughness is stored in the alpha channel of the object”

    what alpha channel? I have exported out of substance painter with glossiness channel in the alpha of the normal map but I have to save as a .tiff (for example) to keep the alpha channel?? my understanding is .PNG cant be saved with an alpha channel? How can a PGN have an alpha channel?

    thanks

      1. Hi Ted,

        thanks for replying

        Take substance Painter out of the equation, lets say then I have a normal map saved as a .psd in photoshop which has R,G,B and alpha channels. The R and G channels are the X and Y for the normal, the Blue is metalness and the Alpha is Glossiness (roughness) and I save it as a PNG. If I reopen the PNG in photoshop it only has the R,G,B channels and the alpha is lost. I cant seem to save it with an alpha channel, I can save it with transparency if I save for web or export the PNG.

        is it a case of or should I assume that Photoshop is saving the Alpha out and it is when I reopen it in photoshop to view it, is when the Alpha channel is lost???

        At the moment i am using .dds

        thanks for your time.

      2. Hi

        Interestingly, Photoshop (the 2015 version I use) indeed does loose the alpha when I reopen it. I saved the file from photoshop then downloaded and opened the file in Gimp, where the alpha channel is present. if I open the same file in photoshop no alpha channel is present.

        live and learn! paid for program, free program…go figure!

    1. An alpha channel is usually a grayscale channel like RGB with 256 bits of information. What X-Plane and the .png format uses (as I understand it) is called opacity instead. Opacity is a 0 to 100 instead of 0 to 255. This means a little less detail in the opacity layer but also a lower file size.

Leave a Reply

Your email address will not be published. Required fields are marked *

Please do not report bugs in the blog comments.
Only bugs reported via the X-Plane Bug Reporter are tracked.