A collection of simple command line tools to view or extract data from various types of Fallout 76 files. Also supports older Elder Scrolls and Fallout games starting from Oblivion.
Permissions and credits
Author's instructions
MIT license, see the LICENSE and README files on GitHub for detailed information and credits.
File credits
This author has not credited anyone else in this file
Donation Points system
Please log in to find out whether this mod is receiving Donation Points
wrldview: camera position is no longer changed when switching to side views.
bcdecode: added support for converting Radiance HDR format images to DDS cube maps, and for pre-filtering (the output is compatible with Fallout 76 and Starfield rendering in this version of NifSkope). See the documentation for details. HDR conversion has been tested with images from Poly Haven.
In the software renderer used by various tools, texture interpolation has been changed to be more consistent with how OpenGL handles texture coordinates, and it is now also seamless at cube map edges.
Fixed threading bug in render and wrldview that sometimes resulted in incorrect output (this issue did not affect the -rq 0x0400 mode). Note that rendering is somewhat slower after this fix and with the texture interpolation changes.
Fixed bugs in BC6H and BC7 decoding, added support for textures in R9G9B9E5_SHAREDEXP format.
Fixed error in the archive filesystem code on very short (less than 12 bytes long) loose files.
baunpack: DDS files extracted from texture .ba2 archives now have the header flags correctly set for cube maps.
Version 20230827
The -btd option of render and wrldview is no longer required for Fallout 76 worldspaces. If no terrain file is specified, the name is automatically generated from the data path and the EDID of the world.
Implemented support for decals using a box primitive (XPRM) to set the bounds of the decal.
Raw screenshots without downsampling and pixel format conversion can be saved in wrldview with the F11 key.
Single clicking on a pixel with the right mouse button in wrldview prints the coordinates of that pixel in the world space.
The -cam option of wrldview allows for setting custom view directions, in the format -cam scale -1 rx ry rz x y z.
Changing the view direction with the keypad keys in wrldview tries to rotate the camera position around the pixel at the center of the screen. If nothing has been rendered there, then the camera position is left unchanged, similarly to the previous versions.
New multi-threading implementation in render and wrldview. It can improve performance and make display updates more responsive, but the new code is experimental and may still have issues. Note that regular objects that do not use alpha blending (like water, effects and decals) can now be rendered in a different order whenever the programs are run, resulting in slightly different output due to randomness in Z-fighting. Adding 1024 (0x400) to the render flags with -rq disables this behavior and ensures deterministic output, at the cost of decreased performance.
Adding 512 (0x200) to the -rq option of render and wrldview disables visibility testing based on object bounds (OBND) data. When rendering only a part of the map, this works around some objects being incorrectly culled because of zero bounds, but makes performance significantly worse because all objects in the worldspace are always processed.
New option (-mc) for render and wrldview to set the number of models to be loaded and processed at a time. The allowed range is 1 to 64, with a default of 16. A higher value can improve both performance and the correctness of Z sorting, but it increases memory usage (for each group of models, enough memory is needed to load all the models and all the textures they are used with). Additionally, the -txtcache option has a shorter alias (-tc), and its maximum has been increased from 4095 to 65535 (64 GiB).
esmview and esmdump can now print CTDA fields, with some limitations. The function names are always based on Fallout 4, so they may be incorrect for other games, and parameters are always printed in the same format, regardless of the function. A few other types of fields for references and material swaps have been added as well.
In esmview, if a field type has a custom definition of *, it is ignored instead of being printed as raw data.
esmview accepts EDIDs instead of form IDs. In ambiguous cases, the EDID needs to be prefixed with a $ character.
Some fixes to the -scol 0 mode of render and wrldview.
In cubeview and other programs with file selection, fixed a bug in selecting files with the mouse. Files can now also be opened with a single click with the right button.
Building from the source code now requires a compiler with C++20 support.
Version 20230806
Implemented support for projected decals (TXST objects) in render and wrldview. This feature is enabled by adding 32 to the -rq option, but it does have some limitations and issues, and it increases memory usage.
Separate colors for shallow and deep water are now supported when water properties are read from the ESM. In the case of Fallout 76 water, shallow color is replaced by separate transparencies for each channel.
Several improvements to cubeview, it can now be used to browse and view any textures, as well as save them in uncompressed DDS format.
Improved file selection in nif_info and cubeview, when the number of files is large (100 or more), they can be browsed in tree format instead of the previously used flat file list.
The -rq option of render and wrldview has a number of new flags, 16 enables rendering actors (this is rather limited and only really useful for debugging), 32 enables decals, 64 enables marker objects (if actors are also enabled, then a default human marker model is used if no model is found for the actor), 128 disables the built-in exclude patterns for effect meshes, and 256 disables effect meshes.
wrldview prints more detailed information when clicking on objects in debug mode 1.
render can create a water mask image if the -watermask 1 option is used. All non-water pixels of the water mask are transparent and black, while water is opaque with the default normal map color (light blue).
Ctrl-A copies the entire text buffer to the clipboard when in SDL console mode in esmview and wrldview, and when viewing detailed model information with V in nif_info.
wrldview now shows a help screen on pressing H, and the list of cam view directions on R. Setting the view direction with the keypad numbers has also been made more intuitive, and the same change has been made to nif_info as well.
In esmview, the W (view model) command has new optional arguments for adding a material swap form ID, and to set the grayscale to palette map scale.
If the selected worldspace has no landscape data, render and wrldview try to load it from the parent world.
Marker definition files used by markers and wrldview now support include and mipoffset directives to include another file and to adjust icon sizes.
Markers with negative Z coordinate in the view space are no longer rendered.
On Windows, low level file I/O functions are used, removing the limitation on the number of loose files that can be loaded from the archive path.
Textures in R8 and BC7 formats are now supported, the latter using code from detex (https://github.com/hglm/detex).
Message buffer sizes used by the SDL console have been increased.
Various minor bug fixes and optimizations.
Version 20230319
bcdecode: new option to calculate the blue channel of normal maps.
markers: added support for filtering references by flags, and for macros.
markers: fixed color outside filled outline icons.
wrldview: added support for saving screenshots with F12 or Print Screen.
Minor fixes to rendering.
Version 20221113
wrldview can now draw markers on the rendered world space, using the same list file format as 'markers'.
Various bug fixes.
Version 20221108
Fallout 76 vertex color gamma correction fix.
Version 20221107
New program (wrldview) that is an interactive version of render using SDL 2.
A Python interface to libfo76utils can be built using SWIG under 'scripts', by running scons with the pymodule=1 option.
render: fixed bug in -textures 0 mode, and in the order of applying a material swap from a reference and a color swap from its base object.
Version 20221025
render: Fallout 4 specular and Fallout 76 lighting and reflectance maps are now also supported on terrain. This is enabled if the new -rq (render quality) option is set to 12 or higher, which implies enabling PBR textures on all models as well, similarly to '-hqm meshes'. Using '-rq 15' is equivalent to also adding '-a -scol 1'.
Model paths matching meshes/effects/*fog.nif or meshes/effects/*cloud.nif are automatically excluded by render.
Added support for Fallout 76 lighting and effect shader properties in NIF files. Previously, loading material information was limited to BGSM and BGEM files, which are used by the majority of models.
Implemented some less commonly used blend functions.
Minor bug fixes.
Version 20221016
esmview can now be built with its own console implementation based on SDL2. When running in this mode, it supports command history and better editing, as well as interactive record selection and an integrated NIF viewer. However, this also has disadvantages compared to using a regular system terminal window (worse font rendering, only a single built-in bitmap font supported), so a version of esmview that only uses standard input and output is still included with the package as esm_view.
nif_info has a new option to print more detailed information about materials, and a number of improvements and new features in view mode. The latter include the addition of a simple file browser to select from the list of .nif files that matched the pattern specified on the command line, the ability to view information about the model, and to save higher quality screenshots.
Implemented support for effect materials in nif_info and render. Effect rendering is still experimental and may not work correctly. As a workaround, effects can be disabled by running render with the option -xm meshes/effects (models under meshes/sky and meshes/effects/ambient are filtered out by default).
Tools that use the NIF rendering code can now be built with A2R10G10B10 frame buffer format instead of the default R8G8B8A8. This increases color depth to 10 bits per channel, at the cost of slightly slower processing.
render has new command line options to set the water UV scale, and to adjust the FOV simulated for specular reflections and cube mapping. The output format can be changed as well to 32-bit RGBA, with either 8 or 10 bits per channel. Note: RGB10A2 support by image editors is limited, files saved in such format may load incorrectly, or with the data truncated to 8 bits per channel.
Improvements to the downsampler used by render, nif_info, landtxt, and esmview in SDL console mode, better performance, and larger filter window (the function is very similar to Lanczos with a=4). The -ssaa option of render and landtxt now also accepts a value of 2 to enable downsampling from quadruple resolution (16x SSAA). This can further improve image quality, but is computationally very expensive.
Minor changes to rendering water, transparent objects, and reflections.
Version 20220919
The environment variable FO76UTILS_DATAPATH can be used to set a default path to game data files. If this environment variable is set, and the path to an ESM or BTD input file does not begin with ".", "/", "\", or a drive letter (on Windows), then the file is searched relative to the default data path. For programs that take an archive path as input, if it is an empty string (""), then the archives are loaded from the default path.
nif_info and render: implemented support for alpha blending. This is currently limited to decals, since effect materials are still not supported.
render: -env and -wtxt now default to textures/shared/cubemaps/mipblur_defaultoutside1.dds and textures/water/defaultwater.dds.
Fixed Fallout 4 glow maps being incorrectly enabled on some materials.
Version 20220912
Reworked rendering of NIF models in nif_info and render:
Fallout 76 meshes are now rendered with PBR and sRGB/linear color space conversion. Terrain is still limited to using diffuse and normal map textures only.
New lighting code, allows for setting the colors and levels of the light source, environment maps, and ambient light separately. The -lpoly option of render has been removed, and replaced with -lcolor.
Improved water rendering, water colors can be taken from the ESM file (it is still possible to set a fixed color with -watercolor, although the alpha channel is interpreted differently), and deeper water has higher opacity.
Texture coordinates are normalized internally, fixes issues with different resolutions and aspect ratios within a texture set.
Added limited support for glow maps.
mplemented support for loading loose files in all utilities that take an archive path as input. The files can be placed under the archive path, with the expected structure of sub-directories (e.g. texture files under "textures/"), and take precedence over the archives. Note that all files are kept open, so it is not recommended to use this feature with a very large number of files.
nif_info has several new keyboard controls in view mode, and allows for viewing multiple files that match the pattern specified on the command line. It can also print status information on screen, and the list of keyboard controls if "H" is pressed.
nif_view has been removed on Windows, nif_info can now be run either as a console program, or interactively with the -view option.
cubeview: new keyboard controls for changing the FOV and color space, added mouse support.
The -light option of render has been changed to make the rotation parameters more intuitive. Similar changes have also been made to rotation controls in nif_info and cubeview.
baunpack - list the contents of, or extract from .BA2 or .BSA archives.
bcdecode - convert BC1 to BC5 block compressed DDS textures to uncompressed RGBA image data in raw or DDS format. BC7 decompression is also supported, using code from detex. bcdecode can also be used to convert from .hdr to .dds, and to pre-filter cube maps for use in PBR.
btddump - extract terrain data from Fallout 76 .BTD files to raw height map, land textures, ground cover, or terrain color.
cubeview - view cube maps or other textures from archive files.
esmdump - list records from .ESM files in text or TSV format.
esmview - interactive version of esmdump, also includes a NIF viewer for objects with an associated model (MODL).
findwater - create a height map of water bodies, optionally using .NIF meshes for Skyrim and newer games.
fo4land - extract landscape data from Oblivion, Fallout 3/New Vegas, Skyrim, and Fallout 4.
landtxt - create an RGB land texture from the output of btddump (formats 2, 4, 6, and 8) or fo4land (formats 2, 4, and 5), or directly from terrain data in ESM/BTD file(s), using a set of DDS texture files.
markers - find references to a set of form IDs defined in a text file, and mark their locations on an RGBA format map, optionally using DDS icon files.
nif_info - list data from a set of .NIF files in .BA2 or .BSA archives, convert to .OBJ format, or render the model to a DDS file, or display it.
render - render a world, cell, or object from ESM file(s), terrain data, and archives. Supports Fallout 76 and Fallout 4, and partly the older games (TES4/FO3/FNV are limited to terrain and water only).
terrain - older and simpler program to render terrain and water only to an RGB image, using files created by btddump, findwater, or fo4land. Includes 2D and isometric mode.
Running any of the programs without arguments prints detailed usage information. See also the GitHub repository for Windows binary packages and older releases.
Optionally, install SDL 2 for cubeview, wrldview, and the NIF viewer mode of esmview and nif_info, matplotlib for plotting scripts, and SWIG for building the Python interface to libfo76utils:
The installed MSYS2 and MinGW packages can be updated anytime by running pacman -Syu again.
In the MSYS2 MinGW x64 terminal, compile the utilities with scons. Use scons -j 8 for building with 8 parallel jobs, and scons -c to clean up and delete the object files and executables. Running scons with the rgb10a2=1 option compiles all tools that can render NIF files with RGB10A2 frame buffer format, and adding pymodule=1 builds a Python interface to libfo76utils under scripts.
If Visual Studio is also installed on the system, tools=mingw needs to be added to the scons options.
By default, the code generated is compatible with Intel Sandy Bridge or newer CPUs. Adding avx=0 or avx2=1 disables instruction set extensions or also enables them for Haswell or newer, respectively.
Optionally, for the makemap and icon extraction scripts only, download and install ImageMagick and SWFTools.