Jump to content
 
Corvus

Cosmos Controller Models

Recommended Posts

Here is some extra information to help developers who have Cosmos compatible content that needs to be updated with Cosmos controller models.

 

Blog Post:

https://developer.vive.com/resources/2019/06/04/getting-started-with-cosmos-development/

 

Downloads:

https://hub.vive.com/en-US/profile/material-download

 

Steps for adding Cosmos controller prefabs to steamvr in Unity:
- import cosmos_controller.unitypackage
- add controller model prefabs (vive_cosmos_controller_left & vive_cosmos_controller_right) to scene or instantiate prefabs at runtime
* if using SteamVR [CameraRig], place prefabs as children of "Controller (left)" & "Controller (right)"
- add code to check for HMD type and swap proper controller models
* if(XRDevice.Model == "vive_cosmos")
- if using SteamVR plugin 2.x, follow steps below to add input bindings

 

Steps for adding cosmos controller models to steamvr in Unity:
- import folder with controller .obj files and textures
- create new material
- switch material shader to Standard (Specular setup)
- attach albedo and specular png textures included with controller models to appropriate material slots
- add controller model to scene
- attach new material to model
- rotate model transform to correct position (Rotate on Y axis 180 degrees)
- add code to check for HMD type and show proper controller models
* if(XRDevice.Model == "vive_cosmos")
- if using SteamVR plugin 2.x, follow steps below to add input bindings

 

! If using SteamVR plugin 2.x with input bindings, add these files to the root of your Unity project. UE4 developers will do likewise when using the SteamVR Input plugin.


These are currently required for Cosmos controller pose tracking (integrate if you have your own actions).

in the bindings_for_cosmos folder:
actions.json
bindings_vive_cosmos.json
bindings_vive_cosmos_controller.json

 

Final Steps
- create new build (for each store/sdk)
- add build to beta test
- run beta tests (or ask HTC to test)
- fix errors if any
- publish to store

 

Notes:
- v1 version of controller models includes LED ring
- possible compatiblility issues with Unity 2018.3
- XRSettings.eyeTextureHeight & XRSettings.eyeTextureWidth report incorrect sizes

VIVE_Cosmos_controller_rendermodels_bindings.zip

Share this post


Link to post
Share on other sites

Where should the bindings_for_cosmos folder be placed with respect to the unity project folder/Assets folder?

Share this post


Link to post
Share on other sites

, Either in the Unity project root folder or the built game folder with the executable.

 

Picture below for an example with Unity projects:

 

Share this post


Link to post
Share on other sites

Hi,

If our game uses default binding actions, can we just add cosmos controller binding files to the root of the project without any modifications?

And if we have our own binding actions, should we modify the .json file rather than using the UI procedure to create the binding file? (because we don't have a cosmos controller)

Share this post


Link to post
Share on other sites
On 7/22/2019 at 12:52 PM, Futuretown said:

Hi,

If our game uses default binding actions, can we just add cosmos controller binding files to the root of the project without any modifications?

And if we have our own binding actions, should we modify the .json file rather than using the UI procedure to create the binding file? (because we don't have a cosmos controller)

 

@Futuretown, The Valve recommended way is yes to use the UI tool in Unity to create the actions.json mapping especially if you have custom actions. The one we provided has been tested / created with the tool and covers the basic actions (the example in the SteamVR plugin and also includes the actions used in our VIU (Vive Input Utility) plugin as well.   Both plugins can generate this for you. 

UPDATE:  You can now access the SteamVR Input plugins for Unity and UE4 without requiring to have a Cosmos to create the action mappings.

https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.4.1b

https://github.com/ValveSoftware/steamvr_unreal_plugin

 

 

 

Share this post


Link to post
Share on other sites

They say to import cosmos_controller.unitypackage, but where is this cosmos_controller.unitypackage download? Cannot find it in the downloads

@Dario @Corvus

Share this post


Link to post
Share on other sites

Please sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...