[HS] Guide(lines) to Import Custom Head Meshes

 

Necessary software:

Before we begin, I want you to know that this tutorial won’t do you any good if you don’t know the basics of Blender, and that includes handling skeletons.

I won’t cover these here, there’s many tutorials for that on the internet. Either ask, or search for an answer in Google.

Also, have in mind that most of this is more like a general guideline, you might need to adjust some steps depending on what you’re importing, since not every game has the same standards when it comes to assets of any kind. That said, in my case, I’m importing Christie from DoA 5 LR, and not even in this game do all the characters have the same standards.

Well then. Read more after the split.

[Preparing the files]

First thing, copy cf_head_00 to a new file. Name it however you want. You can even put it in its own folder. Up to you.

In my case, I’ll name it christie_head.unity3d, and I’m going to put it in its own folder, called roy12_christie.

christie_head_in_folder

Now open your new file in SB3UGUI. The first thing we’ll do is change its CAB STRING to avoid conflicts.

I did it with my string generator, it’s on hongfire, you can use whatever you want.

change_cabinet

Save the file.

Don’t close SB3UGUI yet.

Go to HoneySelectTrialabdatalistcharacustom_trial, and make a copy of 00.unity3d (this might change for the game’s release! No, it didn’t).

The copy can be named anything, but it must have a number of two digits in the end, such as 00, 01, etc.

Mine is named roy12_christie_00.unity3d

list_asset_created

  • Now, open this file in SB3UGUI.
  • Now, delete all but cf_f_head_00.
  • Double click on cf_f_head_00.
  • A list will open.

cf_f_head_00

Select the 3 first lines, and delete them.

Change the first field in the line left to a high number, but don’t go over 200999 which I think is the highest, anything higher and you’ll be
changing the category, we want a head, so it must be 200xxx. Make sure it doesn’t conflict with other heads. We don’t have many so that’s easy.
Since I’ve already used 200004 for Tina, I’ll use 200005 for Christie.

In the third field, give it a description. I’ll call it Christie.

In the fifth field, you must reference the file we created a few steps before. In my case, christie_head.unity3d at abdatachararoy12_christie,
so I put chararoy12_christiechristie_head.unity3d in this field. Notice how it doesn’t need you to add the abdata directory!You don’t need to add the abdata directory, the retail game already points to it in a field previous to this one (only added in the retail game).

Leave the 7th field as p_cf_head_02. p_cf_head_01 is complicated with the eyes replacing, so don’t use that one.

Now click on apply and save the file.

retail_modified

Notice how it now has a new field with abdata as its value? Well, the retail game needs this field. You get it from the original 00.unity3d from the game, so don’t worry too much about it. Just make sure you’re editing the right fields from here on (for now, just visualize it in the following pictures, I’ll update later).

To make sure it saved correctly, reopen the file and check the list.

Now, we confirm that everything up until now is working.

So open the game, go to face type, and in the first tab, select your “new” face.

new_face_in_list_working

Since we’re using the second head as a source, we might want to check A – Type 1, then change to the new one to confirm it’s working.

With this, we’re done with preparing the files, for now anyways.

[Getting the original head for reference]

Since we need to adapt another head to the game, the best way is to use the original HS head as a reference.

So, we’re going to extract the HS head to an FBX file with SB3UGUI.

Open your new chara file which contains the head, in my case christie_head.unity3d

We’re using the first head (p_cf_head_02).

Double click on it, select p_cf_head_02 in the new tab, and click on Virt. Avatar.

I always set the virtual avatar manually, still not sure if it’s necessary, but I’ve had no issues with it so far (please tell me if it’ll come back to bite me in the dick later).

set_virt_avatar

Now, expand the tree up to cf_O_head, and select the SkinnedMeshRenderer.

In export options, click on Export as is.

export_HS_head

The log might print some warnings. Ignore them.

You should get a new folder where your unity3d file is located, named just like your unity3d file

Explore it, and you’ll see your exported mesh as a FBX file.

exported_head

You’ll ned to import this file in Blender.

[Blender]

To import the FBX into blender, use these settings (as of 2.77a)

fbx_importfbx_import_2

Now the HS head has been imported into Blender

hs_head_blender

If you still have the cube from the default Blender startup, please delete it.

Now, you import your character, and get its head and preferably hair, since moving the hair around right now
will save you having to do a lot of adjustment later. This, again, depends on the game. For the one I’m using, to get the characters assets,
I used doa5LRarchivarius, and to import into Blender, I used the latest Import TMC(PC) add-on for Blender. I also use Noesis with the TMC Polygon Tool
add-on to be able to extract textures out of TMC files.

Also, make yourself a favor and import the head parts of your character in a different layer (anywhere the HS head isn’t at), and leave the hair in its own
layer too. Wee need some order.

Now, I import my models, head first, then hair.

imported

Now, as you can probably see, I’m lucky enough that I got not only the meshes, but the skeletons too, which means that I can use the head skeleton
to make expressions later. Pretty handy. Now, you might not be so lucky with whatever you’re importing, but if you get the skeleton (and it works),
then consider yourself lucky. If you don’t, you’ll have to either make a skeleton, rig the model to the skeleton and use that, or wait until you’re
done and make the expressions by editing every morph in edit mode.

If you have the skeleton:


Use it to scale everything uniformly whenever you need to, you might have eyelashes, brows, teeth, etc, you’d want to scale them along with the head,
and since you have a skeleton and will need it later, you can just scale the skeleton, everything else will scale along.

If your skeleton works in Pose Mode but moving it in Object Mode doesn’t move the other objects along with itself, then you’ll have to parent the objects
to the skeleton (CTRL+P, Armature Deform).


If you don’t have a skeleton:


While being in object mode:

Set your cursor to 0,0,0:

open_for_cursorcursor_pos_1

Now create an empty object in Blender, and parent all the head objects to it, so that at least you’ll be scaling everything uniformly.

You create it like this:

empty_pain_axes

It should be created at the same position as the cursor (0,0,0).

Then, select all the head objects, then select the empty axes last (it should be the only bright one out of all the selected objects).

Now press CTRL+P. Click on object.

parent_to_empty

Now, whenever you scale/move/rotate the empty axes, the head along with eyes and everything else will scale/move/rotate.


