In deze gids, we will be showing you how to modify the existing HumanitZ materials for us to reskin and improve the graphics. We’ll also cover how to mess around with textures because, let’s face it, they’re pretty important when it comes to materials in gaming.
Aan de slag
If you’re not sure what game development lingo like “materials” means, maak je geen zorgen! In eenvoudige bewoordingen, materials are what make objects look the way they do in a game. They’re like the paint or texture that covers everything you see in 3D.
Nu, let’s talk about tweaking something called the “white box truck” in deze gids. Why this truck? Goed, it’s conveniently available right at the start of the tutorial level, making it perfect for experimenting. Here’s how the truck looks in its original form, which we’ll call the “Vanilla” versie:
And now, drumroll, Alsjeblieft! After we work our magic, here’s what that white box truck will transform into:
Setting Up Your Mod
If this is your inaugural venture into modding an Unreal Engine game, or HumanitZ specifically, I highly recommend consulting my Modding Guide.
Daar, you’ll discover all the essential information to set up your modding workspace. Once you’ve got that squared away, feel free to hop back here!
To keep things streamlined, we’ll assume you’ve already tackled that step. Laten we erin duiken!
Vereisten
To begin crafting a mod that alters the game’s materials, you’ll require the following:
- Your mod environment, as highlighted previously.
- The .uasset files of your materials.
Creating Your Material
Let me tell ye ‘bout the marvels o’ sailin’ with the Unreal Engine.
Arr, ye see, despite all the years it’s been at sea, Unreal Engine be havin’ a curious quirk—aye, it can’t even import its own treasure maps! Aye, ye heard that right!
Since Unreal be unable to decipher the charts we’ve plundered from the game, all that be left fer us to do be to craft the maps by hand.
‘Tis why it be crucial to stick to the treasure chest’s layout, for we be only tweakin’ the contents.
Zoals ik eerder al zei, we be settin’ sail with the white box truck in this tale. There be no special codes or hidden treasures in the game as o’ nog.
We need a swift and sure way to spy if our changes be takin’ uitstel, and ye can spy this truck in a jiffy, soon as ye start a new voyage and choose the tutorial! Shiver me timbers!
Nu, to keep this guide from becomin’ a monstrous sea monster o’ text, we’ll just be tinkering with one treasure map, for demonstration. But fear not, ye can handle as many as yer heart desires, as ye’ll soon discover.
To begin crafting your content, start by exploring its folder organization. In deze tutorial, we’re focusing on the file named M_BoxTruck_Body.uasset. You can locate this file precisely at:
TSSGame\Content\VehicleVarietyPack\Materials\BoxTruck\M_BoxTruck_Body.uasset
It’s crucial to note that if the file structure doesn’t match, your mod won’t function correctly. Remember the project name “TSSGame”? Your modified material needs to follow the same naming convention: M_BoxTruck_Body.uasset. Ook, ensure it resides in the following path:
TSSGame\Content\VehicleVarietyPack\Materials\BoxTruck\M_BoxTruck_Body.uasset
Here’s a screenshot demonstrating the material I’ve created within the Unreal Engine project, located in the correct directory path:
Your material won’t resemble this from the get-go!
Creating your Texture
If you want your material to have a texture, simply follow the steps I mentioned earlier for the material.
Bijvoorbeeld, the texture for the material mentioned above is named TX_Truck_Box_Diffuse.uasset, and you can find it at the following path:
TSSGame\Content\VehicleVarietyPack\Textures\BoxTruck\TX_Truck_Box_Diffuse.uasset
Gelukkig, when you unpack files using UModel, textures are unpacked perfectly, maintaining their original image state!
This means you don’t actually need to create your texture; just copy it to the exact directory path where it should be located within your Unreal Engine project.
If you’re creating a texture, from what I know, they are all of the extension type Targa, or .tga.
Setting up the Material
Akkoord, so we’ve created the material and imported the texture. They’re both in the exact directory they come from in the original game files.
So what’s next? Double click the material, and you’ll find a cool window that will let you edit everything in a more visual manner. Like so!
That’s great… But it’s just showing a black color. How do we assign the texture to it?
Goed, for a more detailed understanding, I’d recommend watching a YouTube video about this, as there’s a lot you can do. Echter, for the sake of making this explanation as inclusive as possible, let’s add a simple texture to this material.
Om dat te doen, you want to right-click anywhere in that grid, and you’ll see something like this:
Volgende, you want to write “TextureSampleParameter2D.” I’m no artist, but this is some random shenanigan to translate a texture to 2D or something.
Select it from the dropdown list like so:
You will now have this small window that says “Param.” Drag it closer to the big window with the multiple switches that has the name of your material on it.
In mijn geval, the material name is test:
To add a texture to your material, volg deze stappen:
- Klik op de “RGB” switch located at the top right corner of the “Param” raam. It’s the blue switch.
- Drag this switch over to the “Base Color” switch on the “Your Material Name” raam. This window is beige.
By completing these actions, you’ll notice that the preview has updated. Gefeliciteerd! Your material now includes a texture.
Om het proces te voltooien, you need to load your texture. Eerst, ga naar de “Param” window once again. Dan, navigate to the bottom of the scrollable list on the left side.
Look for the category called “Material Expression Texture Base.” Within this category, you’ll see a small box displaying the sample texture.
Nu, you have two options: either click the “Default Texture” dropdown button and select your texture from the options, or simply drag your texture from the inspector and drop it onto the box. It’s as simple as that!
To wrap up, go to the top of the window and click on “Toepassen” followed by “Redden”. This ensures that your changes are applied and saved properly.
Here’s my completed, altered version of M_BoxTruck_Body. If you’re going through this tutorial step by step, ensure that yours matches exactly:
Koken
Time to cook, but not in the kitchen. In Unreal Engine, “koken” refers to preparing assets for deployment. Don’t worry about the why, just follow along!
Eerst, navigate to the “Content” folder of your project. Look for the initial folder leading to your mod’s files. In dit geval, it’s the VehicleVarietyPack folder.
Volgende, locate the M_BoxTruck_Body.uasset file within the following directory:
TSSGame\Content\VehicleVarietyPack\Materials\BoxTruck\M_BoxTruck_Body.uasset
Since the first folder is VehicleVarietyPack, select that one.
Nu, head to the top left corner of your screen and choose “Bestand” > “Cook Content for Windows”. It’s time to cook up those assets!
Unreal Engine will take a few seconds to cook up those assets for you. You’ll hear some pleasant sound effects signaling when it starts and when it’s done.
Once it’s finished, feel free to press CTRL + S to save your project. Dan, go ahead and close it. If Unreal asks you to save anything extra, make sure to do so.
Locating the Cooked files
Your freshly cooked files are saved in a directory nestled within your project folder. Specifiek, you’ll find them here:
[...]\Unreal Projects\TSSGame\Saved\Cooked\WindowsNoEditor\TSSGame\Content
Go ahead and explore this directory to access your cooked assets.
Packaging
That’s all set! You’re all geared up for packaging your mod! Nu, without any further ado, hop on over to my Modding Guide and complete your mod! Happy modding!
Dat is alles wat we vandaag hiervoor delen HumanitZ gids. Deze handleiding is oorspronkelijk gemaakt en geschreven door Braven. Voor het geval we er niet in slagen deze handleiding bij te werken, U kunt de laatste update vinden door dit te volgen link.