Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 4.31 KB

BackgroundRendering.md

File metadata and controls

38 lines (31 loc) · 4.31 KB

Rendering map backgrounds

Prerequisites and assumptions

Note

Background image rendering is optional. If you need the images present for debugging, take them from a release. You should only need to run this step if you believe the cells or worldspaces have changed significantly since a game release. It is not recommended to re-render all spaces unless completely necessary. The database summary will indicate if a space has changed significantly, and the Image Asset Validator will identify that all required files are at least present.

Setup

At the root of the repository (beside the readme.md), create the folder FO76Utils\. Extract a release of fo76utils inside here. We only need render.exe and the 3 .DLLs prefixed 'lib' which it requires. You can delete any other files if you wish. The code described here makes calls to this render tool, which does all the heavy lifting for the rendering.
ImageMagick is used to convert DDS renders to JPG, and for downscaling where required. In the Background Render project, the path to the current installation of ImageMagick is hardcoded. You may need to adjust these paths to target your installation version.

Rendering all Cells and Worldspaces

In the main Mappalachia.sln, build and run the BackgroundRenderer project. It will prompt you to press enter to render all spaces, otherwise you may paste a space-separated list of EditorIDs of specific spaces you wish to render.
View the summary.txt from the database build process in git to easily find new EditorIDs.
The background renderer will connect to the database to identify which spaces should be rendered, therefore the database must be up to date and compiled.
The background renderer will also need to access Fallout 76 game assets directly from your installation in order to render them. If your Fallout 76 is installed in a non-standard path, edit the fo76DataPath string accordingly before building.
The renderer will use fo76utils to render the images, then ImageMagick to convert them. The outputted files will be placed directly in the necessary img/ and img/cell/ folders.

Note: The Appalachia worldspace render takes a lot of computing power. (16k at 2x SSAA downscaled to 4k). If necessary, edit the value of worldspaceRenderResolution to render straight to 4k.
Note: If there are errors in the batch process, a file errors.txt will be written describing what happened.

Water Mask

Running the Background Renderer will also generate a second Appalachia DDS with custom lighting and water coloring and hidden foliage meshes titled Appalachia_waterMask.dds - the purpose of this is to be used to form the water mask overlay png.
While the DDS will be automatically generated by the program and placed in the img/ folder, to complete the remaining steps you should open it in Paint.NET.
In Paint.NET, select the Paint bucket tool, change the flood mode to global, and the tolerance to 50%. Change the color to 0x0000FF (pure blue), then fill the water by selecting the center of a large water body. Now change to the Magic wand tool, again with a global flood mode and tolerance of 50%, select the same body of water, which should select all water bodies. Press Ctrl+I to invert your selection, then delete the selection, leaving only the water in near-pure blue.
Now resize the 16k image down to 4k: Ctrl+R > By percentage > 25% > OK.
Finally save the image as a PNG at maximum quality, as img/Appalachia_waterMask.png.
All DDS files should be removed before deploying to end users.

Next steps

You may now wish to validate the exported images with the Image Asset Validator, or also optionally extract the map marker icons if not already.
Otherwise, you can now move on to development of the actual end-user GUI program, Mappalachia.