Comments (13)
Looks like replacing the deprecated version of SteamVR_UpdateChars.cs with an old version of SteamVR_UpdateChars.cs (from 1.2.0) fixed it in Unity 5.6.1 (still had to add it as a component to [CameraRig]->Camera (head)->Camera(eye) ).
For 2017.3.0f3 I had to remove the if/end if section checking for UNITY_5_6, and NOT add the script as a component of the Camera (eye) to get it working.
Here's the 1.2.0 version of SteamVR_UpdateChars.cs in case someone needs it:
//======= Copyright (c) Valve Corporation, All rights reserved. ===============
//
// Purpose: Helper to update poses when using native OpenVR integration.
//
//=============================================================================
using UnityEngine;
using Valve.VR;
[ExecuteInEditMode]
public class SteamVR_UpdatePoses : MonoBehaviour
{
#if !(UNITY_5_6)
void Awake()
{
var camera = GetComponent<Camera>();
camera.stereoTargetEye = StereoTargetEyeMask.None;
camera.clearFlags = CameraClearFlags.Nothing;
camera.useOcclusionCulling = false;
camera.cullingMask = 0;
camera.depth = -9999;
}
#endif
void OnPreCull()
{
var compositor = OpenVR.Compositor;
if (compositor != null)
{
var render = SteamVR_Render.instance;
compositor.GetLastPoses(render.poses, render.gamePoses);
SteamVR_Events.NewPoses.Send(render.poses);
SteamVR_Events.NewPosesApplied.Send();
}
}
}
from steamvr_unity_plugin.
Sorry for the cross-post, but here is the info I just added to issue #49 not knowing that this one had just been opened. They seem to be the same issue:
I've talked to several vr devs in the Seattle area, and they seem to be having the same problem: If you leave things at their default, the models don't show up, if you manually override the model in unity (in the "Model Override" drop-down) to anything other than vr_controller_vive_1_5, the controllers show up and everything seems to work. I had just never noticed it before since I always make custom controller models.
These may or may not have anything to do with the actual problem, but here are the errors I'm now getting:
[Model] Render model does not support components, falling back to single mesh.
UnityEngine.Debug:Log(Object)
SteamVR_RenderModel:SetModel(String) (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:285)
SteamVR_RenderModel:Update() (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:674)
Failed to load IVRRenderModels interface version IVRRenderModels_005
UnityEngine.Debug:LogError(Object)
RenderModelInterfaceHolder:get_instance() (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:90)
SteamVR_RenderModel:LoadComponents(RenderModelInterfaceHolder, String) (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:507)
SteamVR_RenderModel:SetModel(String) (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:279)
SteamVR_RenderModel:Update() (at Assets/SteamVR/Scripts/SteamVR_RenderModel.cs:674)
from steamvr_unity_plugin.
See my comment in #49. I am unable to reproduce this problem in 2017.1 or newer, however.
from steamvr_unity_plugin.
Weird. There's something going on though, and it may even be outside of Unity.
-
Fresh install of Unity 2017.
-
Started the SteamVR app first to be sure it was working fine.
-
Started 2017.3.0f3.
-
Downloaded the SteamVR plugin from the asset store.
-
Deleted the default camera.
-
Drug the [CameraRig] prefab into a scene.
-
Exited play and overrode the default model of "none" with "vr_controller_05_wireless_b". Now the controllers show up:
More info: Perhaps this might not be related to the Unity plugin at all. I just noticed that if I bring up the steam overlay (by pressing the little button below the thumbpad), the controllers work, but they are invisible. If I play any game that uses the default controllers, like The Lab, they are likewise missing but working. However, if I bring up SteamVR Home, the controllers ARE there. Any apps that override the default controller with their own custom versions also work.
I even went so far as to uninstall SteamVR (through my Steam Library), make sure the rendermodels folder was gone, then reinstall SteamVR, but that didn't seem to make any difference. Is there somewhere else that SteamVR is referencing these models from?
Also note: I have confirmed from other devs I've talked to that this is also happening to them in 2017.
from steamvr_unity_plugin.
If you look in your SteamInstallFolder/logs/vrclient_Unity.txt after getting the InvalidModel error, you should see a line that starts with: Unable to load render model from ...
Can you see if the file specified in that error actually exists on disk. And then maybe open it and see if it is corrupted or something?
from steamvr_unity_plugin.
Thanks for the info. So here is the error, and sorry for the formatting. It's a long one:
Unable to load render model from C:\Program Files (x86)\Steam\steamapps\common\SteamVR\resources\rendermodels
C:Program Files (x86)Steamsteamappsworkshopcontent250820675102547vr_controller_vive_1_5vr_controller_vive_1_5.obj
C:Program Files (x86)Steamsteamappsworkshopcontent250820675102547vr_controller_vive_1_5vr_controller_vive_1_5.obj.obj:
Cannot open file [C:\Program Files (x86)\Steam\steamapps\common\SteamVR\resources\rendermodels
C:Program Files (x86)Steamsteamappsworkshopcontent250820675102547vr_controller_vive_1_5vr_controller_vive_1_5.obj
C:Program Files (x86)Steamsteamappsworkshopcontent250820675102547vr_controller_vive_1_5vr_controller_vive_1_5.obj.obj]
The above is actually all on one line. I have no idea how this works, but if you look at the paths that contain the folder "250820675102547", notice that there are no slashes in the path. Is this behaving correctly?
I did check the controller models in both places and they exist. When I import them into Maya, I get the following error:
Your OBJ file contains faces shared by multiple groups.
Maya cannot create multiple objects for this file.
A single mesh object will be created instead.
The OBJ group information will be captured in Maya sets.
I'm assuming this is innocuous and is just an artifact of the import, but I figured I'd better include it just in case. After opening in Maya, the file consists of 1 combined mesh of everything and some Maya groups that individually list every face and vertex. I haven't used OBJ in years, but again, I'm assuming this is normal.
Oh, and when I open vrclient_TheLab.txt, I see the exact same error with the same paths.
from steamvr_unity_plugin.
Looks like something is screwed up with the "modelskins" section of your steamvr.vrsettings file (under SteamInstallFolder/config). Try deleting that section and trying again.
from steamvr_unity_plugin.
@aleiby: Yay! Deleting my config folder fixed the missing controllers. Thanks for the diagnostics. One last question though: In Unity, I'm still not seeing any controllers in the scene view, only in the game view when I hit play. I've never really paid attention to this because I've always used my own custom models before. Am I right in assuming that to see them in the scene view I have to use the Model Override and then switch it back to None before building? If so, it would be nice if they would default to a default model within Unity, but no biggie.
from steamvr_unity_plugin.
@gevarre Correct.
from steamvr_unity_plugin.
Update: I've been trying out 2018, and there now seems to be something else going on. I'm still trying to track down the exact cause and sequence of events, but when opening 2018, I now lose the controllers again with the same "Failed to load IVRRenderModels interface version IVRRenderModels_005".
Big difference this time is that there are no errors in the logs and the only way to get them back seems to be to COMPLETELY remove steamvr's config folder, uninstall steamvr completely from steam, restart the computer, reinstall everything, and run all the steamvr setup stuff again. Switching back to 2017 and then 2018 seems to cause the error again, though, as I said, I'm still trying to trace down exact repro steps.
from steamvr_unity_plugin.
We have a problem where tracking works but the controller models don't show up in Standalone builds. The controller models show up in the editor though but once the project is built the controllers don't show up.
Using SteamVR 1.2.3, Unity 2017.3.1.p4.
from steamvr_unity_plugin.
I believe this issue has been fixed in recent versions of SteamVR and the Unity Plugin. Let me know if it's still an issue and I'll reopen.
from steamvr_unity_plugin.
@zite Recently, developer complains that this issue still occurs in recent Unity and SteamVR version. Here is the link to the error log. ViveSoftware/ViveInputUtility-Unity#136 (comment)
from steamvr_unity_plugin.
Related Issues (20)
- SteamVr Tracker dosent respont properly with some Unity HDRP projects , Value is recived in Unity input debugger but not in .. steam vr tracked object.
- Binding HeadsetOnHead not working for Pico 4 HOT 1
- Scene view almost entirely breaks after installation HOT 1
- Problems with Ubuntu 20.04, Unity and SteamVR (HTC-Vive)
- Controller models fail to render in mono builds using unity 2022.3 HOT 3
- SteamVR haptics failing in Unity 2022.3.+ HOT 7
- We need an OpenXR pluggin for index controllers or no new games will be made for the hardware! HOT 6
- Pogo pin HOT 2
- Transparent window with no content bug in settings HOT 2
- uncoupling physics update rate from render frequency causes controllers render models to jitter
- Longbow arrow not aligning with the tracked hand HOT 3
- Binding controllers you don't have? HOT 1
- Unity Switch scene Handle missing
- Longbow BowArrow transform issue when fired
- com.valvesoftware.unity.openvr-1.2.1.tgz missing meta files HOT 8
- x86/libopenvr_api.so and x86/libopenvr_api.so.dbg has no meta filebut it's in an immutable folder. The asset will be ignored. HOT 1
- Hand movement not synchronous with HMD view when using smooth locomotion
- VRApp works in the Editor but not in built using Linux HOT 1
- Exit with crash of Play mode while using Teleport Component
- NullReferenceException: Object reference not set to an instance of an object
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steamvr_unity_plugin.