How to make a controller model complied by WaveVR rules¶
The example is present how to follow WaveVR rules to make a controller model. This example is based on FBX export. What is Unity FBX export guide, please refer to FBX export
Provider might use 3D Max, Cinema 4D, Maya ... etc to construct controller model and export with FBX. Following rules and approved by WaveVR, WaveVR_ControllerLoader will show your controller model by connecting of real device and append indicator for the model.
Steps |
Construct 3D model¶
- Prepare textures and materials
We will take Finch controller as example, textures including
- All keys and body: Body、Trigger、Touch、App、Home、Bumper and Volume. You don’t need to have all buttons and depend on your real device.
- Key press: Optional, might including touch dot, touch press, app press ... etc.
- Battery: Optional, for example, there are 5 level battery percentage.
1st level:
2nd level:
3rd level:
4th level:
5th level:
- Construct controller model
Rules must followed when you construct controller model:
Controller model must head forward and face up .
Each component must follow naming rule.
Body: _[CM]_Body
Trigger: _[CM]_TriggerKey
Touchpad: _[CM]_TouchPad
App: _[CM]_AppButton
Home: _[CM]_HomeButton
Volume: _[CM]_VolumeKey
Bumper: _[CM]_BumperKey
Each component must has its origin.
Export with FBX format¶
Unity import FBX and create prefab¶
- Plug-and-Drag FBX file to Unity.
- Prepare textures and create materials.
Create an empty game object and follow naming rule. We take Finch controller as example and rename it to WVR_CONTROLLER_FINCH3DOF_1_0_MC_R, suppose it is right hand.
Naming rule: ControllerID_MC_WhichHand (Right hand is R, left hand is L)
- Add WaveVR_PoseTrackerManager script to WVR_CONTROLLER_FINCH3DOF_1_0_MC_R and set device to WVR_DeviceType_Controller_Right.
- Add FBX model to WVR_CONTROLLER_FINCH3DOF_1_0_MC_R.
- Setting textures and materials, disable press effect as default.
- Add battery indication to model。(Optional)
- Add battery FBX to controller model.
- Setting textures and materials
- Chect model content by rotating viewport.
- Reset WVR_CONTROLLER_FINCH3DOF_1_0_MC_R position and rotation
- Add script to show effect or battery indication, please refer to Finch controller model. (Optional)
- Add indicator feature to controller (Optional and it is based on naming rule and model direction)
- Create Resources/Controller folder and save WVR_CONTROLLER_FINCH3DOF_1_0_MC_R as prefab.