SteamVR Developer Hardware

SteamVR Developer Hardware

gevarre Mar 22, 2016 @ 12:14pm
How to customize the controller model in Unity? Revisiting the unanswered question.
I know this question has been asked before, but I'm bringing it up again because there has never really been a definitive answer, as far as I have found.

Please note: this is not a rant. It's a frustrated plea for information. The people here are an amazing bunch, and I'm hoping that if someone responds to this, it will help everyone, not just myself. So with that said...


Problem: (In Unity) I would like to replace the default controller model with one of my own, hooking up all functionality for things like the trigger and touchpad animations and so on. How do I do this?

Answer: Well, that depends on which post you read.

Most of the replies to this question say something along the lines of, "See the IVRRenderModels API. This will update the models automatically", which doesn't actually answer the question that was asked. Furthermore, the documentation sited for this is part of openvr on github, which is all C++. Not very helpful for those of us that are C# Unity scripters and not full-fledged programmers. Deciphering that is pretty much impossible without some kind of guidance.

In one of the controller customization posts, aaron.leiby responded with "This is all wrapped up in the SteamVR_RenderModels script and exposed in Unity". Okay, now we're getting somewhere!

Now we have the what, but where's the how? Dropping the [CameraRig] prefab into a scene and selecting one of the "Model" GameObjects, I see that the SteamVR_Render_Model script is there. Awesome. I can now see a "Model Override" dropdown. This definitely looks to be the right place. I'm assuming at this point that all I should have to do is prepare my model, hook it up, and select it here. Unfortunately, this is where everything breaks down again. Clicking on that button, the only option is for "None" and no further hints are given.

Now what? Opening up that script, I can see what it's trying to do. It seems to be iterating through children looking for mesh components and making lists and doing other hookup-related things. I'm assuming that if I could tell it how to find my model and I had it all set up right, it would just work, but this is where the information ends. There are no comments in the script and no documentation (afaik) as to how to use this.


Okay, let's try something else:
In the the SteamVR folder, inside the "Editor" subfolder, I see a script called "SteamVR_RenderModelEditor". Maybe this is what I need to set up my model so it'll show up in that Model drop-down menu. But what do I do with it? Once again, I open the script and see that it's doing various things, but no comments and no explanation.

So maybe I put it on my model and some setup options appear. Nope. I just get an error message saying "this is an editor script". Which I already knew, with it being in a folder labeled Editor and all, but I had to try.

So then what do I do? If it's something that's supposed to be used in the editor, then there should be some sort of interface for using it, right? There's nothing in the Window, Component, or other Unity menus. Right-clicking on something doesn't bring up any kind of steamVR options, and as far as I can tell, nothing else steamVR-related is happening in the editor.

In one final, desperate attempt, I move the script out of the Editor folder and then try to add it to an object. I'm pretty sure it won't work, but hey, I've tried everything else. Sure enough, no good. Now I just get an error saying "Can't add script behavior. Needs to be derived from MonoBehaviour!". I notice there are other potentially useful script in that Editor folder like a skybox editor and settings, but again, no actual usage documentation.

the closest I've gotten is a rather hacky solution where I just parent my models to the existing left and right controller prefabs and then attach a script to that parent that at runtime re-activates my models (because they get deactivated by the steamVR scripts). But I have no animated components or anything. Just a basic wand of sorts. And I know enough to know it's not the correct way. It's just what works.


Valve, do you not realize how frustrating this is? You give us wonderful tools to do wonderful, amazing, exciting things, but then don't give us any hints as to how to use them. But, I promised this wouldn't be a rant. I want this post to be useful, not a complaint...

I know people have figured this out. I've played several demos where you guys have replaced the controller with various types of hands, golf clubs, tools, guns, and so on. I'm guessing that's similar to what I'm currently doing, but I could be wrong. Then there are those of you that have completely replaced the controller models with your own version, such as Water Bears, Aperture Robot Repair, and Tilt Brush, that retain all the functionality and bits of the original controller, just in a different form.


So what would be really, really, really helpful to me (and probably a lot of others) would be some kind of document like the following:

Step 1. Grab the models from this location... ( The models appear to be hard-coded in the steamVR plugin and unreachable?)

Step 2. Import them into your 3D editing program as a template and make your changes.

Step 3. Set up your new models according to the following...(naming conventions, hierarchy, whatever else is needed)

Step 4, etc. Export to Unity and do the following to hook them up and select them at runtime... (Attach this script, click this button, and so on)


That's just an example because obviously I don't know what's involved or I'd just do it, but you get the point. Just saying "Use this API" unfortunately isn't enough. Some of us need concrete, explicit, step-by-step instructions.

I know everyone is extremely busy prepping their own projects for launch day, but is there anyone here that could take a few minutes and write something up on this? I would be more grateful than you could possibly know.

And an extra thank you to anyone that's actually read to this end of this post :)






