We are going to duplicate our model, and start creating the gibs by deleting and bridging some polygons. The 3D modelling skills requirements for this part are going to be higher.
Right click on your model and select "Clone".
A window with these options will appear. You need to select the Copy option and press "OK". This will clone an independent copy of your model. The other two options will make a linked new version of your model that will copy any changes you make to the new model into the old. We don't want that now.
To keep things tidy, hide the original model, so we only see the new copy.
Right click on the copy you just made, then go to "Convert To" > "Convert to Editable Poly".
If you look in the Gibs_Generic layer, you'll see all the gibs listed. We will try to replicate those gibs in our model. You can look at each of them if you need to.
I'm going to select all the polygons that won't be part of the left arm gib, and delete them.
After deleting, do some simply extrusions to add some small detail and close the hole.
It's probable that your entire model will only have one Material ID, especially if you made it yourself. If it's a downloaded model, specially from another engine, you might see that there are more than one Material ID if you open the dropdown on the bottom part of the highlighted panel.
Select the new polygons you created to fill the hole, and give them a new Material ID. If your model only had 1, the type "2" in the "Set ID:" field. If your model had more than one ID, say [n] IDs, type [n+1] in the field.
Material IDs are a property of the polygons of a 3D model that make them be able to have a different material, or texture, than other polygons in the same model. We are giving this part of the model a new Material ID, because we will create a material/texture for the "bloody part" of the gib, while maintaining the same material for the other parts.
Press M in your keyboard. A new window will open, called Slate Material Editor. Here we can set materials for our objects. You can ignore whatever materials are already created here. Pan with middle mouse button if you need to.
If instead another window opened, smaller and called Compact Material Editor, go to its menu bar and select Modes > Slate Material Editor.
Drag and drop one "Multi/Sub-Object" material and two "Standard" material to the viewport to the right.
Grab the circle nodes on the Standard materials and drop them in the (1) and (2) fields of the Multi/Sub-Object. Then, double click the Multi/Sub-Object material.
Click on Set Number and set it to 2.
Now, grab the circle node of Multi/Sub-Object and drop it onto the 3D model of your gib. This process is necessary in 3Ds Max to set up models with multiple materials.
You can use this same material setup for all the gibs. No need to keep creating more of these.
Note: if your model has more than two Material IDs, you will have to add as many Standard materials as it has Material IDs.
You can give this "bloody part" a new unwrapping if you want. Your aim should be to have only one material for all the bloody parts of all your gibs. That is, if you want your mod to be very performant and easy to share (many textures will make the mod file larger). This model had no unwrapping done, so naturally you are seeing garbage UVs in the background. That shouldn't be the same for you, hopefully.
Remember the Skin Wrap modifier? Hope you do, because we are using it again! This time, add its corresponding reference model.
Note: it is very important that you add the original gibs as reference, and not the custom model, even though you could also do that. The reason is that adding the oiginal gibs will also make the converted Skin have the exact same bones, which the game will require in order for all skins to link properly.
After you convert to Skin, try to see if you can find any "orphan" vertices.
Note: it is important that you don't add any influence to the bone called Bip001. No model in the game uses this bone. To ensure compatibility, you must have this bone in your Skin modifier, but don't add any weight to it for any vertex.
Give this gib an appropriate name and you're almost done with this one.
You just need to export this gib as and .fbx and give it a good name. Now, repeat these steps for all gibs.
When you finish all your gibs, import them to Unity.
Start by adding one of the gib models to the Hierarchy. Remove the Animator and a the component "Gib Skin Info".
Add the child GameObject Arm_L to the "Lod 1" field. Save the gib GameObject as a prefab. Don't forget to right click it in the Hierarchy an select "Unpack Prefab Completely" beforehand.
Repeat this for all gibs.
Right click on an empty space is the Project window, and go to Create > Game Stats > Gibs Dictionary.
Open the "Gibs" field, give its Size a value and add the gibs prefabs you just created, selecting its Type accordingly.
It should look something like this.
After that, you have to setup something called Gib Sets. A gib set is just a group of gibs that spawn together. There are 5 gib sets in the game, but you can "customize" them is you want. A gib set spawns when an NPCs gets gibbed by something like an explosion.
At this point we can edit out gibs' prefabs to add their materials. Select one prefab and then press "Open Prefab" in the Inspector window.
A temporary scene will load, with only your prefab in the Hierarchy. Collapse the Bip001 GameObject to make it more readable.
Create a new material for the bloody part. You can drag and drop your materials to the parts of the model that correspond to them.
To finish working with this prefab, and save it, click on that arrow in the Hierarchy, next to its name.
Repeat this for all gibs.
Now you can drag and drop the Gibs Dictionary you created into the "Gibs" field in the Npc Skin Info component of your mod. Save the prefab, build your mod and try it out.
Test your mod and take note of any errors in the skinning. We seem to have a problem with TorsoRipped. Let's inspect the skinning closely.
In this case I don't have any orphan vertices. The next probable cause for our problem is a possible discrepancy in the bones/weights between the new gib and the original. Normally, we would have to check bone by bone, vertex by vertex, but I've made a tool to help us here. We need to go to Unity.
I've provided you with a folder that contains the original gibs. They are the same that you saw in 3Ds Max, but they are here for convenience. Bring the equivalent original gib into the Hierarchy, along with the newer.
Locate the GameObject with the Skinned Mesh Renderer component, and add a "Show Bones" component. Do that for both new and original gibs.
For both of them, right click the Show Bones component's name, and select "ShowBones()".
Doing that will populate the Bones field. Inspect those arrays closely. You are looking for a difference in the number of bones. Your mod should have exactly the same bones as the original gib. In this case, the order is different, but the bones do check out, so our problem is not here. You can delete the prefabs you brought to the scene. Don't save the changes though.
We will have to do something else.
Press the Windows key + R in your keyboard and type "%appdata%". We will need to go into your AppData folder to look for the output_log of the game. Press Enter.
A Windows Explorer window will open in the Roaming folder. Go back one folder to AppData.
Navigate to LocalLow > Dorumeka. Then, you might see many folders, depending on how many builds you've accumulated of my game. Look for the folder that corresponds with the build you used to test your mod. Most likely the latest one. Inside, you'll find the output_log.txt file. Open it up with your text editor of choice.
Look for "unable to map". In Notepad, press Ctrl + F to open the search window. You should see a message like this one. If you find it, now you know exactly what went wrong with your mod. In my case, there's a problem with the Pelvis bone of TorsoRipped. Now we can fix it.
Since this bone seems to be very stubborn on giving us problems, I'll just take all influence away from it. Let's give its influence to other bones instead.
Export it, update its prefab and mod in Unity and try it out.
No more errors now, all gibs are working very good.
It seems we are ready to make a good mod now, but there's one more thing we are missing here. We are lacking LODs. Without those, our mod won't perform very well compared to the vanilla models.