T8 ‐ Material Emulation Workflow (Draft) - CDDTreborn/Tekken-8-Resources GitHub Wiki

Introduction

In normal UE development you can make your own materials and they will work as well as you create them. In modding, we are governed by the way the developers made the materials and can then make alterations based on the initial structure. This can be very confusing if you have never modded or only done your own developments. This guide is focused on Tekken 8 modding but may be useful when working with other materials.

Basic Info

I can try and explain how materials work but it's much easier to go to the source: https://docs.unrealengine.com/5.2/en-US/unreal-engine-materials/

Dirty MI

Now that you know a bit more about how UE handles materials we can look at how to use that info when modding.

With UE we can rely a lot on references and UE's assumptions. So if we look at a MI that has a texture parameter. That is simply telling UE/T8 to go to the path referenced in the MI and load the texture then apply whatever changes or calculations are set in the MI parameters. UE pulls that path information based on where it is placed in the folder structure.

Let's say in-game there is a texture called T_CoolestTextureEva_C and it's located at Content > Universal > Shared > uni. In our editor we need to create that same folder path and place a texture asset called T_CoolestTextureEva_C. The in-game picture can be a giraffe and our editor picture can be just a black square. When we load the game with our MI and the reference it will load T_CoolestTextureEva_C and it will be a giraffe.

BAD: Content > Universal > Shared > uni > T_CoolesttTextureEva_C

BAD: Content > Universal > Shared > T_CoolestTextureEva_C

GOOD: Content > Universal > Shared > uni > T_CoolestTextureEva_C

Another thing we can use as modders is the fact that UE assumes the parent material is properly set up and verifies it at runtime by working or not.

Here is an example Material from the UE docs called M_WalnutFloor image

There is only one parameter available called "Roughness" and we have no clue how to set the material up or have access to the textures. What we can do is create a dummy material which is just a material with the same name as M_WalnutFloor and place it where it belongs in the file structure in editor. We can then open it up and add a "Roughness" parameter and plug it in. You can plug it into any slot even if its greyed out lol. It will look like this: image

We then make a MI from this dummy version and we can make it more or less rough. UE will look at the parent, grab all that info, then look at the MI and see what parameters have been changed, then load without issue. When we put this MI into our mod we must be sure to NOT INCLUDE the dummy M_Waln