Draft - Tutorials - Makehuman avatars for Luxor

## Notes 1

Here is my process:

1) create human in Makehuman and export as .mhx2 with expressions

2) use the Makehuman addon in Blender 2.9 to import the .mhx2 file with human type "base" - face shapes checked - face shape drivers checked - masking "Apply",

3) Usually I paint the actual face texture on to the model but this time I won't to get things done faster,

4) select the armature and meshes and export to .fbx with "selected objects" checked - "Apply Scalings" FBX\_ALL,

5) create a new 3D project in Unity 2.4.9f1. Open Unity project and delete existing prefab Avatars,

6) create new asset folder and copy .fbx file from Blender and textures folder into this new asset folder, select asset and extract materials and select texture folder,

7) change eye transparency, eyebrows, etc,

8) select asset avatar, click on rig tab, and change animation type to Humanoid and press apply

9) click on the avatar in the assets folder and click configure button under rig tab and check mappings,

10) click on the avatar high level in the hierarchy and press the Build Avatar Manually button,

11) press the play button on the top of the Unity window and make sure the animation looks right

Question, do I need to create a new Unity project for each character? If so, do I need to setup the APS\_SDK each time I open a new project? Or should I just use the same project and create a new scene and prepare the new avatar there?

You can use a single Unity project (and scene) for building multiple avatars, however some people might like to keep them in separate projects. The reason I said you should start a new project was because your avatar was using the old SDK and was built in an older version of Unity. But in my avatar builder project I have built over 30 avatars in a single scene.

## Notes 2

When using Makehuman you should install the .mhx2 addon for Blender!! - also you should export characters from MakeHuman as .mhx2 (not as .fbx).

Here's a video explaining how to export makehumans and then import into Blender prior to building the avatar: https://youtu.be/gRIz8tc7ds8?t=156

Do you export the makehuman from Blender as a .fbx and build the avatar manually from .fbx using the aps\_sdk component? https://discord.com/channels/738881083256471703/738882482593857638/817674100150763520

Or are you using the AvatarBuilder from the aps\_sdk menu to import the .blend file? https://discord.com/channels/738881083256471703/738882482593857638/765266746289422366

welcome! I hope you are able to resolve the issue. To build avatars from .fbx check out this guide: https://discord.com/channels/738881083256471703/765300720873373756/765324302764736542

Also after adding the .fbx to the Unity project be sure to change it from generic to humanoid rig, but Unity for some reason always maps the fingers incorrectly for that skeleton type but you should be able to manually reassign them https://discord.com/channels/738881083256471703/738882482593857638/765317279587893259

In the Resources folder there is a Pose\_Makehuman template avatar that shows the bone assignments for makehuman skeletons. Not sure if it is the best mappings but they seem to work. I am pretty sure you can save the template avatar's pose to a file and then load the saved mappings to the custom avatar:

By setting Load Blend Shape and Facial Expression to false, it sorted it right out! Thank you so much!

## Bones off in MakeHuman to Unity imports

Yea, I think it's pretty typical. When Unity imports an .fbx it often makes mistakes trying to determine which bones to map to. The APS auto Avatar Importer uses template skeletons and just applies a known mapping for you. But since you are building the avatar manually this is a step you will have to ensure is correct. Actually I have seen that exact same hand weirdness before!! Try adjusting the mappings from the image you posted to resemble the mapping from the image I posted and then it should be good. Oh also don't forget to press "enforce tpose" button before saving.

I was able to fix the hands and feel comfortable with the manual FBX method but I noticed the mocapAssets folder doesn't have a .blend file but instead has a .fbx file. My concept is to export the scene from Luxor to blender so that the avatar will have a second skeleton for retargeting purposes. So the metarig would have all the keyframes and the body, eyes, etc. are parented to the second skeleton. The second skeleton would have copy rotation bone constraints to copy the rotations of the corresponding bones in the metarig. The copy rotation constraints would be set to "offset" so I can make adjustments to prevent arms and hands from penetrating an oversized avatar head, for example. I could even put target bones on the second skeleton to help control the legs since I am using a Kinect v2 which many times needs mocap correction.

One possible option might be to override the sceneloader render avatar in the output folder with the original .blend and discard the .fbx avatar folder. Notice how in this image the scene.json actually points to .blend models, however lubu\_1.blend does not exist. When the sceneloader fails to locate the .blend it will simply fallback to looking for a named folder containing an .fbx. So hypothetically if your .fbx and your .blend have same skeleton bone naming and the scaling is the same then it should be possible to use the .blend in place of the .fbx when running the sceneloader (untested)

By the way Xad, I use an Oculus Quest with Kinect V2 to capture my legs. You can see the result in the youtube video I just posted above. There is no interference between the Quest's cameras and the Kinect V2. To make it all work you use a $20 program called driver4vr to make your feet and waist look lie Vive trackers and it works great with Luxor.

The retarget armature concept in my Youtube video above shows how the Mocap can be corrected after it is brought into Blender. This helps to fix or correct Kinect V2 leg tracking problems. But it also allows enhancing the Mocap in Blender to prevent, for example, hands or arms from penetrating a head or body and can be used to override the Mocap to make the hands or feet stick to a surface for climbing for example.