This is not a tutorial, just an overview of my process to create a character with Clayxels that can be used with character controllers like the one in Game Creator or Ootii's Motion Controller.
- sculpt a character using Clayxels
- freeze to a mesh, save it in your Assets folder
- use that mesh to create a new GameObject
- attach AddUV script to the new GameObject and switch to play mode to generate a mesh with a UV map
- replace the mesh in this GameObject with the new mesh, remove AddUV script
- use Puppet3D's autorig
- export Skin and Bones
- Set exported asset as a Humanoid
This is an exploration of how you can go from an idea to a working character without leaving Unity. You can use Clayxels to sculpt, Puppet3D to rig, and Game Creator to add movements and controls to your character.
- Unity
- Clayxels
- Puppet3D
- Game Creator or any other character controller that supports Humanoid assets.
- Create a ClayxelsContainer and sculpt a humanoid character (something with a head, chest, two arms and two legs)
- add a name in the "save asset" field, and click on "Freeze to mesh". This saves the mesh in the Assets folder.
- Create a new material using the ClayxelBuiltInMeshShader shader (otherwise your new character won't keep the colors created on Clayxels)
- We no longer need the clayxels gameObject. Hide it.
-
create a new GameObject
-
add a MeshFilter component
-
add a MeshRenderer component
-
assign the mesh created in the previous step to the MeshFilter component
-
assign the material created in the previous step to the MeshRenderer component
-
you should now have a gameObject that looks just like what you created on clayxels
-
add the AddUV component to the gameObject (see source at the end of this gist)
-
switch to play mode, and back to edit mode
-
there should be a mesh called "character" in your assets folder
-
remove the AddUV component
-
replace the MeshFilter mesh with this new character mesh
- open Puppet3D autoRig panel
- Select your character gameObject, and click on "Make Guides" in Puppet3D
- adjust guides to match your character
- click on "AutoRig" on Puppet3D
- more info: https://www.youtube.com/watch?v=xUbirkhY7Vo
- open Puppet3D's Skinning panel
- select your character gameObject
- make sure it now has a SkinnedMeshRenderer component instead of a MeshRenderer component (that means the autorig process worked)
- Click on "Export Skin & Bones" on Puppet3D
- see the message on Unity's console. It'll say where it saved the new asset
- Find the new asset in the Project panel. Select it. In the inspector panel, select the "Rig" tab. Change animation tab to "Humanoid" and click on "Apply"
- your asset is now ready to be used with a character controller.
Puppet3D doesn't export your mesh if the mesh doesn't have a uv map. That's the purpose of using the script. You can use a uv inspector to make sure your mesh has a uv map.
If the script doesn't work, you can export your mesh as an fbx with Unity's FBX exporter, import it in Blender, assign a UV map, export it from Blender and back into Unity.
- Puppet3D doesn't export the material correctly, so when you use your new humanoid character, you also need to reapply its material with the one that uses the ClayxelBuiltInMeshShader shader
- you are now using a normal mesh, so none of clayxel's features are available for this new character.
I tested this with Ootii's motion controller, Game Creator, and it can also be used with mixamo's animations (when you download a mixamo animation, you need to change it to a humanoid, the same way we did with the Puppet3D exported asset).
- The code that creates a uv map is a copy of the example code from Unity's Mesh.UV documentation.
- I just added 2 more lines: -- AssetDatabase.CreateAsset creates the new mesh -- AssetDatase.SaveAssets saves the new mesh to the assets folder