How Create a Clothing Mod 41.56 IWBUMS

How Create a Clothing Mod 41.56 IWBUMS

Downloads

Essential files to starting make clothing.

Blender[www.blender.org] (v2.92+ recommended)

Male model[cdn.discordapp.com] (credits to throttlekitty)

Female model[cdn.discordapp.com] (credits to throttlekitty)

Clothing Assets[cdn.discordapp.com]

Mod used in this guide[cdn.discordapp.com]

Blender


How Create a Clothing Mod 41.56 IWBUMS image 8

Assuming you are a newbie and not have experience with blender, a short description will be given of what is and how to use it, otherwise skip to #Modeling.

Blender is a free and open-source 3D computer graphics software toolset, in which we will can create our beautiful and cool models for Project Zomboid, but before to start, we need to know some aspects that are really necessary to understand what we are doing.

I know, you don't want to waste time on this, you want to create great things now! but believe me... "If be stuck you don't want, read the manual you must."

User Interface[docs.blender.org]

3D Viewport[docs.blender.org]

UV Editor[docs.blender.org]

Scenes & Objects[docs.blender.org]

Meshes[docs.blender.org]

Modifiers[docs.blender.org]

Armatures[docs.blender.org]

Weight Paint[docs.blender.org] These are essential knowledge to start creating models, you can read the manual as much as you want and improve your modeling technique.

For this guide, we will use a Male model and will create a Jacket model.

Modeling


How Create a Clothing Mod 41.56 IWBUMS image 22
How Create a Clothing Mod 41.56 IWBUMS image 23
How Create a Clothing Mod 41.56 IWBUMS image 24
How Create a Clothing Mod 41.56 IWBUMS image 25
How Create a Clothing Mod 41.56 IWBUMS image 26
How Create a Clothing Mod 41.56 IWBUMS image 27

Open blender and import the FBX file Male_Body_10_redo.fbx.

I recommend change FOV so that the mesh does not disappear when it is very close.

(Press N → View → Clip Start to 0.001 m)

Import Bob_JacketPaddedDOWN.fbx from Clothing Assets and vincule the model to bip01 armature.

(Bob_JacketPaddedDOWN → Object Properties → Relations → Parent: Bip01)

Now you can remove Body model, since it was only a reference of where the clothes you will create will be located.

Finally add the Bip01 armature to the model.

(Bob_JacketPaddedDOWN → Modifier Properties → Armature → Object: Bip01)

In this moment, your clothing is ready to be sent to the game, you can make any modification you wish to the model, but before that, there are some fundamental concepts that you must learn if you want your clothes to have no imperfections,

Vertex Weight


How Create a Clothing Mod 41.56 IWBUMS image 39
How Create a Clothing Mod 41.56 IWBUMS image 40

It is the tools that makes your clothes can be deform and animated together with the player.

One of the ways is through the Weight Paint, I personally don't recommend it because the geometry of the Project Zomboid models is very recuded.

(Objects Mode → Weight Paint)

The other way is through the Vertex Weight, it must be done manually which makes it very tedious, but it is the safest way.

(Objects Mode → Edit Mode → Select Vertex → Press N → Item → Vertex Weight)

Clearly, with this model it will not be necessary to set the weight, since they are already by default, but if you want to add new vertices or create a model from scratch, remember to add them.

UV Mapping


How Create a Clothing Mod 41.56 IWBUMS image 48
How Create a Clothing Mod 41.56 IWBUMS image 49
How Create a Clothing Mod 41.56 IWBUMS image 50

You must follow certain patterns of the mask if you want your model to contain blood, dirt or holes. You will be able to see all the nodes on UV map if you select all the vertices of your model.

(Select Bob_JacketPaddedDOWN → Press TAB → Press A )

On the left the UV map with the texture of the male model and on the right the representative mask that you should try to follow when creating clothes.

Remember this is a model we got from the game, the vertex weight and UV mapping are already defined, when you create your model, you will have to set them yourself, but that sounds like a lot of work doesn't it? I recommend you choose a model in Clothing Assets and use it as a base for your own creations.

Clothing

Now you need to create the mod folder where your recently created clothes will be. Create a folder in C:\Users\***\Zomboid\Workshop, the structure of your mod should look something like this.

Workshop └───SteamGuideClothing ├───preview.png └───Contents ├───mods └───SteamGuideClothing ├───mod.info ├───poster.png └───media ├───clothing │ └───clothingItems ├───models_X ├───scripts └───textures

Once you are in the "media" folder, create fileGuidTable.xml, in this file is where the routing of the clothes created will be registered.

