|
| 1 | +--- |
| 2 | +title: Setup |
| 3 | +--- |
| 4 | + |
| 5 | +import { Callout } from 'fumadocs-ui/components/callout'; |
| 6 | + |
| 7 | +## Set up the Unity Editor |
| 8 | + |
| 9 | +- As per the [Getting Started](/docs/getting-started#installing-unity) section for installing the latest supported Unity editor version and acquiring the Basis framework. |
| 10 | +- Open Unity Hub and add an existing project, choose the extracted/cloned Basis project folder |
| 11 | +- On the initial project load you will see the following prompt, please hit 'Restart Editor'. |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | +- Once the project has loaded, you can now load in your Avatar files: |
| 16 | +- Either, |
| 17 | + - Find `Assets` in the Project hierarchy, inside `Assets` right-click any empty space and select `Show in Explorer` |
| 18 | + - Copy in your Avatar files [Mesh/Materials/Textures, etc.] |
| 19 | +- or |
| 20 | + - Import a .unity package containing your files, from the Assets menu, Import Package > Custom Package |
| 21 | +- Bring back the Unity window and allow the import process to finish. |
| 22 | + |
| 23 | +<Callout type="info"> |
| 24 | +If you place your content within a new directory "Assets > _UserContent" the default .gitignore file with the project will hide changes in git on this folder. |
| 25 | +</Callout> |
| 26 | + |
| 27 | +## Import Model |
| 28 | + |
| 29 | +- Find the location of your Avatar model (usually provided in .FBX format). |
| 30 | +- Click the file and then navigate to the `Model` section of the Import Settings window. |
| 31 | +- Ensure that `Red/Write` and `Legacy Blend Shape Normals` are selected as below. |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +- Navigate to the `Rig` section of the Import Settings window. |
| 36 | +- Click the `Animation Type` drop-down menu and select `Humanoid`, press `Apply` as shown below. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +- Afterward, the `Configure` button above `Apply` is now selectable, click this and then check your bone mappings. |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | +- This should show all mandatory bones as selected; make sure this looks correct for your Armature. |
| 45 | +- Lastly, click on the `Head` button in the `Mapping` window and remove the assignment for the `Jaw`; this is usually incorrect. |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | +## Skinned Mesh Setup |
| 50 | + |
| 51 | +- There are currently no requirements to name your Avatar's Skinned Mesh as `Body` or other variation used on Virtual Platforms. |
| 52 | +- If you have multiple skinned meshes, consider pinning them to all use the same reference point on the body, for inheriting light probes in the scene. You can do this by assigning a bone from the Armature (Usually Hips) to the `Anchor Override` field. |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | +- Another consideration for Avatars with multiple Skinned Meshes is when different bounding box sizes cause individual meshes to pop in and out while the rest of the Avatar is visible to remote viewers. |
| 57 | +- You can override the Center X, Y, Z & Extent X, Y, Z values in the section named `Bounds` at the top of the Skinned Mesh Renderer component. Usually, it is a good idea to set this the same across the separate Skinned Meshes. |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | +## Materials/Shaders |
| 62 | + |
| 63 | +- You can jump straight in with the Universal Render Pipeline/Lit shader that comes with Unity 6 |
| 64 | +- Otherwise, we have compiled a list of compatible [Avatar Shaders](/docs/avatar/shaders) that you can use. |
| 65 | + |
| 66 | +## Basis Avatar Setup |
| 67 | + |
| 68 | +- The steps above should automatically add an Animator component to your Avatar prefab when you pull it into the Scene. |
| 69 | +- On the Parent GameObject of the Avatar, click `Add Component`, and add `Basis Avatar`. |
| 70 | + |
| 71 | +If you're struggling to find the view ball or indicator for the Eye Position, follow these steps: |
| 72 | + |
| 73 | +- Top Right next to XYZ, click the Eye. |
| 74 | +- Enable "Eye Position Gizmo" inside of the `Basis Avatar` component. |
| 75 | + |
| 76 | +You should now see a green Gizmo for your eyes; move this up between your eyes and on the same plane as your eyes. |
| 77 | + |
| 78 | +**Ensure you have assigned each of the following:** |
| 79 | +- Animator |
| 80 | +- Face Viseme |
| 81 | +- Face Blink |
| 82 | +- Avatar Name |
| 83 | +- Avatar Description |
0 commit comments