We’ve got our stuff ready to move it, we want to move it to the right position and scale accordingly in relation to HS.

Now here, I can’t exactly tell you a step by step of what you need to do, since again, every asset from every game tends to be different.

The only recommendations I can give you are:

  • Always scale using either the skeleton or the empty object, and always do so in Object Mode.
  • Also, if your head parts and hair have different skeletons, scale/move them together to make sure they end up with the same scaling/position.
  • Mind the proportions. I try to take the eye and mouth positions in mind, and the size too.
  • Try to always scale uniformly (meaning, no individual X/Y/Z scaling), otherwise your character might look weird.
  • If your head comes a bit bigger on the back than the HS head, don’t worry, you can fix that with edit mode. Just try not to screw up the rest of the head.

Once you’re done moving and scaling both the head parts and hair, you have to apply scale and rotation, so while having the head parts, the hair and the skeleton (or empty object) selected, press CTRL+A->Rotation & Scale. No need to apply position, not yet anyways.

After having applied these, if you have skeletons, make sure they still work in pose mode. They should.

Now you need to edit the head’s neck:

  • Cut whatever you don’t need.
  • Try to use dissolve vertices/edges and the knife tool.
  • This is up to you, but try to not screw the UV map.

Now that you have a clean neck edge, you need to put the vertices of the new head at the same positions as the HS head’s neck edge vertices. This is to ensure that you get a 1/1 match with the body’s neck edge. The method I use is, select the HS head, get in edit mode, select a vertex at the edge of the neck, and snap the cursor there (SHIFT+S, Cursor to Selected). Then I exit edit mode, select the new head, enter edit mode, select the closest vertex to the cursor’s position, and now snap the selection to the cursor (CTRL+S, Selection to Cursor).

Once that’s done, you should have something close to this:

head_mesh_editing_finished

(mine has textures and all that jazz assigned to it, not really necessary)

Notice how the edges of the neck are the same as the original HS head edges.

Now’s a good time to modify the UV of the head if it’s a mirrored kind of UV (most games have this style of UV). If you don’t, you’d still want to modify the UV to have the blushes at the
right position. However, you don’t want to modify the original one yet, you’ll need it later.

So you’re going to create a new UV for it.

While in Object Mode, select the head mesh, and add a new UV map (Properties->Object Data->UV Map)

new_uv_map

This will create a copy of the selected UV.

You’ll also need to use something as a reference. In this case, we’ll use the blushing texture as a reference to know at least where the blushing should be.
In SB3UGUI, open cf_m_base.unity3d from abdatachara, and extract the texture cf_t_hohoaka.

Set this texture to your new head model (how you do it is up to you, the easiest way is to open the texture while being in edit mode and having the whole
UV selected).

Now, if you want it to show on top of your diffuse, you can use cycles rendering, and use this node set for your material:

nodes_material_set

You can change the diffuse texture to one of HS’s face textures if you want to use that as a reference too (I do it).

Anyways, remember to only edit the new UV you created, don’t touch the original UV.

Once you’re done, you should have something like this:

new_uv_finished

We need to bake the original textures from the original UV to the new UV.

To do this, we use cycles rendering and nodes.

If you used nodes to have the blush texture on top of the diffuse, you can modify that one.

So, set your nodes like this:

bake_nodes

Make sure you select the 2nd texture slot like in the screenshot (bake target) before baking, this is to tell blender that’s the one you’re baking onto.

Do this for as many texture types your face uses (diffuse, normal, specular, occlusion map, etc). You probably have at least the first 3, unless you’re
importing from a really old game (which I don’t recommend).

My result:

original_uv new_uv

Original UV

New UV

NOTE: If your texture looks too dark after baking, try removing the source’s alpha channel with Photoshop or something, then save to TGA. Blender seems to have a problem with baking textures like this
if they have an alpha channel.


Now, you might or might not want to do something similar with the eyebrows. In HS, we need to be able to color eyebrows. Most games won’t give us
separate eyebrows meshes. What I do in this case is make a duplicate of the head, remove every vertex besides the eyebrows zone, and do something
similar to the previous process, only this time I manually recreate the brows with Photoshop (else they’ll look really low res up close, they are).
I might make a different tutorial about this later, since it isn’t the main scope here.


Also, for eyelashes, if they’re separated in top/bottom or right/left, you need to join them. If the different pieces use different UVs and different textures, you can join them manually and fix the UV accordingly. That’s what I do. I have no guidelines for this, so you’re on your own at this step, sorry.

From here on, you can edit the textures to look like the HS ones (brightness, levels, etc), or you can continue. It doesn’t matter because as long as you keep your current progress saved somewhere else (even a different layer in the scene is fine), you can bake again from the original texture.


Now that we’re done with all this, we want to see if everything works ingame. So the first thing we’ll do is change all the headparts “point of origin”.

When you select an Object in Blender, if you’re in Global view, you’ll notice a white circle somewhere in the 3D space. This is that object’s point of origin.
Then there’s the cursor, which is the white-and-red circle, you can position it with SHIFT+S or the left mouse button.

What we need to do, is to change all the headparts’ point of origin to be the same as the HS’s head. That might include the hair (importing the hair isn’t very
fun so I’m leaving that for last).

So first, go to wherever you’ve put your HS head (hopefully a layer different from where you’re working in), select the HS head in Object mode, then
SHIFT+S->Cursor to selected.

cursor_to_hshead

Go back to where you’ve been working on your character’s head.
Select all the head parts it needs.

While in Object mode, go to Object->Transform->Origin to 3D cursor.

You’ll notice all your head objects will have their origin set to the same as the HS head.

From this point, you need to make a copy of all the objects, because we’re about to do actions that cannot be undone, but we’ll still need this old stuff,
so copy all the objects to a new layer, and switch to that layer.

  • Select every object in the new layer, and remove every vertex group you might have.
  • Also, for the head, remove the old UV, since you want the new one in the game. Delete the skeleton and/or empty axes.
  • If your objects move from the ground after doing that, just put them back at 0,0,0 with the usual methods.
  • Have in mind that you might want to use HS’s eyeballs, since that way you don’t have to remake the UV for the eyeballs too. So we’re going to ignore the character’s eyeballs, and fix the HS eyeballs later to fit the new head.
  • Select all the objects and rotate them in x-90, and then apply scaling and rotation (CTRL+A->Rotation and Scale).
  • Take the HS head skeleton from wherever you’ve had it all this time, duplicate it and move the duplicate to this head layer.
  • In the head layer, for every head object, create a new Vertex Group called “cf_J_FaceRoot”, and assign all vertices to it.
  • Select every object, and then select the HS head armature (I just select all with A, then select the armature again by right clicking on it twice), and parent the objects to the armature (Ctrl+P->Armature Deform).

