Hatred
46 ratings
[Hatred] Mod Guide #2 | Adding custom character
By DC_vipeout and 1 collaborators
Guide for Hatred Editor users who wish to add their own custom character models into our game.
   
Award
Favorite
Favorited
Unfavorite
Introduction
Another guide for you guys, this time I'm just the messenger ;) The original author is DC_SatanicBlood and the original post is here.[forums.hatredgame.com]

<< Previous Guide | Next Guide >>
Preparation
  1. This file: http://destructivecreations.pl/upload/sk_ch_civilian_4_tutorial.fbx
    I'm giving you one of our characters in FBX format, as it is the most common one used nowadays. You can open it in multiple 3d softwares, from Blender to 3D Studio. I use Maya 3D myself. The skeleton of this guy is the same for all characters, including main hero. So, you can use your character either as player and enemies.

  2. 3d modelling software supporting FBX import.

  3. Hatred modding build, of course. ;)
Let's make this thing happen!
This is written strictly for Maya 3D users, but things will be very similar in any other software. If you'll have any troubles using something other than Maya - well, you have to sort them out yourself.

  1. Import sk_ch_civilian_4_tutorial.fbx on the scene, don't mind any warnings you get, I never do. As long as meshes and skeleton imports properly, we're good.

  2. The character you want to rig to this skeleton has to have the same proportions, scale and should wrap perfectly our guy. In case you would like to have random heads, you should have them as separate meshes AND HANDS ALSO. In case you want the character to be able to loose his hat if it has one - it has to be separated as well. Eyes should be separated if you want them to act correctly during close-ups (executions IE).

  3. Okay, time to rig your guy. The fastest way in Maya is to use Cas Mass Copy Weight plugin and simply copy the skinning from our guy onto yours. You can find the plugin with instructions here: http://www.castorlee.com/maya-tools/mass-copy-skin-weight. AFAIK 3d Studio has something similar as a native tool, dunno how Blender, as I didn't use it for many years. :) BTW - do not skin a hat!

    Anyway - just copy the skinning if you can. Otherwise, you have to skin it yourself from scratch and if you're reading this, you probably know how to do it.

  4. If you have your character rigged, you can delete ours from the scene. I highly suggest to FBX export anything using "export selection" instead of "export all". ;) In case you want the whole character to be exported as one (as is the case of The Antagonist), just select all parts and a skeleton and export the ♥♥♥♥ out of it. In case of more sophisticated stuff:
    • Each head should be exported as one FBX along with hands. And skeleton of course.
    • Hat should be exported as static mesh, but first you have to set it's pivot to the same point as is HeadEnd joint and then move the hat to the 0,0,0 of the scene. Of course, in the case you want to have a proper hat falling from their heads. :P
Time to setup our guy in da engine
  1. Open the editor.

  2. Import your exported FBXes, you'll get a pop-up menu:
    • In "Skeleton" section, select "sk_ch_Human_Skeleton".
    • Uncheck "create physical asset" and select "sk_ch_Human_PhysicsAsset" below.
    • Keep "import animation" unselected, to preserve an order inside your folder.
    • Uncheck "import materials" and "import textures", because those are just making things messy.

  3. If everything went okay, you'll have a skeletal mesh of your dude/dudess imported. If you'll double click it, you should see your character on our skeleton. You can go to animation section in the right-up corner and then you'll have a list of animations below. Double-click any of them to see if everything works properly. If it doesn't – well, you've ♥♥♥♥♥♥ something up. :)

  4. As for materials and textures, there's nothing unusual here. Just follow some related UE4 tutorials on how to import and make materials. You can also use our materials and simply make instances of them and then put them on your characters.
Now let's bring this dude to life
  1. In case you want to replace existing Hero character with yours, simply go to Blueprints/Hero folder and double click on MyCharacter blueprint. On the left you'll see the list of components of hero actor. Select "Mesh (Inherited)" and in the details window (on the right) you'll se the mesh section. Replace the mesh with yours and everything should be fine. The only problem you may encounter is that on Hatred original levels, we dynamically change the material for play (he's more and more splashed with blood and his coat is more torn with each level – I bet you didn't notice it :P ). If you want to have proper materials on your character, you should turn off this fuction in each of levels, which may be pain in ass. On custom levels, everything should be fine.

  2. In case your character is NPC:
    • Go to Character/Civilian_01 folder. Click RMB on BP_Civilian_01 (he is actually the parent of them all) blueprint and choose "create child blueprint class". Give it a proper name, move it anywhere you want and then double click on what was created.
    • On the left you have components and as in the case of hero replacement, just replace the mesh.
    • If you have head or heads or hats separately, select the top thing in components section (it'll be like your_blueprint_name(self))" and you'll see details section change on the right. Find heads section out there and just set everything up, it should be obvious how it works. In case your character has the head already with mesh, just delete everything what is in that section. The same goes with hats section, but when putting them on use "Smesh" instead of "Mesh" (Mesh is for skeletalmeshes and it's obsolete, as we've switched to static meshes for hats – they work better).
    • If you want this AI character to have weapon, give it to him in inventory section, but don't forget to give a proper ammo also! And in that case you'll have to change AIBehavior to BT_Shooting in AI section (it's in details also).
    • Scroll up and down the whole details and change anything you want, from the voice type to the skin tone randomization (but for that you have to setup materials properly, check out how ours are made). Most of things work, some don't, but you should do what you want with your character out there.

And from now you can place or spawn your character on levels. Play as one of them, or kill some of them, I hope everything works out for you and this tutorial was helpful. :)
Postscriptum: LOD = optimization
In case you'll expect to have many of your characters on the screen it is wise to have their LOD's setup (Level Of Detail, in case you don't know), because of the framerate issues. It means that you can have less detailed models when they're far from camera. We use only two LOD's – one is visible from the normal isometric camera (less detailed) and one on the close-ups (more detailed – which is actually LOD0). Altough we don't use any for the main character, as he's just only one and besides – physics on clothes don't work on LODs higher than 0. But the detail on mesh is one thing and it's less important, what is important is what I'm gonna do... I meant, more important is the optimized skeleton. For LOD1 (the less detailed one) I've deleted joints for hands, facial joints and everything that is Not Important when viewed from the distance. If you do that on the skeleton you've got and import that as LOD1, all animations should work as they did and nothing should get ♥♥♥♥♥♥ up, but it requires re-skinning in your 3D software. Yet, it's worth it, believe me. :)

To import LOD – right click on our skeletal mesh->import LOD1 and import your mesh. If you'll open Skeletal Mesh in editor you'll have "LOD" section on the left. Expand "LOD info" out there and setup the proper "screen size" thingy, it describes what size of the rendered mesh on screen should be to switch between LODs. We use 0.8 in Hatred. You can see the effect in the mesh view by going closer/further with the camera and you have information which LOD is active in the left up corner.

Have fun!

IN CASE OF ANY QUESTIONS, POST THEM IN MODDING SUPPORT FORUMS.[forums.hatredgame.com]
4 Comments
L4bel 6 Dec, 2024 @ 2:15pm 
The first link gives 404 error, I can't even open the second link.
Fenekie 15 Jun, 2022 @ 3:22pm 
ty
Large Father 3 Mar, 2018 @ 9:51pm 
Oh boy...
YamyyYamyy 13 Feb, 2016 @ 6:19am 
Let`s Try....