First steps with the UMI3D Environment Development Kit
This tutorial aims to help Unity developers to start creating Collaborative Virtual Environments with the UMI3D SDK. The created Collaborative Virtual Environment is a basic world only containing avatars for the users and one interaction. For a more advanced sample, have a look on the UMI3D Samples project.
Important
This tutorial is old and need to be updated.
Requirements
- UMI3D Version: 1.1.r.210402+
- Compatible UMI3D Desktop Browser: 1.0.5.210402+
- Compatible UMI3D OpenVR Browser: 1.0.5.210402+
Set up the server
Add a server
Create an empty GameObject
and eventually rename it “UMI3DServer”
Add a UMI3DMainThreadDispatcher
component to the GameObject
Add a UMI3DCollaborationServer
component to the GameObject
Configure the server
Fill the HttpPort field (e.g. 50203) of the UMI3DCollaborationServer
component
Configure identification
Create an Identifier script and paste the code below inside.
- You could define any other numeric pin.
Create an Identifier
asset in the Script folder
Assign the created Identifier to the Identifier field of the UMI3DCollaborationServer component
Add a launcher
Create an empty GameObject
and eventually rename it “UMI3DLauncher”
Add a UMI3DLauncher
component to the GameObject
Tick the Launch Server On Start option
Define an environment
Create an environment
Create an empty GameObject
and eventually rename it “UMI3DEnv”.
Add a UMI3DCollaborationEnvironment
component to the GameObject
Fill the Environment Name field as wanted (testGPR in the screenshot)
Create a scene
Create an empty GameObject
under the UMI3DEnv GameObject
and eventually rename it “Scene”
Add a UMI3DScene
component to this new GameObject
Create an empty GameObject
under the UMI3DEnv GameObject and eventually rename it “SceneEmbo ”
Add a UMI3DScene
component to this new GameObject
Set up avatars
Add a custom avatar
Create a empty GameObject
and eventually rename it “Perso”
Add a UMI3DModel
component to the GameObject
Set the size of Variants to 1, select Unity_standalone and add the path where the AssetBundle is. In order to have a visual representation of the avatar on the environment, I added the “LoadBundle” component.
Create a prefab of the whole asset in the Prefab folder and remove it from the scene.
Configure user body tracking
Create an empty GameObject
and eventually rename it “UMI3DEmboManager”
Add a UMI3DEmbodimentManager
component to this new GameObject
Assign the UMI3DScene
of the GameObject
"SceneEmbo“ to the Embodiments Scene field of the UMI3DEmbodimentManager
component
Create an AvatarManager script and paste the code below inside.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
|
Add a AvatarManager
component (with the created script) to the “UMI3DEmboManager” GameObject
Add the « X » prefab in the modelPrefab field of the AvatarManager component
Set the size of List Bind List to 1, the size of B List to 1, choose “head” as a BoneType and set the name of the corresponding Bone in the model's structure (“Head” in our case)
Support audio
Create an empty GameObject
and eventually name it “UMI3DAudio”
Add a UMI3DAudioBridger
component to the GameObject
Populate the scene with a 3D asset
Create an empty GameObject
and eventually name it “obj1” under the “scene” GameObject
Add a UMI3DModel
component to this new GameObject
Select the path of the object, its format and its extension in the corresponding fields
Enrich the experience with interactions
Add a UMI3DEvent
component to the “obj1” GameObject
Add a StringParameter
component to the “obj1” GameObject
Add a UMI3DInteractable
component to the “obj1” GameObject
Add a UMI3DManipulation
component to the “obj1” GameObject