Finally, select everything again, and export to FBX using these settings:

Export Settings Page 1

Export Settings Page 1

export_fbxfromblender_1 export_fbxfromblender_2

Export Settings Page 3

Export Settings Page 4

export_fbxfromblender_3 export_fbxfromblender_4
  • Open your new unity3d file in SB3UGUI, and open the p_cf_head_02 animator.
  • Click on the tree root, and in Avatar, click on Virt. Avatar.
  • Open the FBX you exported from Blender.
  • If it throws an error about faces needing to be triangulated, go back to Blender and triangulate any meshes that have square faces.
  • Begin replacing the meshes, one by one.
  • Replace the head for the new head, the mouth for the new mouth, the tongue for the new tongue, the brows for the new brows, and the eyelashes for the new eyelashes.
  • Remember to recalculate normals. Use the usual low 0.000001 for objects that might have seams here and there. Default otherwise.

VERY IMPORTANT NOTE: Your new mesh should have the same vertex count as the mesh in Blender. If it doesn’t, you’ll have problems later with morphs. Make sure your UV is continuous,
meaning no separated vertices at places they shouldn’t be separated, overlapping vertices, etc. The UV can cause all kinds of havok if you’re not careful.
If you have problems with this, post in the thread, I’ll try to help you, but please, first make sure you don’t have obvious overlapped/separated vertices in the UV.
Some non-obvious ones are at the eyes and mouth section.


Check that everything is in place, and then save. Now go see if our (current) monstruosity works. Go ingame, go to the chargen, and select your new face type.
Yes, right now it probably looks horrifying, but hey, it’s working.

With this, we can confirm that we’re on track.

Let’s fix the eyes now. Remember I said using the HS eyes is ideal? Well, we’re going to export the eye meshes from HS.

Open cf_f_head_00 again. Extract both cf_O_eye_R and cf_O_eye_L from p_cf_head_02.

Ignore warnings.

export_eyes

Import them into Blender, preferably in a new layer. Use the same FBX import settings you used for the head (look higher in the guide).

HS_EyesHSeyes_and_newhead

What we’re going to do is modify the HS eyes to fit our new head. To do this, I use pose mode to move the eyes where I need them (bones cf_J_eye_rs_L and cf_J_eye_rs_R). You’ll need to move them in parallel. So take notes of what you’re doing with the right eye, and do the same with the left eye, but in the contrary direction in X. I use the character’s eyes as a reference on how to position the HS eyes.

Once I’m done, I select the eye meshes, and apply the armature modifier in both of them. This applies any scaling/rotation/etc you might have done.

Now I select all the bones, CTRL+A->CTRL+R/CTRL+S/CTRL+G to remove any pose.

Set the eyeballs origin point to 0,0,0 (you should know how by now), reparent to the eyes armature, rotate in x90, and check if the eyes still move properly,
if they don’t rotate out of the new head’s eye sockets, etc (use pose mode to this, but remember to not apply any pose or anything).

This is my result afterwards:

eyes_ready

Now export to fbx with the usual settings.

Then import them into each eye, recalculate normals, and preview.

Now here’s a problem. I’ve not been able to find a perfect way to get the eyes working in a neutral position from the beginning, so the best you can do from here
is use the sliders to position them correctly. I can tell you that these sliders can now control the depth and position of the eyes, besides the sliders at the eyes section.

important_sliders

If even with this they’re still missaligned, you need to go back in blender, scale down a bit each eye, apply scaling and position, re-export from Blender, re-import with SB3UGUI, then test. It’s pretty much a trial and error nightmare, but I’ve not found a better way to do it.

[MATERIALS AND TEXTURES]

You should already have the textures you baked with Blender (diffuse, specular, normal).

Go to the chara directory of the game, and copy cf_m_face_00.unity3d. Rename it to whatever you want. Open it in SB3UGUI and change its CAB.

If you made a directory for your mod, put it there.

Go to abdatalistcharacustom_trial, then open up your list file. In the first line of the list, in the 14th field, you must set the path to the new material asset. Remember to apply and save, it’s a common mistake to just save the asset bundle, it happens to me.

Once done, go ingame, see if your face still works. If it doesn’t, check the log of the game, maybe it didn’t load the material file and you have to change the inventory offset.

Also, if as of writing this guide, SB3UGUI still can’t link to external materials, you’ll need to also take materials from the “master” material asset bundle. You can mark them to be copied from mat_cha_00.unity3d and paste them in your head meshes asset bundle. The materials are:

  • Eyes shadow: cf_M_eyekage_01
  • Eye Highlights: cf_M_eyelight
  • Eye balls: cf_M_eyewhite_01
  • Head (might not be necessary): cf_M_head_00
  • Eyelashes: cf_M_matuge
  • Eyebrows: cf_M_mayuge
  • Tears: cf_M_namida
  • Tongue: cf_M_tang
  • Teeth: cf_M_tooth

After copying them in your corresponding head meshes asset bundle (mine is christie_head.unity3d, so that you have a reference), go in the animator and assign each material to their respective mesh (eyelashes uses cf_M_matuge, etc).

When you’ve confirmed that it works, close the game, and in the new material file, replace the specular in the file with your specular. There’s also the oc file, which I
suspect is occlusion map. You might want to replace it now, I just take the diffuse, try to reduce highlights and desaturate to 0. Another method is to make an actual occlusion map in Blender, but that’s up to you. Frankly, the SSAO in the game isn’t very high quality, so you might not even care.

In chara, copy cf_t_face_00.unity3d, again, put it wherever your mod files are. Rename. Open in SB3UGUI, change CAB, save.

Go to the list directory, open 00.unity3d and your list. In 00.unity3d, select cf_t_face_00, and mark for copying. Then in your unity3d, paste all marked. Now close 00.unity3d.

