Resident Evil 5 – How to Modify Character Using 3D Max Pipeline Tutorial

Resident Evil 5 – How to Modify Character Using 3D Max Pipeline Tutorial 1 - steamlists.com
Resident Evil 5 – How to Modify Character Using 3D Max Pipeline Tutorial 1 - steamlists.com

This tutorial will show you how to mod almost any 3d model in the game using 3ds max pipeline
 
 

Foreword

While i was looking for a starting tutorial that describes in detail the process of modding of 3D meshes for RE5, I came across the sad fact that it does not exist.
 
 
There are too many silent process demonstration videos where you can easily get lost in non-obvious subtleties, posts with deleted videos and dead image links, etc. So I decided to write such a tutorial by myself, based on information gained from my experience. I am not a top tier guy in modding, but i would highly appreciate if someone leaves me some new knowledge or corrects my mistakes.
 
A lot of work has been done, I express my deep gratitude to Sraigius for making this text readable.
 
 
Note: This guide covers the modding process in a 3ds max environment. There is a much more advanced plug-in for the blender, but unfortunately, its developer has stopped the project, and documentation is almost absent.
 
 
 

Programs and scripts you will need

 
 
 

Installing the tools

 
For installing the ARC tool, unpack the downloaded archive to a convenient and accessible location, then unpack the batch files to the same place. You only need pc-re5.bat.
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Installing the tools - 15C3914To unpack any .arc archive, just drag and drop it on the pc-re5.bat file, but by default, it does not convert textures to DDS formats, so you need to edit it. Click the right mouse button on the pc-re5.bat file, then select Edit from the context menu and add -tex parameter to this row.
 
 
arctool -alwayscomp -re5 -texRE5 -v 7 -pc %1 %2 %3 %4 %5 %6 %7 %8 %9
 
 
It should look like this
 
 
arctool -alwayscomp -re5 -tex -texRE5 -v 7 -pc %1 %2 %3 %4 %5 %6 %7 %8 %9
 
 
Note:If you have the same bad luck as me and the ARC tool simply flashing for a second CMD window and does nothing, maybe it requires adding a path to ARCtool.exe in the batch file. In my case:
 
 
С:\User\Tutorial\Desktop\arctool -alwayscomp -re5 -tex -texRE5 -v 7 -pc %1 %2 %3 %4 %5 %6 %7 %8 %9
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Installing the tools - 3978855
 
There is no need to install RE5ModTool and ResetMesh scripts, however it would be better to place them in some folder that can easily be reached. When you click “Run Script” 3ds max by default opening
 
3ds max installation folder\scripts
 
so I recommend you to move them there.
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Installing the tools - C3821E6
 
The NoorsNormalThief script just needs to be drag-n-dropped to the 3ds max viewport and then bound to somewhere via the Customize User Interface. I prefer to add it to the context menu
 
 
RE5TriStripV3 can be used in two ways:
 
– drag-n-drop a .NewMod file on the RE5TriStrip.exe
 
– set RE5TriStrip.exe app as default for opening “.NewMod” files
 
Therefore, choose the installation path depending on which way suits you best.
 
 
Noesis and Mod Manager both can be unpacked anywhere. I prefer to keep all tools in one folder
 
 
 

Quick explanation before importing

Before you start, I need to tell you about the archives, all game files are contained in .arc archives. The game archives are found here:
 
Resident Evil 5\nativePC_MT\Image\Archive
 
The names of these archives are mostly cryptic and it might be difficult to guess what is inside.
 
You can use this list – [boards.net]  to find the model you need.
 
 
The game is using slightly different 3d models of the same character for cut-scenes, campaign, mercenaries mode, and sometimes for figurine mode.
 
In addition, the archive of each cut-scene contains a duplicate of the models used in it. Sometimes the game skips loading the duplicate one when the model with the same name already is loaded but there is no guarantee that it will always work.
 
 
To unpack the archive, you need to drag-n-drop the .arc file to the pc-re5.bat batch file. It’ll create a new folder in the same location where .arc file is and with the same name as the .arc file has where you will find many folders and files of which you only need .mod a 3d model file, .dds a texture file, and maybe .txt a texture header file
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Quick explanation before importing - 0F5EE5E
 
Width and Height prescribe the size of a texture, if you change the texture size or aspect ratio, please change the header values accordingly.
 
 
Mips is mysterious vaues, I belive 2 to the power of it should be bigger then Width or Height values. 2 to the power of 10 = 1024
 
 
Float1-3 is sorta a texture light reflectivity(in RGB channels?)
 
 
 

