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.

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.