Open your new list. In the first field goes the ID, I recommend starting from 250050. Second is the order, whatever. Third is the name. Fourth is the path to the file with the textures. Set it to the file you created a while ago. The other fields pretty much point to the texture to use. Take note of these since you’ll be replacing them in the textures file.
Apply the changes, then save.

Go ingame to see if both the new file and list work.

new_skin_slot

Now let’s replace that skin in our texture file. Close the game, open said texture file. Remember I told you to take note of the used textures? Replace each with diffuse and normal respectively.
Save the file.

Now let’s see if they work ingame.

new_skin_textures_1

There we go. But it looks orange. This is because the game requires really pale diffuses and specific levels for speculars and object speculars. Here’s one part I can’t really help you with. You’ll have to modify your diffuse until it looks fine to you, same goes for the specular. Good luck.

You can edit these now, or you can wait and do it later. We’ve still got lots of work to do.

We’re done with the face for now.


NOTE: This small section only applies if you removed the brows from the textures and put them in their own mesh.

[BROWS TEXTURES]

  • Go to the chara directory, copy cf_m_eyebrow_00.unity3d, you should know what to do with this by now.
  • Replace the first eyebrow texture (cf_m_eyebrow_00_00_00) with your new texture. Save the file.
  • Go to the list directory, open 00.unity3d and your list file. Copy cf_m_eyebrow_00 from 00.unity3d to your list file.
  • Remove all lines except the first one.
  • Change the first field, begin maybe from 251050.
  • 4th slot’s the name.
  • 5th is the path to the material and texture file, set it.
  • 6th is the material name, change it if you used another one.
  • Go see if it works ingame.

new_brows_working

Here ends the brows section.


 

[Eyelashes textures]

  • Go to the chara directory, copy cf_m_eyelashes_00.unity3d, rename and change its cab.
  • Open the new file.
  • Replace the first eyelash with your new eyelash.
  • Save the file.
  • Go to the list directory.
  • Open 00.unity3d and your list file.
  • Copy f_m_eyelashes_00 from 00.unity3d to your list file.
  • Close 00.unity3d.
  • Open the new list in your list asset.
  • 1st field is the ID, start by 252050 maybe.
  • 4th is the name.
  • 5th is the path, set it.
  • 6th is the material, change if necessary.
  • Apply the changes
  • Save the list
  • Go see if it works ingame.

new_lashes_working

[MORPHS]

If you have a skeleton, this part is easier, because you can do every head part expressions at the same time, and if you ever need to change something in the mesh that messes around with the vertex order or count, you can do it and then remake the expressions real quick.

If you don’t have a skeleton, then you might be able to merge every mesh, make the shape keys, separate, and then export the main head parts from the base shape.

  • Take your head parts and the skeleton to a brand new scene (or new layer, whatever you think is tiddier). Just select them all, CTRL+C, create a new scene (use copy settings), then CTRL+V in any layer.
  • Here, provided you have a skeleton, you need to know about how to make poses in pose mode, and make keyframes out of this.

Here’s a quick rundown on pose mode and pose library.

  • To enter pose mode, you select the skeleton, and then change to Pose Mode.

pose_mode

  • When you’re in pose mode, you can translate/rotate/scale the bones and save that state to a pose library.
  • To manipulate the bones, use what you usually use to manipulate anything else.
  • To create a pose library, go to object data while in pose mode, then in Pose Library, click New.

create_pose_lib

  • You can name the PoseLib to whatever you want. I named it DoA_GenericPoseLib.

renamed_pose_lib

  • So, great, now we have a pose lib. To create a new entry, while in Pose Mode, select all the bones you need in the pose,
    then use Shift+L->Add Pose. This adds a new Pose to the Pose Lib.
  • To apply a pose, you again select all the bones in Pose Mode, and then click on this button.

pose_lib_apply_pose

  • To modify a pose, while in pose mode, select all the bones, Shift+L->Replace existing->Select pose to replace.

Important Notes Before you start making expressions:

  • Go into SB3UGUI, and check the head parts morph orders. Namely, the head’s.
  • You need to make the poses for the face in this same order! Sadly, we still can’t reorder the Poses saved in the Pose Lib.
  • So you should start with e00_def_cl, and finish with k56_name_b.
  • Please, name the poses the same as the morphs you find in SB3UGUI, this is to ease the morph renaming later.
  • The poses called “head shape something” are not necessary unless you want to modify your head’s shape in some particular way.
  • Other head parts have different names, but they all begin with the same prefix before the _, so don’t worry about it right now.
  • Also other head parts might not need all the morphs the head needs, but removing morphs from an Object is easy and can be done later, so don’t worry about it while making poses.

Familiarize yourself with this and with the pose library, it’s really useful and I actually use it later to name my morphs.

What I like the most of using a pose library though, is that if I’m importing more than one character from a set game, and they both use same-ish skeletons (same bone names, mostly same positions), I can use any previously done pose libraries on the new character, and just tweak the poses where necessary. This really saves me time.

If you don’t have a skeleton though:

  • Merge every head part.
  • Use shapekeys to make morphs in edit mode.
  • When you’re done, separate each head part.
  • If you’re in 2.77, install the “Corrective Shape Key” add-on.
  • Select a head part.
  • Select its base shape.
  • In the shape key pannel, click on the black down arrow.
  • Click on “Create Duplicate for editing”.
  • A new object (a duplicate of that shape with no other shape keys) will be created.
  • Weight this new object to the usual bone.
  • Export to fbx and replace the main head.

The problem with this method, is that whenever you need to edit expressions that require you to edit all the face parts, you have to repeat everything from the third step. This is to make sure your vertex order stays put, since merging everything and then separating causes vertex order to change.

I can’t give you more details on doing this without a skeleton, because I’ve not done it with no skeleton, but in theory, it should work.

So, let’s say you’re done with your poses, they’re correctly named and in the right order.

finished_poses

We’re now going to create keyframes out of our poses, 1 per pose to be exact.

Advance a frame in the timeline (use the left/right arrows to move from frame to frame). You can see the frame counter in the 3D window:

frame_counter

Next, we use scripting. Set any of your windows in Blender to the Text Editor, and create a new text, name it macro_keyframes:

text_editor

Now, paste this code:


import bpy