Importing and prepare the scene

 
After deciding which model you want to modify, go to the folder with the game and copy the corresponding arc archive
 
 
Usually I create a project folder for the mod on the desktop, than create two more folder in it, one will store a backup copy of the .arc archive with the model, the other will be an unpacked version that I will modify. In both of them I paste the copied file.
 
 
Next, the archive in the Mod folder, you need to unzip by dragging the batch file. After unpacking, you need to find where the mod file is, Noesis can help
 
 
After finding it, you need to run 3ds max, go to the max script section and run RE5 Mod script
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Importing and prepare the scene - D164F45
 
 
This is a very primitive utility that can
 
ImportMod– import a .mod file
 
ExportMod – export selected meshes to a .NewMod file
 
Mesh Rename – a section for simplified management of mesh parameters, as they will be written in the name of a mesh
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Importing and prepare the scene - 13E039C
 
 
Mesh_161_00 – Mesh ID that cannot be changed
 
LODx252 – ID Level of detail mesh
 
MatIDx3 – Material ID
 
Groupx0 DisplayModex0 – ID of unknown purpose, 99% of their change does not lead to anything
 
 
Click on ImportMod, go to a .mod file in the unpacked .arc folder, and select it. Importing process takes quite some time and during it the 3ds max window will not respond.
 
As you see model was imported and can now be edited. But before that, to understand what is happening in the scene, you need to open the scene explorer in a hierarchical view..
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Importing and prepare the scene - 0298BBA
 
 
What we usually have after importing a character:
 
 
1. A skeleton consisting of helpers as bone objects with b_ prefix in their names, they, unfortunately, have only numerical indexes instead of proper names, which will not help in the skinning process, but rather make it unbearable
 
2. A sphere and several helpers that, judging by the names, are responsible for the collision or interaction of the character
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Importing and prepare the scene - 1E3DD75
 
 
3. And, finally mesh parts of our character, divided into Lod groups
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Importing and prepare the scene - 6C062CD
 
 
Note: LodGroup node itself is useless, it’s just a parent helper to which the child meshes with the corresponding LOD ID are attached to structure the imported objects in the scene.
 
 
As you might guess, LodGroup_1 will be displayed when the model is as close as possible to the game camera, LodGroup_2 a little further, LodGroup_252 as far as possible, but LodGroup_255 destroys logic. Models with this index will always be displayed, regardless of the distance. There are another “secret” LodGroup_0, which allows you to hide the mesh, which we will also need, because we can not add new models to the game, only replace parts of existing ones
 
 
For convenience, it will be better to create layers for each of the LodGroup, as well as for the bones.
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Importing and prepare the scene - 444E191
 
 
Note: The import script does not always import vertex normal properly and when you export you may encounter black spots on the model. You can fix this by adding the modifier edit normals and weld the nearest normals. See how to deal with it in the Appendix chapter.
 
 
 

Creating a master mesh

 
 
3d models in RE5 have certain limitations:
 
 

  • The maximum number of bones affecting the mesh should not exceed 32 (otherwise glitches may appear)
     
     
     
     
     
    Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Creating a master mesh - 19A6271
  • A single mesh cannot contain more than 1 material
  • The body itself must be divided into several parts because the game engine uses aggressive frustum culling technique, clipping off parts of the mesh, which provides only partial visibility. The torso occupies most of the body, so do not be surprised by the disappearing arms and legs, if you use a one-piece 3d model.
     
     
     
    Also, I believe every mesh has kinda precalculated visibility so would be better to not use the shoe’s ID for a head and vice versa.
     
     
     
     
     
    Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Creating a master mesh - 81455C0
  • The seams on the UV mapping must match the seams on the 3d mesh, otherwise, you’ll get “leaked” textures
     
     
     
     
     
    Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Creating a master mesh - 6CFEEDC

Given the above, I will show you a workflow that can’t be called non-destructive, but at least it allows you to go back and do changes without too much pain. For doing this, a single body(except eyes, hair, etc) mesh is created with the adjusted vertex normals and skin weights, then it is duplicated, the duplicate is divided into parts, and the values from the master mesh are transferred to these parts.
 
 
So, first things first, let’s open already prepared scene with imported mesh. Then import (or create a new in 3ds max) meshes for your mod (I like to move these meshes on a new Master layer), then adjust them roughly to fit the size and posture of the original model. After that, reset x-form and converted it into an editable mesh.
 
 
Before skinning, it would be better to merge vertices and adjust smoothing groups.
 
 
Now add the Skin wrap modifier to the master mesh and add to the list the parts of the original model from LodGrout1 that overlap the modified one. Set the settings as in the picture and press Convert To Skin.
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Creating a master mesh - AAB3F5EFace Deformation is better for models with different topology
 
 
Falloff
 
Determines the extent to which the control vertices affect nearby points in the base object. This is a
 
global setting. Default=1.0. Range=0.001 to 10.0.
 
 
Threshold
 