<?xml version="1.0" encoding="utf-8"?> <fileGuidTable> <files> <path>media/clothing/clothingItems/Jacket_SteamGuide.xml</path> <guid>babfa388-ef98-455b-bbbd-79753ea8ea36</guid> </files> </fileGuidTable> You can generate a GUID in guidgenerator[www.guidgenerator.com]

Create the file Jacket_SteamGuide.xml in the path previously set in fileGuidTable.xml. Here you will set the path for the respective male and female models, their textures and other features.

<?xml version="1.0" encoding="utf-8"?> <clothingItem> <m_MaleModel>Skinned\Clothes\MyFirstJacket</m_MaleModel> <m_FemaleModel>Skinned\Clothes\MyFirstJacket</m_FemaleModel> <m_GUID>6323458d-94a0-4526-9147-7c3cc24b4704</m_GUID> <m_Static>false</m_Static> <m_AllowRandomHue>false</m_AllowRandomHue> <m_AllowRandomTint>false</m_AllowRandomTint> <m_AttachBone></m_AttachBone> <m_Masks>13</m_Masks> <m_Masks>14</m_Masks> <m_Masks>3</m_Masks> <m_Masks>5</m_Masks> <textureChoices>Clothes\Jacketpadded\WhiteTexture</textureChoices> </clothingItem> To determine the properties of your clothing, you can use clothing already existing in the game files as references, for this guide I just did copy and paste from Jacket_PaddedDOWN.xml and change some things.

You just need create the usable item that will allow us to use the clothes that we have created, Create the file SteamGuide_clothingItems.txt in path ..\media\scripts\clothing

module Base { item Jacket_SteamGuide { Type = Clothing, DisplayName = My First Jacket, ClothingItem = Jacket_SteamGuide, BodyLocation = Jacket, Icon = SteamGuideJacket, BloodLocation = Jacket, RunSpeedModifier = 0.89, CombatSpeedModifier = 0.96, BiteDefense = 10, ScratchDefense = 20, NeckProtectionModifier = 0.5, Insulation = 1.0, WindResistance = 1.0, WaterResistance = 0.60, Weight = 3, WorldStaticModel = JacketSteamGuide_Ground, } } You must be especially careful with some variables like "Type" that defines the item as a clothing item, "ClothingItem" that link the item with your clothing xml file or "WorldStaticModel" that is the 3D model on ground. There are more additional variables for your item, but this is only a basic guide to creating clothes, you will must to research it on your own.

Finally you just have to put the model in ..\media\models_X\Skinned\Clothes and the texture in ..\media\textures\Clothes\Jacketpadded, The resolution of the texture must be 256x256 pixels. (The paths could vary, it all depends on what you are going to put in ClothingItem xml files)

WorldItems


How Create a Clothing Mod 41.56 IWBUMS image 67
How Create a Clothing Mod 41.56 IWBUMS image 68
How Create a Clothing Mod 41.56 IWBUMS image 69
How Create a Clothing Mod 41.56 IWBUMS image 70

You have several ways to do this, but today I will show you the fastest and most efficient way to create the model when it is on the ground.

Make a copy of your blender file and open it, select the model and put it outside the Dummy01 object and delete Dummy01 together with Translation_Data. Also sets cursor to world origin.

(Interaction Mode → Object Mode → Press Shift + S → Cursor to World Origin)

Select the model and centralize it with respect to the world origin, later make it the closest thing to a rag. (If for some reason the model is too big within the game, reduce it in Blender)

(Bob_JacketPaddedDOWN → Press S → Press Z)

The model is ready, put it on in ..\media\models_X\WorldItems\Clothing and create the file SteamGuide_modelsItems.txt in ..\media\scripts

module Base { model JacketSteamGuide_Ground { mesh = WorldItems/Clothing/MyFirstJacket_Ground, scale = 1 } }

Testing


How Create a Clothing Mod 41.56 IWBUMS image 79
How Create a Clothing Mod 41.56 IWBUMS image 80

Open Project Zomboid, create a new game and activate your mod. Use debug mode to spawn your item an test it.

FAQ

Why I get a "AssetPath Error"?Probably it's because you have some unconnected bone path, check Armature Manual[docs.blender.org] .

What I can do if my clothes don't appear or can't be seen?If you don't get any error in console and your model cann't be seen, check if the model texture are in the specified path or if the model faces are reversed.

Why I get a "skinningData is null"?Check if you linked the model with the Bip01 Armature or if a vertex is assigned with a vertex group that doesn't exist. (Restart the game when you try to make any changes to solve it, the game will not update the model after this error)

Source: https://steamcommunity.com/sharedfiles/filedetails/?id=2648115890					

More Project Zomboid guilds