Ace Combat 7: Skies Unknown
Texture Replacement Guide using Unreal Engine 4 Editor
Version 3.0c, last updated Mar. 31, 2022
By @Dantofu
This document is best read with View > Print layout disabled.
3. Starting Unreal Engine 4 Editor
6. Importing Normal Map Texture
iv. DXT Compression Artifacting
vii. Issue with Alpha Channel and UE4
The purpose of this guide is to instruct prospective modders on using Unreal Engine 4 Editor to modify and replace textures in Ace Combat 7: Skies Unknown.
Other methods exist in achieving the same goal. @SuperOstrich has compiled several alternative guides to modding Ace Combat 7 textures using more lightweight tools, in addition to this guide itself.
The following outlines some key aspects to consider when using Unreal Engine 4 method:
Pros:
Cons:
Unreal Engine 4 Editor (Version 4.18) - Lightweight custom build by VDINST_Rythus. Epic Games account, launcher or connection is not required for this build.
UnrealPak (Alternative link) - Tool for mod packaging.
Custom Texture Filepaths - Contains edited material files, which allow unique MREC and Normal map textures to be used for every aircraft skin.
Sample textures - Contains sample F-15C Diffuse and MREC textures for this guide.
Download the .rar file provided in Section 2 - Requirements. Extract the .rar in the location of your choosing.
The UE4 Editor executable is located in the following:
Engine \ Binaries \ Win64 \ UE4Editor.exe |
Choose Blank in Template section.
Choose No Starter Content. They are not needed for this guide.
Set Folder path and project Name to your choosing.
Click Create Project.
For quicker access in the future, a uproject file will be created in the Folder path you had given. Set the uproject file association to UE4Editor.exe, and create a shortcut file. |
This is the default window when starting a new UE4 Project.
Only the Content Browser (Highlighted in red box) matters for this guide.
Go to Edit > Project Settings. There is an option inside which needs to be changed to enable BC7 compression format.
Scroll down to Platforms > Windows tab.
Under Targeted RHIs you will see DirectX 11 (SM5) and DirectX 10 (SM4) ticked by default.
Untick DirectX 10 (SM4) to allow BC7 compression format.
The settings are saved automatically, so close the Project Settings window once done.
Diffuse texture is an image that you see drawn on the surfaces of a 3D model.
Diffuse is also sometimes referred to as Base Color and Albedo.
If you have downloaded sample textures from Section 2 - Requirements, extract the contents.
To import textures, click on the Import button (Which opens the file browser).
UE4 Editor accepts various common image formats, and the full list can be found in UE4 official documentation. Recommended formats are PNG, TGA, and PSD due to their lossless quality.
Double click on the icon to open Texture Settings.
UE4 Editor by default imports all images with Compression > Compression Settings selected to Default (DXT1/5, BC1/3 on DX11).
If the texture contains highly detailed designs and patterns (Such as character artwork), selecting BC7 (DX11, optional A) under the same settings page can help preserve quality at the expense of increased filesize.
While BC7 offers huge improvement in image quality, the format is not 100% lossless. Extremely tiny details (For example, details under 4x4 pixels in density) will still suffer compression artifacting. |
Set Level of Detail > Texture Group to Character.
Avoid setting Texture Group to World (Default) or Vehicle. Doing so causes textures to be rendered at much lower resolution, even if the original image is saved at 4096x4096 resolution.
Alternatively, set Level of Detail > Mip Gen Settings to NoMipmaps to force the game to use maximum available texture resolution, no matter how far away the rendered object is.
If the original texture has similar colors to that of a Normal map (Lots of purple), UE4 Editor will sometimes automatically assign an imported texture’s Compression Settings as Normalmap (DXT5, BC5 on DX11) with sRGB unticked. To correct this, change Compression Settings back to either Default or BC7, and tick sRGB back on. UE4 Editor will also generate this pop-up window at the bottom-right corner of your display monitor (Which may be easy to miss). In this case, click Revert to restore the imported texture to default settings. |
Once everything is in order, click on Save at top-left to save the asset.
MREC stands for Metallic, Roughness, Emissions, and Custom data.
Each color channel in MREC texture image is used independently as image masks:
Each color channel’s values range from 0 (White color, full effect) to 255 (Black color, no effect) in determining lighting effects on that particular texture area. See the following table for summary:
Channel | Effect | White (0 = 100%) | Black (255 = 0%) | Remarks |
Red | Metallic | Full reflection | No reflection | Mirror-like reflectivity |
Green | Roughness | Matte | Glossy | Plastic-like reflectivity |
Blue | Emission | Emit light | No light | Cockpit instrument lights |
Alpha | Custom (Emission) | Emit light | No light | Formation lights |
Blue and Alpha Channels serve the same emissive function. The use of Alpha Channel depends on how the aircraft model is laid out.
If the aircraft MREC uses Alpha Channel, then the modded MREC texture must contain Alpha Channel! Missing the Alpha Channel as required is the root cause of glowing skin effect during Takeoff/Landing and Refueling sequences. |
If the imported texture contains Alpha Channel, the texture preview will initially show a largely transparent image. Go to View Settings and untick Alpha option to view the full texture.
Under Compression Settings, leave the option to Default (DXT1/5, BC1/3 on DX11).
Avoid using BC7 for MREC; doing so produces unwanted emissive effects. This occurs even with no Blue or Alpha color values present on the texture. |
Under Level of Detail > Texture Group, pick CharacterSpecular.
Under Texture > sRGB, untick the checkbox.
Once everything is in order, click on Save at top-left to save the asset.
Skip this step if you do not intend to modify normal map texture.
Normal map fakes an appearance of 3D depth on a perfectly flat surface. Ace Combat 7 uses this to add minor details (Bolts, paneling, wiring) without having to 3D model each one, thus reducing model complexity.
As described earlier near the tail end of Section 4: Importing Diffuse Texture, if UE4 Editor detects an imported image that looks like a Normal map, the image will automatically be assigned the appropriate categories.
Under Level of Detail > Texture Group, pick CharacterNormalMap.
Compression Settings should have been auto-assigned to Normalmap (DXT5, BC5 on DX11).
sRGB setting should have been automatically unticked.
Once everything is in order, click on Save at top-left to save the asset.
If you find yourself managing multiple texture assets and would like to modify several at a time instead of having to edit them one by one, Unreal Engine 4 Editor comes with Bulk Edit function.
For better organization, assets can be filtered in Content Browser prior to opening the bulk editor.
After selecting textures you wish to edit, right click on one of the highlighted textures and on the drop down menu go to: Asset Actions > Bulk Edit via Property Matrix.
Another window will open, containing texture info on the textures you have selected.
Settings page found on regular texture editor will be displayed on the right sidebar.
Selected assets will be highlighted in yellow, and changes applied using the right sidebar will be applied to every highlighted asset.
Information can be added to the asset table column by clicking on the blue pin next to the texture settings option.
Likewise, information on the asset table column can be removed by right clicking on the column and clicking Remove.
More assets can be added to the Bulk Editor by going to File > Open Asset.
Changes made in the bulk editor can be saved by going to File > Save All.
To reduce storage space requirements, Ace Combat 7 reuses MREC and Normal map across its aircraft Skins. As such, replacing one such MREC would affect every playable and NPC skins that use the same texture.
This can lead to undesirable effects, where Skins that don’t use modded Diffuse texture will still have the modded MREC applied to it.
Which Diffuse, MREC, and Normal map textures get applied to a Skin is determined by the Skin’s material file. Each aircraft Skin contains one material file that controls texture filepaths.
Modding the Skin’s material files allow the use of custom texture filepaths, and thus allow use of MREC and Normal map textures that are not reused by any other Skins.
Extract Custom Texture Filepaths listed in Section 2 - Requirements. These files will be used to reference the proper asset names and filepaths needed for the mods to load correctly.
Since the sample textures does not modify Normal map texture, navigate to the following:
Custom Filepath - MREC only \ Inst x# f15c F-15C |
Skin material files start at 00 for Skin#1, based on array index formatting:
01 for Skin#2
02 for Skin#3
...and so on.
Every playable aircraft comes with 6 Skins, plus additional skins for Downloadable Content (DLC):
00 - Osea
01 - Erusea
02 - Special
03 - Osea variant (Trigger under Mage Squadron)
04 - Osea variant (Trigger under Spare Squadron)
05 - Osea variant (Trigger under Strider Squadron)
06 and over - DLC
Material files with an alphabet letter appended (00a, 00b…) denote texture variants used by Non-Playable Character (NPC) aircraft.
Opening f15c-Filetree.txt shows how to name asset files. For this guide, sample textures will replace Skin #2.
Going back to UE4 Editor, name the asset files based on the list shown in the text file:
Unsaved assets will have an asterisk (*) in the lower-left-corner of the Content Viewer. Ensure sure that every imported asset is saved before continuing.
Either right click on the asset to save it, or click Save All button to save every unsaved asset in the project (It will show a window listing every unsaved asset prior to saving).
To cook assets into game files, open the File menu and click Cook Content for Windows.
These windows will show at the bottom-right of the monitor display:
Once the cooking completes, the files will be saved in the following directory:
Unreal Projects \ [Project Name] \ Saved \ Cooked \ WindowsNoEditor \ [Project Name] \ Content |
Where [Project Name] is the project name you have given at Section 3: Starting Unreal Engine 4 Editor:
The folder contains three files per asset:
If the texture is saved with NoMipmaps under Mip Gen Settings, then the asset will only generate the following:
DO NOT rename cooked assets. Rename the assets in UE4 Editor and re-cook them instead.
DO NOT use assets in Unreal Projects \ [Project Name] \ Content. They are internal files for UE4 Editor, and cannot be used to generate mods.
|
Extract UnrealPak included in Section 2 - Requirements.
Ace Combat 7 uses Nimbus as its root directory (The starting folder).
For sample F-15C textures that replace Skin #2, place these items:
Into the following directory:
[ModName] \ Nimbus \ Content \ Vehicles \ Aircraft \ f15c \ 01 |
Where [ModName] is the name unrealpak will use when generating a pak file. Set [ModName] to whatever name you prefer; the resulting pak file can be renamed as well.
Once the cooked asset files are in place, drag and drop [ModName] folder to UnrealPak-Without-Compression.bat.
UnrealPak also comes with UnrealPak-With-Compression.bat, which provides compression in addition to packaging, reducing overall pak filesize.
|
A command line window will open upon execution. Once completed, [ModName].pak will appear in the same folder.
Add “_P” at the end of the mod's filename, so that it becomes [ModName]_P.pak. The suffix allows the mod to load if the assets are replacing DLC content.
Return to Ace Combat 7 filepath containing its pak files, and create ~mods folder inside so the filepath reads as follows:
C:\Program Files (x86)\Steam\steamapps\common\ACE COMBAT 7\Game\Content\Paks\~mods |
Move [ModName]_P.pak inside ~mods folder.
Launch Ace Combat 7.
If everything went correctly, F-15C’s Skin #2 will load the modded Diffuse and MREC textures.
Congratulations, the new texture is now ready for release!
Here are some common texture modding issues and where to start looking:
[UE4 Editor] Cooking fails. This may occur if the UE4 Editor is located inside Program Files. Either run UE4 Editor as administrator or move the editor package in another directory that does not require admin privileges to access. |
[In-Game] New textures don’t load at all \ New textures load on the wrong skin slot. This is almost always as a result of incorrect filepath during mod packing. Double check that the filepath matches the one used by the game, and replaces assets already in the game.
Alternatively, check that mod pak files are placed in: ACE COMBAT 7\Game\Content\Paks\~mods and not: ACE COMBAT 7\Game\Content\Paks or lower. Mods placed directly in the Paks folder can be overwritten back by original game pak files. Mods can also overwrite each other if they both replace the same aircraft skin. |
[In-Game] Ace Combat 7 crashes or freezes when trying to load new textures. This is most likely caused by a mismatch between uasset and uexp files. Make sure that both files come from the same UE4 asset, and are not renamed at any point. For example, avoid using uasset generated in UE4 Editor and uexp from the base game together when packing the mod. |
[In-Game] New texture appears blurry/very low quality in Ace Combat 7. It’s possible that UE4 Texture Settings set Compression Quality to Lowest. Expand the advanced tab and check the compression settings. In UE4 Editor texture editor, go to Compression and check the following options:
Recook and repack the new assets. Alternatively, check that Texture Group is not set to Vehicle or World, which causes the game to drastically lower the texture resolution. Alternatively, use this Steam Community guide to force the game to utilize all MIP levels in a texture. The relevant line is r.Streaming.UseAllMips=1 |
[In-Game] The aircraft is extremely glossy when viewed from certain angles. This is caused by sRGB being left active when saving MREC texture. Open the MREC texture and make sure sRGB is unticked. sRGB is enabled by default on import and must be manually unticked. |
[In-Game] The aircraft has patches of glowing blue pixels in Takeoff / Landing and Refueling scenes. This is caused by MREC being saved as BC7 compression format. Open the MREC texture. Under Compression Settings, set the option back to Default (DXT1/5, BC1/3 on DX11). |
[In-Game] The entire aircraft glows in Takeoff / Landing and Refueling scenes. This is caused by the MREC texture missing its Alpha Channel. Remember that if the original MREC contains Alpha Channel, then the new texture must have one as well! Humorously, the developers made the same error when releasing F/A-18F -Red Devils- skin, as its MREC texture also omitted the required Alpha Channel. The issue has since been corrected. |
Ace Combat 7 loads content starting in ACE COMBAT 7\Game\Content\Paks.
However, filenames can be changed to affect the load order.
The tilde “~” prefix on mods folder name tells the game to load content in following order:
The game also loads pak files in alphabetical order:
If there are multiple pak files that load the same asset, the last pak file to be loaded will be in the game, overwriting the previous iteration.
There can be as many subfolders as desired, allowing for thorough mod organization.
Ace Combat 7’s aircraft textures have been extracted and uploaded on multiple sources:
A community-led repository containing texture templates for easy modding can be found on ModDB and Nexus.
Gildor’s umodel allows file exploration of virtually any game that uses Unreal Engine, including Ace Combat 7.
Simply link the game directory in Path to game files, click OK, and enter https://ace7.acecombat.jp/special/ when prompted for AES Encryption Key.
Although umodel has functions to read and export game content, Ace Combat 7 obfuscates its uasset and uexp files, rendering the files unreadable for umodel.
Information stored in cooked assets can still be opened and edited using a hex editor, allowing changes to material properties in other games.
Sample texture uasset file opened using hex editor. Note the presence of asset type (Texture2D) and compression settings (PF_BC7). | Ace Combat 7’s uasset file opened using hex editor. Besides ACE7 header at the start, the remaining information is unreadable. |
File obfuscation also prevents crucial model animation and material data from being exported, presenting a major barrier against modding aircraft and animations in Ace Combat 7.
Fortunately, original textures are contained in ubulk files, which have been left untouched. Ubulk files are simply texture images without header information, and can easily be edited into readable formats.
@SuperOstrich has provided a guide on extracting Ace Combat 7 textures using umodel and hex editor.
Alternatively, @lotsbiss has uploaded a Texture Tool that can read any ubulk textures, automatically apply the correct DDS format, and export it in the desired location.
Ace Combat 7 features cutscenes that often produce close-up shots of the aircraft’s vertical fin, focusing on its tail design.
You may have noticed that on some aircrafts that have emblems drawn directly on the aircraft texture (Instead of a separate texture applied through emblem customization), the design appears jagged when viewed up close.
F-15C Pixy’s texture | F-22A Mobius 1’s texture | Su-30SM Mihaly’s texture |
Opening game textures and zooming in on certain areas will reveal the same blocky effects. They are more pronounced on emblems where contrasting colors and complex details are drawn within a small image space.
This is caused by DXT compression, which helps maintain memory and space efficiency at the expense of some quality loss.
DXT1 (Diffuse) and DXT5 (MREC) both feature similar levels of quality loss as a result of its compression format.
Nathan Reed’s article presents a comprehensive explanation of compression formats.
In summary, DXT divides the overall image into 4x4 pixel blocks with a max of 4 colors per block.
The 4x4 pixel blocks can contain up to 16 unique colors. Those 16 colors are then reduced to 4 colors or less during compression.
The 4 colors must conform to a linear color gradient. DXT compression will try to interpolate the original 16 colors to produce the most ideal gradient.
The original 16-color palette is condensed into a linear 4-color palette after DXT compression. As demonstrated, larger color variety will often result in less consistent results. |
A block containing 16 colors with identical hue/saturations will retain its original appearance more closely than 16 colors with multiple contrasting hue/saturations.
For example, take these three 4x4 pixel blocks. First two blocks both contain 16 unique colors. Third block contains only 4 unique colors.
The same three 4x4 pixel blocks after DXT compression:
Here is another example with three 4x4 pixel blocks. This time, all three blocks contain only 4 unique colors. The second block is identical to the first block, except for a single shade of light green.
The same three 4x4 pixel blocks after DXT compression:
DXT-compressed textures will not lose further quality from subsequent DXT compressions.
|
Original layout | Thicker outline | Greyscaled |
There are some ways to reduce the amount of artifacting:
However, both options can clash with original design choices. In addition, focusing too much on artifacting can consume unnecessary development resources, when the quality loss often goes unnoticed to players in a fast-paced gameplay environment.
Despite its lossy nature, DXT1/5 compression formats are still widely used in the game industry for its efficient memory usage, whose benefits often outweigh the cost in image quality.
BC7 is a recently-introduced texture compression format, which has not yet received DXT-equivalent designation (Where DXT1 = BC1, DXT5 (MREC) = BC3, and DXT5 (Normal) = BC5).
DXT1 Compression | BC7 Compression |
Pros:
Cons:
Example of a particularly severe side effect of saving MREC as BC7. The MREC is sourced from Su-57 Skin#3 with no visual changes made to texture itself. |
Nonetheless, BC7 offers an excellent solution for modders seeking to preserve their more complex texture designs, whether it be intricate patterns or detailed artwork images.
DXT1 Compression | BC7 Compression |
Image artifacting for Greyscaled / Low-Visibility designs are much less visible compared to color versions. |
Optimization is still an important part of game development, and should be considered in the modding aspect as well. If your texture design looks good after lossy compression, then DXT formats can help minimize package filesize—which in turn reduce storage costs.
The white outline in the above image occurs when there is a hard edge between Metallic and Roughness values in MREC texture.
The artifacting is an inherent characteristic of Metallic-Roughness workflow required by Unreal Engine 4. There is no way to completely eliminate the white outline through textures alone.
Diffuse and MREC Texture | Rendered Output |
Design outline applied to MREC texture only. The hard shift in metallic values produces white outline in the rendered image. Hard shift in roughness values also produces similar white outline. |
Diffuse and MREC Texture | Rendered Output |
Design outline applied to both Diffuse and MREC textures. The white outline is more pronounced due to Diffuse texture amplifying the effect. |
Diffuse and MREC Texture | Rendered Output |
Design outline on MREC texture is 1 pixel thicker than the one applied to Diffuse. While the white outline is still visible, this method offers one way to reduce the effect. |
If you intend to introduce custom emissive patterns using MREC texture’s Alpha Channel, then this information may be useful to know.
MREC - RGB Channels | MREC - Alpha Channel | UE4 DXT5 Output |
Unreal Engine 4 Editor has an active bug where designs overlapping each other in Alpha and RGB channels suffer from very poor DXT artifacting. This bug still applies to the current version (4.26).
UE4 DXT5 Output | GIMP/Photoshop DXT5 Output |
A workaround exists using SuperOstrich’s texture replacement guide via python script:
Newer versions of GIMP come with the DDS plugin pre-installed. Use the same export options shown in the guide (Compression > DXT5, Mipmaps > Generate Mipmaps)—the remaining options can be left at default.
I’d like to give thanks to @VDINST_Rythus on Twitter for his initial research towards Ace Combat 7 modding, and Xentax forums for discovering the .pak decryption key that enabled texture extraction.
Thanks to FluffyQuack for the UnrealPak tools.
And to the Ace Community community, for their continued support, discourse, and encouragement.
And to Project Aces and Kazutoki Kono, for delivering the finest Ace Combat experience yet.
3.0c (2022/02/15)
3.0b (2021/08/04)
3.0 (2021/03/28)
2.0 (2020/03/21)
1.0f (2020/03/04)
1.0e (2020/02/09)
1.0d (2019/11/25)
1.0c (2019/10/03)
1.0b (2019/09/09)
1.0 (2019/08/10)