Determines the distance in system units that 3ds max uses to find the closest face to a control vertex. The greater the distances by which the control object’s and base object’s surfaces deviate, the higher the Threshold value needs to be. Default=5.0
 
 
Depending on your luck, this may be enough, otherwise, you will face manual adjusting and torment when the mirroring skin weights tool copy them to the wrong bones, because Capcom animators use unusual skeleton stucture and a few bones are too close to each other and I didn’t find any way how to map them manually in 3ds max. But there is a way to do it in Maya for example
 
 
 

Finalizing the mesh

 
 
Theoretically, this mesh can be already exported to the game, but the result might be unpredictable.
 
Therefore, in order not to try our luck, let’s duplicate our master mesh, split it into parts so that they roughly resemble the division of the original mesh, also take into account the materials, because the game engine allows only one material per mesh.
 
 
Note: Don’t try to outsmart devs, there is a reason why hands for one character split into two parts and another has them as a single one, etc. Believe me, I tried a few times, but every time this ended by re-editing to match the original partition.
 
 
So split your clone of the master mesh into parts to match the original partition and move them on a new layer, which I usually name as Exported. Also, I usually move duplicates of those meshes, but it’s up to you on how precautious you want to be.
 
 
After this select meshes from LodGroup 1 or\and 255 which will be replaced by your mod meshes and move them on a new layer, usually, I name it as Replaced and copy-paste mesh names from Replace layer to corresponding ones from Exported
 
 
After that for each part we add a Skin wrap modifier with a master mesh as a target, then I usually duplicate these parts and move clones to a new layer Exported. This step with duplication is your choice. The experience forces me to be too careful.
 
 
Select your first modded part from the Exported layer and run the ResetMesh script. Depending on what version of 3ds max you are using, settings might be slightly different. For 3ds max 2013-2016
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Finalizing the mesh - BEFF45F
 
 
For other versions
 
WARNING Before using this script you should import any 3ds file to your scene, only to turn off the “Convert units” option, you can export-import any file from the scene and delete it at once.
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Finalizing the mesh - BBE9CD5
 
Set this
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Finalizing the mesh - 2DC9BC6
 
 
The reset mesh script creates an already fixed clone of the selected mesh with the same name, so as not to get confused, it is desirable to immediately remove the original mesh that has in the stack of modifiers SkinWrap. Also, the script creates a SkinData file that was necessary for 3ds max for the transfer of skin weights. Usually, I create a SkinData layer which I make active and hidden then move the SkinData file here, every SkinData file after will move into this hidden layer.
 
 
Repeat these for all mod parts from the Export layer
 
 
Now we are at the finish line. ResetMesh script didn’t transfer skin weights too precisely, so let’s fix them. Select the master mesh and use Skin utililty to extract skindata to the mesh from it, then select this skindata mesh add first mesh form Export layer to selection, press Import Skin Data From Mesh, and in dialog window press Match by Name and press Ok
 
 
Do the same for other meshes from the Export layer
 
Note: I am not sure is it right or useless but by default, the Skin modifier sets a limit of 20 bones per vertex, but the game only works with 4, so I set this limit for every part just in case.
 
 
The ResetMesh script also destroys the normals, to restore them, you need to transfer them from the master with NoorsNormalThief.
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Finalizing the mesh - EC49B5A
 
 
Select the master mesh as the Source object, then select the first mesh from the Export layer as Target object and press Steal! Repeat for each remaining mesh from the Export layer.
 
 
Note: In most cases, you can transfer normals from a mesh that contains modifiers, but if something goes wrong – make a duplicate of the master mesh, collapse the modifiers, and reset ResetXform, after you can use it as the Source object.
 
 
Now, the mesh is ready for export. Select the meshes in the Exported layer and press the ExportMod button from the Modtool window, next select the .mod file, that you imported before and wait. Depending on how many files you exporting it would take quite some time.
 
 
ModTool will create pl0100.Newmod file in the same place where your selected .mod file was. To convert it to the game format, drag-n-drop it on ReStripV3, It’ll create pl0100.mod, then copy the name from the original .mod file, delete this, and pl0100.Newmod files and finally rename pl0100.mod with the name from the clipboard.
 
 
Let’s see how the converted model looks with Noesis.
 
 
You can see that not only the textures on the mesh are incorrect, but there are still many parts from the original model that are no longer needed. Let’s fix it.
 
 
 

Materials, LODs and the mod manager

 
 
