Uploading an avatar to cluster
In this guide, I assume you already know the basics of Unity and probably have previously uploaded an avatar to VRChat. If you haven't, you can still try to follow along, but some descriptions might be a bit too brief.
You need Unity 2018.1.1f1 and the cluster. SDK. In the Player Settings
found inside the Build Settings
, set the Scripting Runtime Version
to .NET 4.x Equivalent
before importing the cluster SDK.
While the UniVRM documentation is useful, do not add UniVRM to the same Unity project as the cluster SDK, as there will be conflicts leading to errors being thrown while building your avatar.
I assume you have your rigged, humanoid avatar in FBX format already imported into unity. Make sure the rig is set to humanoid and it is placed in a T-pose. You can see the limitations imposed on cluster avatars in the official documentation. In addition to that, there seems to be a limitation on Spring Bone Collider Groups. It may be best to avoid using them, as they might not work at all in cluster.
In VRM format, shape keys are a big contributor to file size. If your model's file size is too big, try splitting off the parts with shape keys into their own mesh and deleting the shapekeys on the other mesh.
On importing your avatar to Unity, you will want to set up the materials to use the shaders accepted by cluster. These can also be found on the page mentioned above. If you cannot find the material for your imported avatar, you can export them on the materials tab of the prefab.
Put your prefab into a scene, do any further basic setup you might need and then select the export option from the VRM menu on the menu bar. Enter your name as the author, make sure the two checkboxes are ticked and export the base VRM file.
After doing this, create a new folder in your Unity project and drag the VRM file there to reimport your avatar with all the VRM components applied.
If importing the VRM file fails with a JSON errors, try to set your Windows region in such a way that floating numbers use the dot as a decimal symbol.
Open a new scene and drag the prefab created from the VRM file into it. On the avatar, there will be a number of components that can be customized. In the following, I will mention the components that are useful for customization.
VRM Meta
: This component contains information about the model and the creator, as well as what types of content the model may be used for and under what license. For uploading to cluster, this doesn't really matter, but if you feel like it, you can fill it out diligently.
VRM Blend Shape Proxy
: Double click on the BlendShape (BlendShapeAvatar)
and you will be taken to an overview of blend shape clips. For each you want to set up (probably A, I, U, E, O, BLINK, JOY, ANGRY, SORROW, FUN), select it, then open the mesh at the bottom to adjust the blend shape values. When they are adjusted appropriately, press apply and work on the next one. After setting everything up, you can play the scene and test your blendshape clips using the component on the avatar.
VRM First Person
: The first person offset is probably similar to what has to be setup for a VRChat avatar and specifies the camera position. I'm not sure if the offset is from the ground or from the specified bone. For cluster it probably does not matter. The renderer settings look useful, but also do not matter, because you will not be able to see your own avatar in cluster.
VRM Look At Head
: I'm not sure if this usually needs to be customized. Probably not. However, it is useful for setting up the next component. To do this, add a small object to the scene, in front of your character's head and enter it as a target in this component. Also enable Draw Gizmo
.
VRM Look At Bone Applyer
: This component lets you customize the movement range of your avatar's eyes. After setting a target for the previous component, enable Draw Gizmo
here and play the scene. By moving the target, you will be able to see your avatar's eyes following it. You can adjust the sliders of this component to adjust the range of movement, mainly by using the Curve Y Range Degrees
sliders. When you are happy with your settings, right click the component, select copy component and stop the scene. The values will have reset, but you can put them back in by right clicking on the component name again and pasting the copied values.
You can add a Blinker
script to preview the blinking animation of your avatar. I'm not sure if it is necessary to have it blink in cluster or not. There is also an AIUEO
component you can add to preview the mouth animations, but I removed it before uploading.
VRM offers its own alternative to dynamic bones called spring bones. They are less flexible, but can work alright. Spring bones components can be added to the secondary
object inside your avatar. Add the root bones of parts of your armature you want to animate to root bones and play with the values until you are happy with it. You can also have multiple components if you need different settings for different root bones.
In theory, you can add VRM Spring Bone Collider Group
components to your skeleton, to prevent spring bones from clipping into your body, but they do not seem to work with cluster.
First you will want to adjust the scene's camera to take a profile picture of your avatar.
Select your avatar and select upload from the cluster. SDK menu in the menu bar. You will need to generate an API token on the cluster website and enter it in the window that pops up. As the window will not save it, you should probably delete the API key on the website once you are done uploading.
Afterwards, drag your avatar into the Avatar
field, your camera into the Thumbnail camera
field and enter a name for your avatar. Then press build.
If the build succeeds, you can then check the accept policy box and upload your avatar.