from mathutils import Vector, Matrix, Quaternion, Euler, Color


context = bpy.context




cont = bpy.context.area.type

print(str(cont))


cur_scene = bpy.data.scenes["Change this to your Scene name"]


bpy.ops.poselib.apply_pose(pose_index=cur_scene.frame_current-1)


bpy.ops.anim.keyframe_insert_menu(type='WholeCharacter')


cur_scene.frame_current += 1

Change the scene's name in the code to the name of your scene. Mine is Morphs, so I put "Morphs" there, with the quotes.
While having your skeleton in pose mode, select all the bones, and then in the text window, press Alt+P.

If you did everything right, you should see the skeleton applying poses automatically, and it will create keyframes out of them automatically, while
also advancing the frame counter automatically.
You can see the keyframes if you set any Blender window to Timeline. They get marked with a yellow line.

Now, press Alt+P as many times as you need (once per pose) until you get the frame counter up to the amount of poses you have.
Should be 115. Leaving Alt+P pressed also works, just be careful not to get past 115 frames.

Now, you should have 115 frames in the frame counter, while your Pose Lib has k56_name_b selected.

keyframes

Now that we have our keyframes, we need to export them to Lightwave Point Cache (.mdd). This format is pretty much the keyframes converted to shapekeys.
So, go back to the very first frame (0), select the head only , and export to .mdd.

export_mddexport_mdd_head

Do this for every head part. And yes, use 115 for the End Frame in every export.

Duplicate every head part, and move the new dups to a new layer. We no longer need the skeleton, so if you duplicated it too, delete that duplicate. Don’t delete the original though, if you want to tweak expressions later, it’s a good idea to keep your rigged face, and we’ll need it to rename the expressions anyways.

If your objects get moved to Z+ when deleting the duplicated skeleton, just select them and press Alt+G. Don’t know why it happens, but this fixes it.
If you’ve done everything right, your objects should all be aligned. Also, press Alt+A to apply scale and rotation. Else your morphs will also rotate the head in 90x.

expression_targets

Select the head, then import the head .mdd. Leave the settings at default.

import_mdd

Now see if your morphs work by going to Object Data (triangle and points icon) and from there to Shape Keys. Pin the first morph.
Should be the blinking morph.

Now do this for every other head part. You might notice that the first two shape keys are the same (not counting Base, leave that alone!)
Delete frame_0000 in every head part.

Let’s rename the morphs now. Take this script, and make a new text to run it:


import bpy
import os
from mathutils import Vector, Matrix, Quaternion, Euler, Color

context = bpy.context

os.system(“cls”)

poseList = [‘Basis’]

rig = bpy.data.objects.get(“Copy the name of the armature with the Pose Library here”)
pl = rig.pose_library
i = 1
if pl != None:
# Print the name of markers in the Pose Library.
#    pose_index = pl.pose_markers.find(“e00_def_cl”)
#    pm = pl.pose_markers[pose_index]
#    print(pm.name)
for item in pl.pose_markers:
poseList.append(item.name)
print(“Pose ” + poseList[i] + ” appended to list successfully”)
i+=1

i = 0

dest = bpy.data.objects.get(“Copy the name of the current mesh to rename shape keys at”)
sks = dest.data.shape_keys
skNames = sks.key_blocks
for sk in skNames:
sk.name = poseList[i] #+ “_sita” #uncomment before the + and change _sita for whatever you’re naming, check SB3UGUI for names, _sita is tongue morphs
i +=1


Go to the layer where you still have your skeleton, copy its name. Paste it where I tell you to paste it in the script.

armature_name

Go back to the layer with your shape keys, and get the name of the head part you’re renaming shape keys for.

mesh_name

Now, press Alt+P in the text window while being in Object Mode. If you did everything right, you should get no error, and your shape keys
should be automatically renamed in order.

Do the same for the other head parts, and have in mind what I commented there, the other head parts have a suffix depending on the head part.

If the Basis gets renamed, just rename it back to Basis.

renamed_keys

Once you’re done with every head part, select the Basis shape, and in Object mode, rotate it back to -90x, then apply scale and rotation. Then, export every head part to FBX, with the usual settings.

Now, go to SB3UGUI, open your character’s .unity3d, open the head parts FBXs in SB3UGUI.

  • For the head, you should end up with 114 morphs (both prefixes, e and k).
  • For the mouth, 56 (prefix k).
  • For the lashes, 58 (prefix e).
  • For the brows, 58 (prefix e).
  • For the tongue, 56 (prefix k).

You might get less because some morphs don’t do anything to any vertex. I think this is a bug in the FBX exporter.
To fix it, I simply take note of which is missing (this can be annoying, yes), then go to blender, select that shape key, enter edit mode, and move a single vertex
by 0.001 or something in any direction. A vertex that isn’t in plain sight is better. Then re-export.

If you get more, you might have slight, unexpected modifications in vertices at some empty morphs. Just delete these in Blender, then re-export.
I try to keep every head part with the kind of morph it needs. For example, lashes don’t need kXX prefixed stuff, only eXX prefixed. So you can delete any morphs that head part doesn’t use in the original HS head.

Anyways, to import the morphs, select the keyframes (the root of the tree), then drag and drop it to the morphs tab of the animator.

Here’s the lashes for example (because I already tested the head, sorry):

adding_morphs

Notice the name I set for them. Again, this depends on the head part, take a look at the original cf_head_00.unity3d for the names.
If you screw up somehow (wrong amount of morphs, morph rotating your head part), I think it’s easier just reopening the file and redoing your changes,
since currently we don’t have any way to delete all morphs with a single button.

Once you’re done, and you’ve verified that you have the same amount of morphs and morph groups than the original cf_head_00, save.

Finally, test ingame:

morphs_working

Good, we have our morphs working as intended.

[Hair]

Go to Hair Importing Guidelines Post…

That would be all.

