Missing textures

From FSDeveloper Wiki
Jump to: navigation, search
Overview


Missing textures for aircraft / scenery will impact on the simulator's performance, possibly resulting in a render-stall.

Depending on your PC's currently available resources,
the symptoms of which are, one or more of -

  • Objects rendered as transparent.
  • Objects rendered as disassociated components.
  • Screen artifacting
  • Reduced FPS.
  • Illegible fonts on main and context menus, ATC window, kneeboard page titles, cockpit tooltips, multiplayer-chat window etc..


The above issues can be caused by, (or further exacerbated by),
if the -

  • texture file is missing.
  • texture.EXT called by the model, differs from that present in the repaint folder.
  • texture is of a non-DXT format.


Modeler's particularly should note -
During build of your model, if you delete any part(s) that call textures unique to that part(s),
the related call to that texture, will still exist in your compiled model, (use a hex-editor to check).

On loading your model in-game, the model will still call that now "orphaned" texture, (even though the part(s) no longer exist).

Causes

  • File is missing from the relevant texture folder
  • Missing texture.cfg
  • Incorrectly configured texture.cfg (FSX default a/c texture.cfg file is wrong)
  • Model is calling a file from the common texture folder, (e.g. envmaps).

Identifying

To identify the filename of missing textures, (simobject or scenery),
add the following lines to your fsx.CFG into the section titled [SCENERY].

[SCENERY]
// To show alerts or areas, set to = 1 
// To hide alerts or areas, set to = 0 

// Alert for missing textures
ShowMissingTextureAlert=1

// Alert for missing objects
MissingLibraryAlert=1

// Render Trigger areas as visible boxes
ShowTriggers=1	

FSX will now display an alert dialog identifiying the missing file / object, or render trigger areas.

Simobject texture search paths

In FSX/FSXA, the search mechanism for locating any simobject's texture
behaves as follows, and continues until a matching texture is located, or the cycle is completed.

Entire cycle is repeated for every texture called by the model.

Searches For

1) file.ext - As explicitly defined in the model.
2) a matching .CAB file, (if CAB exists, will then search contents).
3) .ext of opposite type, (i.e. if 1) was a .bmp, searches for . dds, and vice-versa).
4) repeats 2) for the matching .CAB file, then searches for 3).


If not found during steps 1-4),
FSX/FSXA then repeats every step above
for each fallback path defined, in a correctly written texture.cfg

i.e. steps through -
fallback.1=..\texture
fallback.2=..\..\..\..\Scenery\Global\texture
fallback.3=..\..\..\..\Texture


The search sequence will repeat whenever the model requires a reload.
e.g. If the viewport is cycled from VC/2D to external.

Example

An IRL FSX/FSXA example for an airplane model calling a .bmp texture.

Methodology

For this example -
The FINDME.bmp texture was deliberately removed from the system,
to force FSX to perform a full search-path traverse.

I/O operation QueryOpen actions by fsx.exe, each resulted in a NAME NOT FOUND error.

The first 4 paths listed, are for the aircraft's native folder.

Each subsequent group of 4 paths,is for each of the 3 fallback paths.

Key

In the ProcMon logfile extract below -

  • MYFSXPATH - my drive & path to FSX's root folder, (concatenated for clarity).
  • TESTAIRCRAFT - The aircraft folder.
  • LIVERY - The repaint folder.
  • FINDME.bmp - The texture named in the model

Logfile data

Search path file-calls for the missing FINDME.BMP texture, (with a valid texture.cfg).

MYFSXPATH\SimObjects\Airplanes\TESTAIRCRAFT\texture.LIVERY\FINDME.bmp
MYFSXPATH\SimObjects\Airplanes\TESTAIRCRAFT\texture.LIVERY.CAB
MYFSXPATH\SimObjects\Airplanes\TESTAIRCRAFT\texture.LIVERY\FINDME.DDS
MYFSXPATH\SimObjects\Airplanes\TESTAIRCRAFT\texture.LIVERY.CAB

MYFSXPATH\SimObjects\Airplanes\TESTAIRCRAFT\texture\FINDME.bmp
MYFSXPATH\SimObjects\Airplanes\TESTAIRCRAFT\texture.CAB
MYFSXPATH\SimObjects\Airplanes\TESTAIRCRAFT\texture\FINDME.DDS
MYFSXPATH\SimObjects\Airplanes\TESTAIRCRAFT\texture.CAB

MYFSXPATH\Scenery\Global\Texture\FINDME.bmp
MYFSXPATH\Scenery\Global\Texture.CAB
MYFSXPATH\Scenery\Global\Texture\FINDME.DDS
MYFSXPATH\Scenery\Global\Texture.CAB

MYFSXPATH\Texture\FINDME.bmp
MYFSXPATH\Texture.CAB
MYFSXPATH\Texture\FINDME.DDS
MYFSXPATH\Texture.CAB

That's a lot of disk thrashing.
All CPU cycles utilised detract from FSX/FSXA FPS.

Related

Internal

External

  • Direct3D - Exposes the advanced graphics capabilities of 3D graphics hardware, including z-buffering, anti-aliasing, alpha blending, mipmapping, atmospheric effects, and perspective-correct texture mapping.
  • Bump Mapping - A technique to add details to shading without using more polygons.
  • Normal Mapping - An enhancement of bump mapping.
  • DirectDraw Surface - Wikipedia (aka .dds) - A file format used for storing textures and cubic environment maps, both compressed and uncompressed.
  • DirectDraw Surface - MSDN (aka .dds) - A file format used for storing textures and cubic environment maps, both compressed and uncompressed.
  • 3Dc - A lossy data compression algorithm for normal maps invented and first implemented by ATI. It builds upon the earlier DXT5 algorithm and is an open standard. 3Dc is now implemented by both ATI and NVIDIA.