< >
Showing 1-13 of 13 comments
Bangerman Mar 22, 2016 @ 12:32pm 
So I have giant hands in my unity project! I parented the models to the tracked controllers and turne off the default model script.

A little bit of fine tuning for the positions and it was good to go.

You can find the actual models as maya files in the steamvr folder in your steamapps. lots of models, all to scale, just knock yourself out!
gevarre Mar 22, 2016 @ 1:52pm 
Thanks. I'm doing the parenting thing too, but that doesn't get me access to things like showing where the finger is on the touchpad, animations on the trigger and grips, and so on.

Those maya files would be great, but I'm not seeing them. I'm looking in SteamLibrary>steamapps>common>SteamVRDemos, but not seeing anything. Am I looking in the wrong place or do I need to install something else?
gevarre Mar 22, 2016 @ 1:55pm 
Aha! Sorry, I install all my steam games to a different drive, but SteamVR was all in program files on C:. Found em. Thanks for the help :)
gevarre Mar 24, 2016 @ 3:14pm 
In steamVR > resources > rendermodels > vr_controller_vive_1_5, I've found a file called vr_controller_vive_1_5.json that seems to be used to hook up the various .obj files to the controller and set parameters, but there doesn't seem to be anything like this in the actual Unity SteamVR folder. Is this something that's use to set up custom controllers? and if so, does anyone know how?
XRA Mar 26, 2016 @ 2:40pm 
when SteamVR creates the controllers, it also creates "attach" game objects for each part of the controller, even for stuff like the touch location- the objects are enabled/disabled using setActive so children also get enabled/disabled which effects the attach objects.

For a quick way to get things working you'd want a new script that you can add to the 2 SteamVR_RenderModel gameobjects. The script could make a dictionary <string,Transform> of the children transforms- but excluding any transform named "attach".
Then you can match by object name and parent your own controller parts to the "attach" object which is always a child of whatever Transform in the dictionary.
You'd also have the script disable the renderers of the original meshes by setting meshRenderer.enabled to false.
Last edited by XRA; Mar 26, 2016 @ 2:41pm
Madkyll May 11, 2016 @ 9:13pm 
Will it be possible to have a playermodel for the playercamera?
e.g. When looking down on yourself you will see a body.
The arms of this body being connected and moving with the controllers direction.

Will this be something in the next 2-6 months?
Last edited by Madkyll; May 11, 2016 @ 9:13pm
Xenosmash May 12, 2016 @ 2:09pm 
I'm having trouble with this currently. I was able to bring in models just fine by just parenting them and turning off the render models script but pulling up models from that script seems to be hit and miss. I was able to see some of the other models by selecting them in the drop down but now I can't see to get it to work. I don't know if I did something different last time or if the newest update broke it. I'm still experimenting and I'm actually creating a VR course myself so it'll be something that I'll be going over as well.

*Edit* Well seems to be working now. Think it might've just been a weird issue of it not loading properly the first time. I assume if we want to use the custom models with the render models script we'll create a new folder with the obj/mtl file along with the albedo and any specular/metallic maps along with it. I just tested it with a blank folder and it pops up in the drop down menu.
Last edited by Xenosmash; May 12, 2016 @ 2:56pm
Xtruder May 17, 2016 @ 12:01pm 
Hello guys,
here a quick video tutorial on how to upload steam vr custom geometry for the vive controllers:

https://youtu.be/W98VaQzY8Ac
gevarre May 17, 2016 @ 7:13pm 
Thanks for the video. It's really helpful. Unfortunately, you should be aware that the audio is almost completely unintelligible. The volume is extremely low, it's very garbled, and fades in and out as you speak. You may want to take another look at it and re-upload.
gmcd334 Jan 5, 2017 @ 11:13pm 
i am going to solve this problem by replacing the model of body, trigger under Model after the SteamVR_RenderModel ran. Any better suggestion for me?
Deanna Jul 2, 2017 @ 4:33pm 
If it helps anyone, I just noticed VRTK (vrtk.io) comes with an example scene showing how to change the controller model. Their new model even animates on button press.


Currently the example scene is VRTK/Examples/032_Controller_CustomControllerModel
Felewin Mar 11, 2018 @ 11:52am 
This is a fantastic post. It's now March of 2018 (two years later). I'm in the same boat as described by @gevarre two years ago. Same confusion about documentation, scripts, same thought process, same attempts and incomplete workaround. I am surprised there isn't official SteamVR developer documentation on this.

@gevarre Have you figured anything out on this subject?

I'm going to look into the VRTK but I would think there would be something official.
markmahlon Jun 21, 2018 @ 2:39pm 
@Felewin This may be two years late for @gevarre but this has worked for me with a little modification

https://www.reddit.com/r/Vive/comments/4lpfdc/replacing_the_vive_controlelr_texture_in_unity/
Last edited by markmahlon; Jun 21, 2018 @ 2:40pm
< >
Showing 1-13 of 13 comments
Per page: 1530 50

Date Posted: Mar 22, 2016 @ 12:14pm
Posts: 13