86 thoughts on “[HS] Guide(lines) to Import Custom Head Meshes”

  1. That sounds like you didn't remove extra vertex groups. When you have a single one like I do in the guide, that error shouldn't happen.

    Go back to Blender and make sure you did remove any extra groups. If you need them though (maybe you copied the vertex groups from the HS head?), limit the weights with the Limit Total weight paint tool.

  2. Yes, you can import anything you want as long as you're willing to work. If you want to import from DoA5 and have the game, I recommend using the latest Archivarius and the latest TMC importer, since that way you get the original, functional face bones.

  3. Right now, I'm trying to add a costume in the game, not a head.
    Information about how to do it is really scarce and your tutorial is the only thing I found so far.

    I'm done replacing the meshes while importing them.
    But the result is really bad, the meshes are all distorted and out of place, in game it looks even worse.

    I don't understand what's going on, as I made sure I export using the same settings you show in the tutorial.

    I get this error while importing:
    Warning! Avatar computed for Transform cf_J_Root as skeleton root

  4. Sounds like you're forgetting something in your workflow, like maybe you forgot to rotate your objects (except the skeleton) in -90x and then apply rotation and scale or something.

  5. Have no mesh editing skills at all, just curious is this possible with any mesh from any games at all? Say like Harley Quinn from the Arkham games, I know her head is exportable since there are plenty of SFM gifs and videos of here out there.

  6. hey Roy, Thanks for you sharing character mods and I found them so awesome, but sadly I still have no idea how to make one for my own even though I tried to follow your guide. I am a big fan of DOA5, especially obsessing with Marie Rose, so I and other fans will be like over the moon and cannot thank you enough if possiblely you make a Rose character mod !

  7. What an amazing(and long,too :P) guide, roy! May I translate it to another language and put it on another website(www.zodgame.us)? I'll include your link on that site. Thx!!

    1. A single one, since you have to carefully go one by one until you’ve snapped all of them. Sometimes you might lack enough vertices, or actually have too many, so you might have to dissolve a vertex or subdivide between two vertices to get a new one.

          1. yes, i did not cut the neck yet. Should i cut it before snap the vertices?

            Would you mind to share the .blend file for reference?
            thanks a lot.

          2. Yes, the order is as the guide says. Basically position everything first. Then cut the neck. Then snap the vertices. Finally fix any pointy stuff that is left after doing this, because there will be.

          3. Are you actually using the dissolve function? You select the vertex/edge/face, press DEL and click on Dissolve. This should not mess the UV, it in fact helps to keep it intact.

  8. Hello Roy, i’m still new at this. I tried your procedure and it works fine, thanks a lot for doing this !!! Now i’m wondering, if i had a head ready and it works in game and i want to edit it in blender to sculpt some things what would the procedure be ? The steps i’ve figured and think are correct are to export the head with sb3u as .fbx,import with blender sculpt it, export it and now what ? I have to do all the procedure from your guide again ? Sorry if it’s stupid question but i just started messing with blender and sb3u 3 days ago xD

  9. I think, that a more general question would be, after exporting a .fbx file and editing it, how do i make it back to a unity file with sb3u ?
    I know you’ve written this “Open your new unity3d file in SB3UGUI, and open the p_cf_head_02 animator.
    Click on the tree root, and in Avatar, click on Virt. Avatar.
    Open the FBX you exported from Blender.
    If it throws an error about faces needing to be triangulated, go back to Blender and triangulate any meshes that have square faces.
    Begin replacing the meshes, one by one.
    Replace the head for the new head, the mouth for the new mouth, the tongue for the new tongue, the brows for the new brows, and the eyelashes for the new eyelashes.
    Remember to recalculate normals. Use the usual low 0.000001 for objects that might have seams here and there. Default otherwise.” but how do i open the exported .fbx and replace the meshes ?

  10. Sorry for the spamm, i figured it out, you drag and drop the exported .fbx (created in blender) in sb3u and then open in sb3u the unity file and draag and drop from the trees to the corresponding tree in the unity file. But now i get a black face xD i’ve not imported the material and textures correctly ? 😛

  11. Hehe, what a long day… I’ve managed to make it work plz ignore my above posts since i can’t delete them… For some reason when i load my .fbx into sb3u i have to change the bone scaling to 1 for x,y,z cause it is set to 0.1 and the root is really small 😛 Although i import at blender with scale 100.0 and export with 1.00. Anyway now i have no animation on face after altering something, i’ll give start looking into it next time i have time. if you could point me in the right direction i would appreciate it. Thanks again and sorry for all this spamm, if you can just delete my above posts, sorry 🙁

  12. Are you familiar with “The Klub 17?” If so, they have a face generator with their program that allows you to create characters from actual pictures, for example Facebook photos.

    Is it possible to create an app like that for Honey Select? I am not very skilled on a computer and do not wish to create a characters from scrap.

    Thanks in advance.

    1. I’ve played it, but it’s so outdated it requires too many modifications to make it look recent, and with so many modifications it can take a long as fuck time to load a single scene.

      Nothing like that exists for Honey Select, no.

  13. Hey, Roy12,
    Awesome guild. I have not yet followed closely to learn how to do this, but thank you.
    I am working on porting Motoko hair and armor from ghost in the shell first assault online game to HS, they really have some good model there. But I am stuck at texture uv mapping in Blender. And I don’t know if the armature is compatible with HS. I definitely need some help with this.
    I can treat you a meal($10 donation) if you help me out a bit. Let me know what do you think.

  14. Hey everyone,

    when importing the fbx with the HS rig, SB3UG gives me an error “vertices with more than 4 weights”.

    Also, I can see my head mesh in-game however it is completely black? Does that mean textures are missing or something else?

    Thank you!

  15. Hi roy12, nice tutorial.
    I am following up these steps to try to import the head of 2B from this DOA mod by huchi001 (http://huchi001.deviantart.com/art/RELEASE-2B-UPDATE-4-674273505).

    It was good until I was stuck in the step of UV making just after I modify the mesh’s neck matches the original HS head. I did add a new UV, however I am confused by the following steps.

    1. are setting the blushing texture cf_t_hohoaka on the new head, using cycles rendering and material node two options(two choose one) or two steps(do both)?

    2. where is the original HS face texture? the one I find is weird (upside down after export by SB3U, a BUG of SB3U?).

    3. the UV you did in this screenshot (https://lh3.googleusercontent.com/-GBxNoyFBjxk/V9dzeM8DiyI/AAAAAAAAAa0/P5qrH6D7ZXY/s1600-h/new_uv_finished%25255B2%25255D.jpg) is different from mine (http://imgur.com/a/bSeiQ), should I modify/deform the UV to perfect match the face texture of the original head of HS? if I should, how to make it perfect match?

    sorry for these long questions.

      1. Hello.
        1. For cycles you need to use nodes, so it’s more like everything is a single instruction.
        2. You can export the texture directly using Assets->Export, that way it comes out fine.
        3. No need to match it perfectly fine, as long as the blush fits fine. In your case though, your UV seems too big, you need to fit it all in a square. I really recommend that you research UV mapping before continuing, since you’ll want to fit the back of the head without screwing up the face. Is that the original UV or did you unwrap? Nowadays I prefer leaving the original alone, just mirror when it’s necessary, I just want the blush to fit. But some models require you to even create it from scratch, so here’s some tips that might help in said cases: https://blenderartists.org/forum/showthread.php?103883-Girl-Portrait-(Finish-en-klaar-))&p=958433&viewfull=1#post958433

        1. Thank you for the helpful reply. : )
          I am going to do the UV mapping research and the tutorial you show me.
          It is the original mod’s UV that I made a copy. the UV of the back of the head is big and also the distance between eye and ear is greater than HS head. Thus you mean I should shrink this parts (back of the head, distance between eye and ear) to make the UV fit in the square of HS texture? Will the deformed UV which is different from the original mod’s UV affect the future steps a lot (such as map the original mod’s texture on the mesh)?

          1. As I said, no need to match it to HS textures unless you really want them to work on this head mesh. You do need it to fit in the square though. What I usually do is reduce the parts I care less about (the back of the head, the back of the ears, everything that can’t be seen on camera).

        2. the tutorial is helpful, I think I am getting there, just need to deal with some overlapping when I shrink the UV. need more practice.

          thank you!

  16. Hi Roy12, me again. Thank you for your last reply that helps me pass the head section, I get the head in the game now, the head is black because I know I have not gone to the texture section yet.

    right now I am working on the eye section. I get confused about those steps. I did scale and move the bones (cf_J_eye_rs_L and cf_J_eye_rs_R) in pose mode to match the eyes. Then I apply the armature modifier to the meshes. And I did choose all the bones and ctrl+A to apply pose as the rest pose. then here is the problem. CTRL+R/CTRL+S/CTRL+G these three hotkeys looks like they are about rotation scale and movement, however they are something like quick save. Are we still in the pose mode at this stage? I did shift to other modes, however, these hotkeys are still not about the rotation scale and movement. Did I do the steps wrong? should I choose the bones and use ctrl+a in object mode to apply rotation scale and movement of the bones?

    1. Also I find a weird ingame display problem the eye looks bright white and empty (http://imgur.com/qJjNGOJ).
      I redo a test version which is only the very first part of the tutorial (before the step [Getting the original head for reference]), I find out the problem still exists with the HS head (http://imgur.com/dGqLgkf), but in your preview the eye exists (https://lh3.googleusercontent.com/-8LRHvsD3Ir8/V9dw_wNkh5I/AAAAAAAAAVM/bSFmBfotS3A/s1600/new_face_in_list_working%25255B2%25255D.jpg), I double check the steps, no step is missing. What did cause this problem?

        1. I don’t think the problem is the list. I think your head is still using an external material or something. Try getting the material the head uses from mat_cha_00 and paste it in your asset bundle.

          You can also use one of the modded head asset bundles.

  17. Thank you roy12 for keep answering my question, the eye texture fixed, I paste the material and relink the mesh, material, and texture just as you said. I think I am getting closer.

    This is the current stage I am working on:
    In the eye section, I saw you rotate x90 to after reparent to the eyes armature. which rotate the eye mesh back to the bone. This time you did not rotate x-90 before export. thus in the SB3U I saw the eye is off (looks like it needs X-90 rotation). However, even though I rotate x-90 the eye still a little bit higher in the game (just like I did not do any change: http://imgur.com/Sr6snQn). but I did match it with the face in blender (http://imgur.com/RJDklQQ)

    Question:
    1. x-90 rotation before exporting eyes is required or not? if it is not, how can I fix the misplacement of the eyes? should I modify the setting when I replace the mesh of eye in SB3U (http://imgur.com/w0bIcV5)?

    2. In the tutorial, you said “Now I select all the bones, CTRL+A->CTRL+R/CTRL+S/CTRL+G to remove any pose.”
    In pose mode, ctrl+A can apply pose as the rest pose, but CTRL+R/CTRL+S/CTRL+G is not about removing pose, where do I use these hotkeys? I have tried other mode, seems not right.

    1. Glad it worked for you.

      I usually don’t touch the eyes meshes, because you have to reposition them anyways ingame, and the best way is by having WideSlider, as you might have to go over 100 or below 0 sometimes. I just adapt the eye texture to the HS eyes and then position the eyes carefully in the maker (your head should stay in place).

      As for removing poses, sorry, I meant only A (to select all bones), then you do press CTRL+R/S/G to remove rotation/scaling/translation.

  18. I followed the file preparation procedure but when I go to test it ingame, game crash. Let’s say this part of the tutorial creates some confusion. For example, there are information like: delete everything except cf_f_head and change the fields that do not match the images, such as chara / cristie / cf_xx_material, ext … which are not being prepared. However, step by step, when I come to test ingame the game crash. Any idea where I am wrong?

  19. It´s very interesting this tutorial, I´m trying to add some custom heads, but I need more experience at blender, could u upload a video tutorial, It could be more helpfull to us (noobs).

    Thank u in advance.

  20. Hello, roy12!
    Thanks for nice tutorial & scripts (though I had to fix it a little…)

    Now, I’m facing a trouble about morph importing.
    My Morph Clip can’t be added. I selected cf_O_head, and dropped new morph clip (named as “bs00_eye”) above Morph tab. But it did NOT be added.

    Log window said these.
    “Couldn’t find SkinnedMeshRenderer of morph clip bs00_eye. Skipping these morphs”
    “The SkinnedMeshRenderer cf_O_head’s Mesh has no matching submesh with 2631 vertices for morph keyframe e00_def_cl. Skipping this morph”

    I don’t know why SB3U “Couldn’t find SkinnedMeshRenderer”. In addition to this, SB3U said my head mesh has 2693 Verts. but in blender, it has 2631 Verts as Log window said. Is this related to my problem? How do you think?

    1. Check your UV map. Island seams will cause vertices at these areas to get separated. Morphs don’t automatically get separated.

      So try splitting vertices at island seams.

      Also be careful with loose vertices.

      1. Wow, You’re right!!

        Imported head mesh had unexpected splitted vertices.

        I re-exported head mesh, and revealed splitted area in blender.
        That was a hard work, but went very well.
        Finally, My morph clip was added successfully.

        Thank you for great advice!

  21. Hi Roy,

    I am currently doing a head mesh import and I’ve encountered trouble in regards to importing the morphs into HS. I thank you in advance for reading this and providing any insights that may help me resolve this issue.

    So I’ve done the eye expressions for head mesh (all 58 keyframes/morphs) and was trying to see if it works in HS.
    But cycling through the eye expressions in HS’s character editor shows me that the morphs are not applied or recognised by the game. The only thing that is applied is that pressing that “Hlook” button slightly closes the eyelids of my characters, as it should, so importing the morphs did do something, somehow to the mesh, but the normal eye-related expressions are not shown/applied in the game for some reason.

    For trouble-shooting purposes, these are the steps I took to import the morphs to HS.
    1.    Firstly, I used Blender for 3d editing.

    2.    I selected the head mesh with the 115 shape keys (Basis+114 Hs morphs), and exported it from Blender in fbx format with the fbx add-on.

    *I made sure that the basis shapekey was selected and that blender file was on frame 0 when I exported the head mesh.

    3.    I opened my character’s head mod file in SB3U, selected the head mesh in SB3u and click the “morph” tab.

    4.    I dragged the FBX file onto SB3U to import the morphs within the file.

    *here’s one potential issue that I am unsure of: when I dragged the FBX file onto SB3U the log window showed me lines such as “Warning! Weight for flat Blend-Shape e00_def_cl not found! Using a value of 100” where e00_def_cl refers to the individual morph names.

    5.    I then dragged the morph file from the fbx import to sb3u’s morph window. 
    The prompt window appeared and I renamed the morph clip as “bs00_eye” so that it can be recognised by the HS game.

    *checking the morphs in SB3U show that the morphs do change the head mesh’s shape, in SB3U at least.

    At this point I opened up HS and entered the character editor to check the head morph:
    6.    Rotating through eye poses/expressions does nothing; clicking the Hlook button closes the eyelids halfway so at least something is applied, as mentioned earlier.

    ​​​​​​​
    So my question is, what exactly is missing? What did I do wrong such that HS does not show the individual eye-related head morphs?

    Thank you for reading up to this point, and I would appreciate any helpful insights to solve this problem. Thank you.

      1. Thanks for the reply, Roy.

        I’ve resolved the issue by redoing the sb3u file to re-import the mesh/textures/morphs. The morphs work correctly in-game now.
        Not entirely sure what was wrong the first time around, I probably missed a step somewhere.

        I did use an older version (1.10) or older version. But it’s good to know that newer version may cause particularly issues for future reference.

        Last of all, I’d like to personally thank you for writing this guide (and for providing all these wonderful mods) which helped me immensely. Thank you.

        P.S. Do you have any tips on what is the appropriate procedure for changing the diffuse texture (to make it look less orange) in-game?

        I’ve messed around with the Lightness and Saturation levels of the texture maps with GIMP to change the texture’s colour to a tolerable level in-game, but there’s still a somewhat noticeable difference of colours between the body skin colour and the head’s skin colour, particularly at the seams.

        I’m not 100% sure on whether this is the correct approach, and if there’s a better method that I am missing out on.

        1. Well, for textures is just the saying of “hit it until it dies”, only as “screw around until it looks good”. It’s too different per texture set to even be able to give any clues on it. Just try to get the face texture as close to the original’s overall color as possible. Same for the occlusion and smoothness maps.

  22. Hey Roy, I’m importing a head mesh of my own and I’m having a problem with copying and pasting the material assets from the mat_cha_00.unity3d file. It gives me the “Cannot implicitly convert type, unity plugin material to unity plugin shader. When I paste them to the head mesh asset bundle, the head completely disappears in game. My head mesh works before I do that so do you know why that could be happening?

      1. I found the problem, I was using a very old SB3UGUI that didn’t support that conversion. I upgraded to 1.5 like you mentioned in an above comment. Now I have another question regarding how you made the Lightning face texture a continuous one.

        I’m attempting to get Lumina and Serah’s head from FFXIII LR into HS but the face textures, of course, doesn’t match the HS faces. I saw the Lightning face texture you created for it. So my question is how did you get it like that? Did you create it yourself or is it a way to save the texture like that in Blender?

        1. You have to project from the original UV to your new UV. Keep reading the guide and you’ll get to that point. Also you have to edit these results to conform to the Honey Select skin textures colors and levels. I have my own method which involves Photoshop and Substance Painter, which almost always involves almost leaving them as a completely different texture. I’m not sharing these methods though, sorry, they’re too much work to put into a tutorial and they’re not always the same steps. All I can tell you is that you need to make them look as close as possible to the HS textures while also having them look nice, which due to the shaders being so weird involves a lot of trial and error.

          1. Ah, that’s what I thought. Good thing I have a lot of Photoshop knowledge, but anyway I appreciate all the help and the guide you made. I literally had 0 knowledge of Blender and the SB3UGUI and now I’m about to get two heads in the game. Again, thank you for all the help.

  23. Can any one guide me???
    So my question is. I love some hentai characters and some Japanese AV stars. So obviously there are no models or faces available of them in any source.
    I have knowledge in creating 3D models. Learned software’s like Maya in past. So am familiar with 3D software’s. IN THIS CASE AM WILLING TO MAKE CHARACTERS FACES FROM SCRATCH.

    So can anyone guide me through the process because I think I have to start models from scratch.
    What Process and Software’s I need to create characters for Honey Select?

  24. help! i only get a black face! i’m doing a soul calibur 4 mod, which isnt too too old but is pretty old. not exactly demanding an answer here but maybe pointing me towards what tutorials i need to learn would help.

    the whole baking and node bit gets a confusing for me. how does one set up nodes for a specific uv map and how does one edit one uv map and not the other? and how does one get the nodes to go one uv texture to the next?

Leave a Reply

Your email address will not be published. Required fields are marked *