First, you need to deal with needless parts of the original model, just rename them with ModTool by setting the value of the LOD to 0. Since I’m not going to create low-res meshes for my mod and meshes from layers: Lod2, Lod3, Lod252 will be visible in the distance. I’ll hide them too.
 
 
However, this will cause the remaining parts from Lod1 to disappear at a distance, you need to rename them by setting the LOD value to 255, now they will always be visible, regardless of the distance to the camera.
 
 
Next, materials, it’s a pretty frustrating thing. Each mesh has its own MatID this MatID represent a material with a few linked textures(usually diffuse, specular, and normal map) to it, and I do not know another way than to choose a certain piece of the original model in 3ds max, look at its MatID, compare it with what textures Noesis displays, and then look for them in the unpacked .arc folder.
 
 
When you choose what textures you are going to change, apply corresponding MatID to your exported meshes with ModTool. The next step is replacing textures.
 
As for the textures, there is a great video – [youtu.be]  where you can fully understand how they work, but in a nutshell:
 
DDS format with always enabled mipmaps
 
 
Diffuse texture = DXT5 compression for map with transparency, DXT1 without it
 
Specular texture = DXT1 compression
 
For normal map you should create an alpha channel, copy a red channel to this alpha channel and fill red channel with white colour. Then export the texture with DXT5 compression.
 
 
Note: Sometimes you can notice that your normal maps don’t look right, veins look like cavities, etc. To fix this, try to invert the green channel.
 
 
After replacing textures in your unpacked .arc folder, you are ready to re-export your mesh with ModTool, this time select all meshes from lod groups. I hide helpers in the viewport and select meshes there.
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Materials, LODs and the mod manager - 3EB49DC
 
When it’s done do the same step as before: drag-n-drop pl0100.Newmod on restrip, copy name from .mod file, delete this .mod and pl0100.Newmod, then rename pl0100.mod with clipboard value.
 
 
Finally drag-n-drop the unpacked .arc folder on pc-re5.bat and get a .arc archive with your mod that can be immediately copied to the folder with the game, but it would be wiser to use the Mod manager.
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Materials, LODs and the mod manager - 742DEEF
 
To make it work with the Mod manager, run it first and choose Resident Evil 5, after this, it should make this subfolder:
 
\Re5\Mods
 
You can create any folder there, and the name of this folder appears in the Mod manager mod list, but to make it work, you should re-create a path to your .arc, for example:
 
MySuperMod\NativePC_MT\Image\archive
 
When you copy your modded .arc archive here and enable it in the mod list, you can run the game and see what goes wrong
 
The Mod manager also supports a compressed folder with a mod but unfortunately only in .rar format.
 
 
That’s all folks. You can find the mod from this tutorial here – [nexusmods.com] 
 
 
 

Appendix

Known bugs and how to deal with them

 
 

Black spots on parts of the original model

 
ModTool does not every time import normals correctly
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Appendix - 5948DC4
 
 
To fix it, add Edit normals modifer, set normals, turn on Use treshold, set small value, select all(or only affected part) and press Selected
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Appendix - 27878D8
 
 

Glitchy shadow in figurine mode(and cut-scenes)

 
This, unfortunately, is a hellish pain, wise guys said this is the only Gold edition port problem that brought too many glitches. What I know is, this is a problem with bone influences, a mesh with a certain mesh ID could have only certain affecting bones. SkinWrap added small weights from the adjacent bone? You’ll get a glitch.
 
Debugging process is very tedious, I remove unused bones from skin modifier with this script – [cgsociety.org]  and compare original and modded part. To find which mesh is causing the problem, you can alternatively assign a Lod0 to your mesh and see what happens in the game. Hidden parts don’t cause the bug.
 

Stripes on the texture

 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Appendix - 31C269C
 
 
You replaced the texture but didn’t change the .txt header file with updated width and height
 
 

Head editing

 
The game is using hi-res heads with a haircut and eyes for cut-scenes. The hi-res head is hiding specific mesh IDs on the body model(so it’s important to keep them in the same places for your mod).
 
Unfortunately, Capcom’s implementation of this feature is weird, it makes visible seam between head and body despite the same skin weights and position of vertices. That’s why all characters have necklaces, high collars, and so on.
 
Until ModTool v0.33 head editing was almost impossible, it works now but you should do a very similar partition as an original mesh has with the right MeshID. When you do it randomly, you’ll get something like this:
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Appendix - 29F0010
 
 

Using alternative 3d editors

 
You can use 3ds max only for import-export and edit meshes in other 3D editors that have, for example, much better tools for skinning, using FBX as an intermediate format. If anyone is interested in Maya editing I can explain some subtleties.
 
 
Resident Evil 5 - How to Modify Character Using 3D Max Pipeline Tutorial - Appendix - 6298583
 
 

 
 
This is all about Resident Evil 5 – How to Modify Character Using 3D Max Pipeline Tutorial; I hope you enjoy reading the Guide! If you feel like we should add more information or we forget/mistake, please let us know via commenting below, and thanks! See you soon!
 
 


Be the first to comment

Leave a Reply

Your email address will not be published.


*