19,386
edits
Paradox-01 (talk | contribs) mNo edit summary |
m (level 1 headers (=Text=) are the level used by the page title (notice that the font was the same size as the page title)) |
||
Line 1: | Line 1: | ||
=History of modding with Blender= | ==History of modding with Blender== | ||
Don't confuse XSI 2009 with Softimage 2016. XSI 7.5 was the last free version. Most of us had only access to XSI. So the maintaining of Softimage up to 2016 is irrelevant. --[[User:Paradox-01|paradox-01]] ([[User talk:Paradox-01|talk]]) 22:50, 15 May 2022 (CEST) | Don't confuse XSI 2009 with Softimage 2016. XSI 7.5 was the last free version. Most of us had only access to XSI. So the maintaining of Softimage up to 2016 is irrelevant. --[[User:Paradox-01|paradox-01]] ([[User talk:Paradox-01|talk]]) 22:50, 15 May 2022 (CEST) | ||
=geyser's tutorial= | ==geyser's tutorial== | ||
I ([[User:geyser|geyser]]) will temporarily use this page for a sorta tutorial describing how I am making a UE4-compatible Konoko using the head from Oni's "HD Konoko" mod by Leucha&SeverED and the body of a bikini-clad Lara Croft found on CadNav. The workflow is roughly as follows: | I ([[User:geyser|geyser]]) will temporarily use this page for a sorta tutorial describing how I am making a UE4-compatible Konoko using the head from Oni's "HD Konoko" mod by Leucha&SeverED and the body of a bikini-clad Lara Croft found on CadNav. The workflow is roughly as follows: | ||
#get the model from CadNav and fix its symmetry issues if any; | #get the model from CadNav and fix its symmetry issues if any; | ||
Line 23: | Line 23: | ||
*a homemade tool to automatically fix symmetry issues | *a homemade tool to automatically fix symmetry issues | ||
The workflow is still not ideal (the homemade tools are not yet fully-featured). So this may be updated later, when and if a quicker/cleaner workflow is developed. | The workflow is still not ideal (the homemade tools are not yet fully-featured). So this may be updated later, when and if a quicker/cleaner workflow is developed. | ||
==Get the model from CadNav and symmetrize it== | |||
===Get the model from CadNav and symmetrize it=== | |||
Getting the model from CadNav is obviously the easy part: there's this bikini-clad Lara Croft model, which has the right amount of detail for our needs, and a fittingly "toonish" texture style. We need the "naked" body for the possibility to add "torn" clothes or have clothing schemes with exposed arms, belly, lower legs etc. | Getting the model from CadNav is obviously the easy part: there's this bikini-clad Lara Croft model, which has the right amount of detail for our needs, and a fittingly "toonish" texture style. We need the "naked" body for the possibility to add "torn" clothes or have clothing schemes with exposed arms, belly, lower legs etc. | ||
Line 33: | Line 34: | ||
Once the topology is symmetric (except for the hair), you can apply an algorithm that detects vertex pairs and makes sure that their locations are perfectly symmetric along X (that way, Mixamo will have a fair chance to produce a symmetric rig). Blender has some algorithms for making a mesh symmetric. You can use them, or make a custom tool of your own, e.g., with the Autodesk FBX SDK (that's what I did). | Once the topology is symmetric (except for the hair), you can apply an algorithm that detects vertex pairs and makes sure that their locations are perfectly symmetric along X (that way, Mixamo will have a fair chance to produce a symmetric rig). Blender has some algorithms for making a mesh symmetric. You can use them, or make a custom tool of your own, e.g., with the Autodesk FBX SDK (that's what I did). | ||
==Auto-rig the model in Mixamo and symmetrize it again== | |||
===Auto-rig the model in Mixamo and symmetrize it again=== | |||
Once you have a symmetric mesh, you can export it to FBX (OBJ also works) and upload to Mixamo. Mixamo will ask you to place critical joints manually (elbows, wrists, knees and "crotch") on a front view of the character. It is not very precise, but do your best to place them somewhere sensible. | Once you have a symmetric mesh, you can export it to FBX (OBJ also works) and upload to Mixamo. Mixamo will ask you to place critical joints manually (elbows, wrists, knees and "crotch") on a front view of the character. It is not very precise, but do your best to place them somewhere sensible. | ||
Line 43: | Line 45: | ||
After you do all the above, you should have something like this: http://geyser.oni2.net/UE4/LaraTutorial/LaraAfterStep2.blend (the dummy leaf bones added to the toes, fingertips and head top are optional - if you have those, then the actual leaf bones will roundtrip better through FBX; otherwise their length and roll value may change arbitrarily - possibly a bug of Blender) | After you do all the above, you should have something like this: http://geyser.oni2.net/UE4/LaraTutorial/LaraAfterStep2.blend (the dummy leaf bones added to the toes, fingertips and head top are optional - if you have those, then the actual leaf bones will roundtrip better through FBX; otherwise their length and roll value may change arbitrarily - possibly a bug of Blender) | ||
==Constrain the rotation to the straight T-Pose== | |||
===Constrain the rotation to the straight T-Pose=== | |||
The Konoko from Oni (and, to a lesser extent, Mixamo's own X-bot) come with a very straightened-up T-Pose, where all the bones are aligned with world axes (so, very much unlike Lara, whose T-Pose is a bit casual, with non-vertical legs, curled fingers etc). To adjust Lara's size and proportions to Konoko's, we will need to put Lara into a similar "straight" T-Pose first. In Blender, this is done by adding "copy rotation" constraints to a skeleton's bones. | The Konoko from Oni (and, to a lesser extent, Mixamo's own X-bot) come with a very straightened-up T-Pose, where all the bones are aligned with world axes (so, very much unlike Lara, whose T-Pose is a bit casual, with non-vertical legs, curled fingers etc). To adjust Lara's size and proportions to Konoko's, we will need to put Lara into a similar "straight" T-Pose first. In Blender, this is done by adding "copy rotation" constraints to a skeleton's bones. | ||
Line 52: | Line 55: | ||
You may have noticed that the spine of Lara's casual pose was actually mostly straight to begin with: it just leans backwards a bit and then bends forwards again starting at the neck. So mostly we are just straightening the leg chains, the shoulder-arm chains, and the fingers. | You may have noticed that the spine of Lara's casual pose was actually mostly straight to begin with: it just leans backwards a bit and then bends forwards again starting at the neck. So mostly we are just straightening the leg chains, the shoulder-arm chains, and the fingers. | ||
==Match the size and proportions to Konoko== | ===Match the size and proportions to Konoko=== | ||
Now we import HD Konoko, for example from [http://geyser.oni2.net/UE4/LaraTutorial/KonokoHD.zip HERE] and use her as a template for Lara's proportions. The first thing to do is "Apply rotation" for Konoko's pelvis (so that we can move her around intuitively) and then shift it upwards by about 0.89, so that the soles of Lara's feet (in the straightened T-Pose) coincide with the inside of Konoko's boots. Conveniently, the non-reflective parts of Konoko's outfit appear transparent in Material mode, so Lara's feet inside Konoko's boots are clearly visible. You can shift Konoko forward by 0.05 or so as well. | Now we import HD Konoko, for example from [http://geyser.oni2.net/UE4/LaraTutorial/KonokoHD.zip HERE] and use her as a template for Lara's proportions. The first thing to do is "Apply rotation" for Konoko's pelvis (so that we can move her around intuitively) and then shift it upwards by about 0.89, so that the soles of Lara's feet (in the straightened T-Pose) coincide with the inside of Konoko's boots. Conveniently, the non-reflective parts of Konoko's outfit appear transparent in Material mode, so Lara's feet inside Konoko's boots are clearly visible. You can shift Konoko forward by 0.05 or so as well. | ||
Line 69: | Line 72: | ||
Apart from Lara's shoulders being a bit too far back and her fingers being a bit short compared to Konoko's, this looks satisfactory. | Apart from Lara's shoulders being a bit too far back and her fingers being a bit short compared to Konoko's, this looks satisfactory. | ||
==Matching the UE4 mannequin's A-pose== | ===Matching the UE4 mannequin's A-pose=== | ||
We now want to put Lara in the exact same pose as the UE4 mannequin, i.e., with the exact same global orientations of all the bones (except maybe the clavicles and the spine). For that we will need a version of the UE4 mannequin where the bone axes have been redefined by analogy with the Mixamo rig, so that they look sensible when manipulated in Blender. Here is an FBX I made: http://geyser.oni2.net/UE4/LaraTutorial/MannequinToMixamo.fbx | We now want to put Lara in the exact same pose as the UE4 mannequin, i.e., with the exact same global orientations of all the bones (except maybe the clavicles and the spine). For that we will need a version of the UE4 mannequin where the bone axes have been redefined by analogy with the Mixamo rig, so that they look sensible when manipulated in Blender. Here is an FBX I made: http://geyser.oni2.net/UE4/LaraTutorial/MannequinToMixamo.fbx | ||
Line 81: | Line 84: | ||
Finally, we need to apply the constrained A-Pose as a new rest pose. Although intuitively it is a single operation, it is done in several steps. First, select Lara's mesh, and in the toolbox pick the Modifiers panel (with a wrench icon), then click Apply (this will deform Lara's mesh according to the rotations, scales and translations we set up for the armature, and the armature will no longer affect the mesh). Next, select the armature, go to Pose mode, select all of the bones, and do "Pose/Apply/Apply pose as rest pose". This will set the default transforms of the bones to the current posed ones, so that constraints will no longer be needed, and the information about the original shape of the armature will be lost. Last of all, you select Lara's mesh again, pick the Modifiers panel, and click "Add Modifier", pick Armature, and select Lara's armature (which was disconnected when we applied the modifier to the mesh). As for the constraints, we can now select Lara's armature, go to Pose mode, and do "Pose/Constraints/Clear pose constraints". Here is how it looks after all the above is done: http://geyser.oni2.net/UE4/LaraTutorial/LaraStep5newrest.blend | Finally, we need to apply the constrained A-Pose as a new rest pose. Although intuitively it is a single operation, it is done in several steps. First, select Lara's mesh, and in the toolbox pick the Modifiers panel (with a wrench icon), then click Apply (this will deform Lara's mesh according to the rotations, scales and translations we set up for the armature, and the armature will no longer affect the mesh). Next, select the armature, go to Pose mode, select all of the bones, and do "Pose/Apply/Apply pose as rest pose". This will set the default transforms of the bones to the current posed ones, so that constraints will no longer be needed, and the information about the original shape of the armature will be lost. Last of all, you select Lara's mesh again, pick the Modifiers panel, and click "Add Modifier", pick Armature, and select Lara's armature (which was disconnected when we applied the modifier to the mesh). As for the constraints, we can now select Lara's armature, go to Pose mode, and do "Pose/Constraints/Clear pose constraints". Here is how it looks after all the above is done: http://geyser.oni2.net/UE4/LaraTutorial/LaraStep5newrest.blend | ||
==Replacing the head== | ===Replacing the head=== | ||
Lara is now nearly ready for UE4, and it is finally time to remove Lara's head and attach Konoko's. The easiest way to do this is to disconnect Lara's head along an edge loop at the top of the neck, and then delete everything that's not connected to the body. After you do that, and unhide Konoko's head, you get this: http://geyser.oni2.net/UE4/LaraTutorial/LaraStep6severed1.blend (pun half intended) | Lara is now nearly ready for UE4, and it is finally time to remove Lara's head and attach Konoko's. The easiest way to do this is to disconnect Lara's head along an edge loop at the top of the neck, and then delete everything that's not connected to the body. After you do that, and unhide Konoko's head, you get this: http://geyser.oni2.net/UE4/LaraTutorial/LaraStep6severed1.blend (pun half intended) | ||
Line 94: | Line 97: | ||
At this point the head is not yet weighted to the skeleton. So we complete the process by selecting the head mesh (select any part of it, then grow the selection) and assigning it to the vertex group mixamorig:Head. The resulting model, with the rest of Konoko deleted, is here: http://geyser.oni2.net/UE4/LaraTutorial/LaraStep6weighted.blend | At this point the head is not yet weighted to the skeleton. So we complete the process by selecting the head mesh (select any part of it, then grow the selection) and assigning it to the vertex group mixamorig:Head. The resulting model, with the rest of Konoko deleted, is here: http://geyser.oni2.net/UE4/LaraTutorial/LaraStep6weighted.blend | ||
==Reorienting the bone axes according to UE4's conventions== | ===Reorienting the bone axes according to UE4's conventions=== | ||
The model so far can have some imperfections that we may want to fix (leftover symmetry issues, mesh layout that was messed up a bit when we scaled the bones, too much detail for the underwear, chest size, weight mapping of the breasts) but for now we just want to export this model so that it can be used in UE4. It is already in the exact same A-pose as the UE4 mannequin, but the bones' ''orientations'' do not agree with UE4's conventions. (That's perhaps the least intuitive part: the bones of UE4 skeleton do not have Y as their main axis, whereas Blender's bones are always along Y.) | The model so far can have some imperfections that we may want to fix (leftover symmetry issues, mesh layout that was messed up a bit when we scaled the bones, too much detail for the underwear, chest size, weight mapping of the breasts) but for now we just want to export this model so that it can be used in UE4. It is already in the exact same A-pose as the UE4 mannequin, but the bones' ''orientations'' do not agree with UE4's conventions. (That's perhaps the least intuitive part: the bones of UE4 skeleton do not have Y as their main axis, whereas Blender's bones are always along Y.) | ||
Line 100: | Line 103: | ||
Unless you have an automated way for rotating bones exactly by 90° in exactly the right direction depending on the bone, this needs to be done manually. There are at least two ways to do this in Blender. | Unless you have an automated way for rotating bones exactly by 90° in exactly the right direction depending on the bone, this needs to be done manually. There are at least two ways to do this in Blender. | ||
===FBX roundtrip and reparenting=== | |||
====FBX roundtrip and reparenting==== | |||
If you export the character to FBX and then reimport with different axis settings under the armature tab, you will end up with a skeleton with bones pointing, e.g., along the +X axis of the original bones. If you import enough of such reoriented skeletons, you can assemble the correct UE4-ready skeleton from them by joining the skeletons, reparenting bones around, and deleting unneeded bones as you go. That's a rather tedious and confusing process, but it gets the job done. | If you export the character to FBX and then reimport with different axis settings under the armature tab, you will end up with a skeleton with bones pointing, e.g., along the +X axis of the original bones. If you import enough of such reoriented skeletons, you can assemble the correct UE4-ready skeleton from them by joining the skeletons, reparenting bones around, and deleting unneeded bones as you go. That's a rather tedious and confusing process, but it gets the job done. | ||
Line 110: | Line 114: | ||
:Right leg (except toe), left toe, left hand and fingers: primary axis Z, secondary axis Y | :Right leg (except toe), left toe, left hand and fingers: primary axis Z, secondary axis Y | ||
===In-place bone rotation=== | ====In-place bone rotation==== | ||
Blender's implementation of bones is not the most intuitive, but it turns out there is a way to rotate bones in Edit mode. This is allowed by selecting "Normal" as the rotation mode (as opposed to "Gimbal", "Global" and "Local") and setting "Individual origins" as "Pivot center for rotation/scaling". Only sideways rotations of the bone can be done that way, though; rotation around the bone's own axis must be done by incrementing the bone's "roll" value. Also, before you rotate a bone, you must disconnect any child bones, otherwise the rotation of the bone will affect them. | Blender's implementation of bones is not the most intuitive, but it turns out there is a way to rotate bones in Edit mode. This is allowed by selecting "Normal" as the rotation mode (as opposed to "Gimbal", "Global" and "Local") and setting "Individual origins" as "Pivot center for rotation/scaling". Only sideways rotations of the bone can be done that way, though; rotation around the bone's own axis must be done by incrementing the bone's "roll" value. Also, before you rotate a bone, you must disconnect any child bones, otherwise the rotation of the bone will affect them. | ||
Line 120: | Line 124: | ||
:Right leg (except toe), left toe, left hand and fingers: 90° around X, then add 90° to roll | :Right leg (except toe), left toe, left hand and fingers: 90° around X, then add 90° to roll | ||
===Finalization=== | ====Finalization==== | ||
Whichever way you chose to rotate the bones around, you should have now something like this: http://geyser.oni2.net/UE4/LaraTutorial/LaraStep7ortho.blend | Whichever way you chose to rotate the bones around, you should have now something like this: http://geyser.oni2.net/UE4/LaraTutorial/LaraStep7ortho.blend | ||