- SB3UGUI (Lastest)
- Blender for 3D editing (I don’t know about others, you’re on your own if you want to use any others)
- Any good image editing software. Photoshop works.
- If you’re using Photoshop, you’ll need to get the DDS plugin for it. https://developer.nvidia.com/nvidia-texture-tools-adobe-photoshop
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.
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.
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
- 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.
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.
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.
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).
Now, expand the tree up to cf_O_head, and select the SkinnedMeshRenderer.
In export options, click on Export as is.
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.
You’ll ned to import this file in Blender.
To import the FBX into blender, use these settings (as of 2.77a)
Now the HS head has been imported into 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.
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:
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:
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.
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:
(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)
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
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:
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:
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:
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).
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.
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:
- 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.
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).
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:
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.
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.
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.
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.
- 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.
Here ends the brows section.
- 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.
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.
- 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.
- You can name the PoseLib to whatever you want. I named it DoA_GenericPoseLib.
- 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.
- 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.
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:
Next, we use scripting. Set any of your windows in Blender to the Text Editor, and create a new text, name it macro_keyframes:
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.
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.
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.
Select the head, then import the head .mdd. Leave the settings at default.
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:
from mathutils import Vector, Matrix, Quaternion, Euler, Color
context = bpy.context
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]
for item in pl.pose_markers:
print(“Pose ” + poseList[i] + ” appended to list successfully”)
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
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.
Go back to the layer with your shape keys, and get the name of the head part you’re renaming shape keys for.
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.
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):
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:
Good, we have our morphs working as intended.
That would be all.