Ace Combat 7: Skies Unknown
Material Instance Usage Guide
Version 1.0b, last updated Feb. 15, 2022
By @Dantofu
This document is best read with View > Print layout disabled.
4. What are Material Instances?
5. Importing Assets into UE4 Project
6a. Parameter Groups - Emissive_Alpha & Emissive_Blue
7a. Copying existing Material Instance
7b. Creating new Material Instance
8. Using NPC Material Instances
ii. Weapons and Ground Vehicles
This guide assumes that you are already familiar with Texture Replacement Guide using Unreal Engine 4, with the knowledge of:
The purpose of this guide is to show how to use the provided Material Instance assets to introduce custom texture filepaths in Ace Combat 7: Skies Unknown.
For Player skins, only one UE4 asset will be modified: One in each aircraft skin folder whose filename ends in _Inst (Such as f16c_01_Inst)
For NPC skins, two assets need to be modified per skin folder: _Inst and _Dam_Inst (Such as f16c_01a_Dam_Inst)
To summarize:
Player skin : Modify _Inst only
NPC skin : Modify both _Inst and _Dam_Inst
Filesize comparison between Conventional (Texture assignments + files in each slot) and Proposed (Texture assignments only in each slot). Proposed arrangement allows minimal package size regardless of skin slot numbers. |
Pros:
Cons:
In addition, this guide will also cover how to customize glow effects (To a limited degree) on aircrafts.
Everything needed to create mod for Ace Combat 7:
Project Asset Files - Contains the necessary UE4 Editor assets to get started:
Gildor’s umodel - Allows file exploration of virtually any game that uses Unreal Engine, including Ace Combat 7. Highly useful for knowing where to place the files.
In 3D art, texture and material are two distinct terms:
3D models traditionally require creation of at least one material before textures can be applied.
In Ace Combat 7, three textures are used as basis for aircraft material:
Out of the three, MREC texture plays the biggest effect on material out of the three textures.
Standing for Metallic, Roughness, Emission, and Custom data, MREC texture is processed by aircraft material to determine how shiny an aircraft surface appears, and which parts light up during takeoff/landing/refueling minigames.
A simplified material setup for an aircraft model (Using FB-22 as example) in Ace Combat 7. |
In Unreal Engine 4, material instances are derivatives of an existing material file.
Material Instance (Child asset) passes parameters to Main Material (Parent asset), such as introducing new textures and shader properties.
This allows a huge variety of material effects to be created while compiling only the Main Materials. A handful of Main Materials can easily produce hundreds of Material Instances, each with different settings.
Material Instances can also be created from an existing Material Instance, creating a chain of Material Instances that ultimately get processed by a single Main Material. Refer to official Unreal Engine 4 Documentation page for full details.
An example Material tree setup using a chain of Material Instances. Arrow indicates the material’s immediate parent asset. |
In Ace Combat 7, all models use Material Instance assets to load Diffuse, MREC, and Normal Map textures.
In the context of this guide, Material Instance’s primary purpose is to provide texture filepath data to the game.
Open Unreal Engine 4 Editor and start a new project.
Navigate to your project folder:
Unreal Projects \ [Project Name] \ Content |
Where [Project Name] is the name given to your project.
Extract and place the Materials and Vehicles folders in Project Asset Files into the Content folder.
If you have Unreal Engine 4 Editor already open, then the Content Browser should automatically update with the new assets.
If not, then close and reopen UE4 Editor. Unfortunately, there does not appear to be an option to directly refresh Content Browser items.
The texture assets may have broken previews due to source files no longer being present. In this case, simply reconnect the textures to images provided in [Project Asset Files]. |
If you are starting a new project, be sure to check that DirectX 11 (SM5) is enabled in Project Settings to allow BC7 texture compression.
You may have to restart UE4 Editor more than once to see the BC7 texture compression option.
DO NOT edit anything in the Materials folder. It contains dummy assets with parameter names that Ace Combat 7 uses to process material effects. Modifying its contents may cause the effects to cease functioning. |
Project Asset Files contains Material Instance assets already set up for A-10C Thunderbolt II (Named internally as a10a):
a10a_00_Inst and a10a_01a_Inst are Material Instances used for aircraft models. The assets contain parameters that control aircraft textures and emissive effects.
Opening one of the Material Instance assets will open a new window:
The area highlighted in red is where most of the editing takes place. However, there is nothing visible at first.
On the Toolbar tab, click on the Params tab. You will have to do this every time a Material Instance asset is opened.
Now all parameters that can be edited will display on what was originally an empty space.
The parameter list is divided into five groups: Emissive_Alpha, Emissive_Blue, Textures, ~Arsenal Bird, and ~Misc.
Changing settings in this group DOES NOT allow player aircraft to keep its lights active outside of minigames. The game will ignore the modified parameter values.
The only exceptions as of Oct. 9, 2021 are X-02S Skin #8 and the upcoming ADFX-01 Skin #9, which have emissives active at all times by design.
|
Emissive_Alpha contains parameters that use MREC’s alpha color channel to control lighting effects:
Parameter Name | Default Value | Description |
Enable_Formation_Emissive | 0 | Controls formation emissive activation. |
Formation_Emissive_Brightness | 10 | Controls formation emissive brightness. |
Formation_Emissive_Color | 0 | 0.9 | 1 | 1 | Controls formation emissive color. |
If the aircraft’s original MREC texture does not contain an alpha channel, the settings in this group will have no effect, even if the modified MREC texture contains the alpha channel.
However, setting both Enable_Formation_Emissive and Formation_Emissive_Brightness to 0 is still recommended as a fail-safe, if their effects will not be used. This can help prevent possible mod conflicts that may be difficult to track down. |
Emissive_Blue contains parameters that use MREC’s blue color channel to control lighting effects:
Parameter Name | Default Value | Description |
Enable_Emissive | 0 | Controls emissive activation. |
Emissive_Brightness | 20 | Controls emissive brightness. |
Emissive_Color | 1 | 1 | 1 | 1 | Controls emissive color. |
Emissive_Contrast | 1 | Strengthens difference between lit and unlit areas (Brightness value multiplied by Contrast value) |
The emissive colors will blend with color in Diffuse texture (Red emissive + blue texture = purple light). The color mixing becomes less present at higher Brightness outputs.
Changes made to Emissive_Blue settings (Including color) also affects lights produced by the aircraft’s landing gear. |
Below is a series of Brightness and Contrast settings on MQ-101 with modified MREC textures: Note how (3) has similar brightness as (1) despite a much lower Brightness value. Generally, Brightness is multiplied by Contrast (4 x 5 = 20 Brightness output). The darker areas (Panel lines) are also much more pronounced in (3). Emissive output varies based on map lighting, so be sure to experiment across multiple maps to find the ideal values. The object’s common distance from the Player camera should also be considered, as emissive effects seen up close may look as good as when viewed from far away. |
Take caution against setting brightness and contrast values too high (Brightness + Contrast combined output of 100 or greater). Image brightness reduced to prevent eye strain. It’s really bright! Extremely bright lights can heavily flicker against dark backgrounds and may present risk to users sensitive to photosensitive epilepsy. |
Texture contains filepath for aircraft textures.
For now, dummy texture assets have been used to fill the parameters.
The dummy textures use the same filepath that Ace Combat 7 uses (Vehicle \ Aircraft \ a10a \ 00), so the game can load the textures that already exist in default installation.
This method is useful for packaging texture mods that do not modify all three texture types, most commonly Normal Map texture.
Be sure to leave the dummy files out of actual mod packages to avoid textures breaking like the picture above! This can occur surprisingly easily. |
Using Material Instance, you can assign new texture filepaths placed at any location using any names.
In this example, new Diffuse and MREC textures have been created at Custom Content \ Custom_Texture, along with different texture asset names.
Open a10a_00_Inst again. In the Texture group, hover to the parameter text box. Doing so also reveals the texture asset’s current filepath.
Clicking on the text box opens a drop down menu, listing all the texture assets available.
In the search box, type in the name of the newly-created asset. The browser will automatically update the list containing the entered text.
Click on the matching entry. Albedo_map parameter will be updated with a new texture path.
Repeat the process with MREC_map parameter.
Alternatively, you can also drag & drop the texture asset from the Content Browser window into the parameter box to achieve the same task. |
Leave the Normal_Map input to its default value, since the normal map texture will not be modified in this scenario.
Once everything is in order, click on Save at top-left of the Toolbar to save the changes. Ctrl+S will also save the changes.
When packaging the mod, the folder structure for the example assets above will be as follows:
Diffuse | [ModName] \ Nimbus \ Content \ Custom_Content \ Custom_Texture |
MREC | [ModName] \ Nimbus \ Content \ Custom_Content \ Custom_Texture |
Normal Map | Not packaged. The path points to the asset that already exists in Ace Combat 7. |
Where [ModName] is the .pak filename that will be generated.
~Arsenal Bird contains parameters used exclusively on Arsenal Bird. The parameters affect Arsenal Bird’s tiled textures only, and appear to have no effect when applied elsewhere.
~Misc contains parameters that can be edited but they appear to have no effect in-game.
The settings are present only because its Parent Material has an input. The groups can be ignored.
The Material Instance assets must use the same filepath used by Ace Combat 7, as they must replace existing assets in default installation. For example, a10a_00_Inst must always be placed in the following filepath: Vehicles \ Aircraft \ a10a \ 00. |
Material Instances can be created using two methods:
After using either approach, all that remains is updating the parameters (Textures, emissive colors).
The guide will be using edited A-10C Diffuse and MREC textures provided in Project Asset Files. Its MREC texture has been modified to demonstrate new emissive effects The top and bottom images should be the results of Steps 7a and 7b, respectively. |
Import new textures for your mod, and place the new assets in the location of your choosing.
Here, the sample textures have been placed at Custom_Content \ Custom_Texture generated in the previous section.
Assign appropriate settings for Diffuse, MREC, and Normal Map textures. Below table is a summary of relevant settings for each texture type used in Ace Combat 7:
Options | Diffuse | MREC | Normal Map |
Compression Settings | Default or BC7 | Default | Normalmap |
Texture Group | Character | CharacterSpecular | CharacterNormalMap |
sRGB | True | False | False |
Once everything is in place, Save to apply the changes.
This section will generate new Material Instance asset that will be replacing one for A-10C’s Skin #4 (Mage).
Create a new folder called 03 in Vehicles \ Aircraft \ a10a.
Locate a10a_00_Inst in Vehicles \ Aircraft \ a10a \ 00. Drag & drop a10a_00_Inst asset into 03 folder.
A drop down menu will open asking whether you want to copy or move the asset.
Click on Copy Here to generate a copy of a10a_00_Inst to 03 folder.
Alternatively, Copy & Paste will accomplish the same task. Simply use the standard hotkeys (Ctrl+C to Copy, Ctrl+V to Paste) to copy the Material Instance to a new location. Likewise, Ctrl+Shift+N also creates a new Folder. |
A copy of a10a_00_Inst will be created in 03 folder. The copy will also retain all the edited parameter properties of a10a_00_Inst.
Rename the copied Material Instance to one matching the original file in 03 folder: a10a_03_Inst.
Double click on a10a_03_Inst to open its Material Editor.
Update the inputs in each Texture Parameter:
Feel free to edit Emissive settings as well. In this case:
Remember that Enable_Formation_Emissive and Enable_Emissive settings currently have no effect on Player Aircraft.
Once everything is in place, Save to apply the changes.
This section will generate new Material Instance asset that will be replacing one for A-10C’s Skin #5 (Spare).
Create a new folder called 04 in Vehicles \ Aircraft \ a10a.
Right click in the empty space, and add a new asset under Materials & Textures > Material Instance.
DO NOT use Material, Material Function, or Material Parameter Collection when creating a new asset. They are all completely different asset types from Material Instance, and may cause Ace Combat 7 to crash due to asset mismatch. |
Name the newly-created Material Instance asset a10a_04_Inst.
Double click a10a_04_Inst.
Since this is a freshly-created Material Instance with no Parent Material linked to it, there is nothing to edit, even with Parameters enabled.
Under General > Parent item, link aircraft_Inst to the parameter (Either using Browse or Drag & Drop). This will assign aircraft_Inst as a10a_04_Inst’s Parent Material.
The usual parameter groups should return once aircraft_Inst is linked as a Parent Material.
Update the inputs in each Texture Parameter:
Don’t forget to update the Normal_Map parameter when generating new Material Instance assets for a different aircraft! |
Feel free to edit Emissive settings as well. In this case:
Once everything is in place, Save to apply the changes.
As stated in Section 1. Preface, NPCs require both _Inst and _Dam_Inst to be modified to avoid their textures switching back to default when they are destroyed.
However, this section (usually) does not apply for NPC-exclusive aircraft unavailable to Players:
Even if they contain multiple skins, they commonly share only the Normal Map. Unless you intend to modify Normal Map texture and/or Emissive effects, _Inst and _Dam_Inst do not have to be modified. Simply replacing Diffuse and MREC textures will work. |
Locate and open a10a_01a_Inst in Vehicles \ Aircraft \ a10a \ 01a.
Update the inputs in each Texture Parameter:
Set both Enable_Formation_Emissive and Enable_Emissive to 1. The Emissive colors have been left to their default values.
Once everything is in place, Save to apply the changes.
Next, locate and open a10a_01a_Dam_Inst in Vehicles \ Aircraft \ a10a \ 01a.
_Dam_Inst files have only one relevant Parameter Group - Textures, containing the same three texture parameters used by _Inst in the same order: Diffuse, MREC, and Normal Map.
The items in ~Misc contain shared textures used to render damage effects over the object’s texture. It is recommended to leave them alone.
There are no Emissive parameters for _Dam_Inst. Its Parent Material aircraft_Dam_Inst is processed by a different Main Material, which does not support light emission.
You can still assign aircraft_Inst for _Dam_Inst’s Parent Material. Doing so will remove the damage effects rendering, but allow the destroyed aircraft model to emit light. It is up to you to determine whether your mod implementation is worth the trade-off. Alternatively, you can manually bake damage details into a set of copied textures and assign the new textures to _Dam_Inst material only, while leaving the clean textures on _Inst. |
Again, assign the appropriate textures for Albedo_map, MREC_map, and Normal_Map.
Once everything is in place, Save to apply the changes.
Ensure that all assets in UE4 Editor are saved. If there are any unsaved assets, clicking on Save All in Content Browser will open a confirmation box.
If nothing happens after clicking on Save All, then all assets are up to date.
Cook the assets (UE4 Editor Toolbar > File > Cook Content for Windows).
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 5: Importing Assets into UE4 Project.
Ideally, you’d want to package Textures and Material Instance assets as separate mods:
[Textures]_P.pak | Contains texture assets only |
[Skin #1]_P.pak | Contains modified Material Instance files for 00 folder only |
[Skin #2]_P.pak | Contains modified Material Instance files for 01 folder only |
[Skin #3]_P.pak | Contains modified Material Instance files for 02 folder only |
...and so on | until reaching the end of skin numbers for the particular aircraft. |
The Skin mods tell Ace Combat 7 to load textures contained in the Textures mod.
Therefore, [Textures]_P.pak must always be loaded together with any of the [Skin #]_P.pak.
The “_P” suffix is required because almost all Material Instance assets used by Ace Combat 7 are considered DLC assets due to updates. Having the suffix additionally serves as a fail-safe.
If [Textures]_P.pak is not loaded while using [Skin #]_P.pak, then the aircraft will render a series of broken textures as seen in the picture above. This is because [Skin #]_P.pak is telling Ace Combat 7 to load textures that do not exist. |
The benefit of this package arrangement is that the bulk of filesize (Texture images) are contained in a single mod, allowing modders to easily introduce Texture changes without having to update every Skin option.
If you are using A-10C Sample Textures, then package its assets in similar layout:
[Textures]_P.pak | Contains a10a_SampleTexture_Diffuse, a10a_SampleTexture_MREC |
[Skin #4]_P.pak | Contains a10a_03_Inst |
[Skin #5]_P.pak | Contains a10a_04_Inst |
[NPC #1]_P.pak | Contains a10a_01a_Inst, a10a_01a_Dam_Inst |
...and so on until all Skin options are covered.
Don’t forget to retain the folder structure when packaging the mod:
Texture Assets | Nimbus \ Content \ Custom_Content \ Custom_Texture |
Material Assets | Nimbus \ Content \ Vehicles \ Aircraft \ a10a \ [Skin folder] |
...along with additional requirements from the mod packaging tool. For Unrealpak, you will also need an additional folder in front of Nimbus folder, which will be used as .pak filename.
If everything went correctly, A-10C’s Skin #4, 5, and regular enemy NPC will load the modded Diffuse and MREC textures. A-10C’s Skin #1 and 6 should retain their default textures.
In addition, each skin will have a different emissive effect.
Congratulations, the new mod is now ready for release!
If you intend to modify textures for F-16C and MiG-31B’s Skin #6 (Strider), there is one extra step needed during packaging:
The Decal_Inst assets found in Project Asset Files should be placed in the same folder as the Material Instance files.
They’re generally used to control emblem placements used in the Emblem Customization menu, with their immediate Parent Materials being f16c_05_Inst and m31b_05_Inst, respectively.
However, the base game assets unintentionally left extra settings in the two files:
The replacement assets provided remove the extra settings, allowing the modified textures to work as intended.
[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 or loads in wrong Skin / Default textures are still used. Check that there is “_P” suffix at .pak filename. Almost all of Material Instance files are considered DLC content due to updates, and the suffix is essentially a requirement. Otherwise, check if filepath was correctly applied during mod packing. Check that the filepath matches the one used by the game, and the mod replaces Material Instance assets already in the game.
Check that mod pak files are placed in or past: ACE COMBAT 7\Game\Content\Paks\~mods and not: ACE COMBAT 7\Game\Content\Paks and before. Mods placed directly in the Paks folder can be overwritten back by original game pak files. |
[In-Game] Ace Combat 7 crashes or freezes when loading Material mods. Check that the Material type is Material Instance. Using any other Material types can cause crashes due to asset mismatch. Unfortunately, crashes due to modded Materials can be difficult to diagnosed based on how said Material was modded:
Ensure that modded Materials have the correct Parent Material:
|
[UE4 Editor] The editor keeps launching SteamVR on startup. Open folder containing UE4 Editor directory, and then navigate to the following:
Open SteamVR.uplugin with notepad, and find the following line:
Change the boolean from true to false, and save the uplugin. There is an in-engine setting that controls this. Unfortunately, the setting does nothing whether it’s enabled or not and will auto-launch SteamVR regardless. |
Arsenal Bird primarily uses two Material Instances to render textures for the model:
Material Name | Textures used |
aias_Blend_Inst | p_aias_unique_body, Aircraft_Dam_Detail, p_aias_tiled_body |
aias_Tiled_Inst | p_aias_tiled_body |
aias_Blend_Inst is processed by Main Material that does not support Emissive effects. As such, Arsenal Bird’s main body is unable to emit light.
Attempting to assign a different Parent Material to aias_Blend_Inst crashes the game. |
aias_Tiled_Inst’s Parent Material is aircraft_Inst, so it is still possible to introduce Emissive effects that affect those parts of the model.
In fact, the aias_Tiled_Inst already has Emissives enabled, which is used to render a series of glowing rings under the exposed Rectenna base in Mission 19.
All Weapon and Vehicle models come with only one set of textures. Therefore, it is not necessary to give them custom filepaths.
Although Weapons and Ground Vehicles models use different Parent Materials (weapons_Inst and ground_Inst, respectively), they are processed by the same Main Material as aircraft_Inst.
Therefore, their Emissive parameters remain the same.
For Ground Vehicles, leave the Normal Map parameter unedited (DefaultNormal), since many do not come with normal map textures.
Like with Weapons and Ground Vehicles, Vessels also come with only one set of textures.
Vessel’s Parent Material is vessels_Inst, and is also processed by the same Main Material as aircraft_Inst.
Some vessel Diffuse textures are saved as DXT5 instead of DXT1 (Such as Aegis). The Alpha Channel is commonly used to render transparencies on handrails. Be sure to check the format to avoid rendering issues!
Some vessels do not come with normal map textures. In this case, leave the Normal Map parameter unedited (DefaultNormal).
Attempting to modify vessel _Dam_Inst assets causes the game to crash. |
Alicorn primarily uses two Material Instances to render textures for the model: alcn_a_Inst and alcn_b_Inst.
Alicorn also has Material Instances used exclusively for DLC Mission 1: EX01_alcn_a_Inst and EX01_alcn_b_Inst. The only changes are different MREC textures (Both also starting with ex01) with cleaner appearance.
Although Emissive parameters work on Alicorn, it is still disabled in some cutscenes, mainly ones in DLC Mission 3 where Alicorn’s main railcannon is animated. |
After months of research and writing, another guide has finally come to stage fit for public release. I’ve launched Ace Combat 7 hundreds of times at this point just to test and verify concepts, and I’m really starting to miss the super-fast UI Assault Horizon had.
I wanted to simplify the process as much as possible, but striking a good balance between readability and details proved to be much more difficult compared to the texture replacement process, given how many ways Material modding can go wrong.
Unfortunately, Material Instance Usage Manual will most likely be my final contribution. I will continue to maintain and update my existing content as needed, but I strongly wish to move on from Ace Combat 7 modding.
There’s so much more I wanted to share, but life leaves little to do everything—and I also have prospects that I would like to prioritize.
I would like to extend my thanks to the Ace Community community, for their continued support, discourse, and encouragement.
And to Project Aces and Kazutoki Kono, continuing to deliver Ace Combat experience through both clear and rough skies.
1.0 (2021-10-17)