GithubHelp home page GithubHelp logo

Comments (13)

davnkrit avatar davnkrit commented on June 1, 2024 1

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.

gevarre avatar gevarre commented on June 1, 2024

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.

aleiby avatar aleiby commented on June 1, 2024

See my comment in #49. I am unable to reproduce this problem in 2017.1 or newer, however.

from steamvr_unity_plugin.

gevarre avatar gevarre commented on June 1, 2024

Weird. There's something going on though, and it may even be outside of Unity.

  1. Fresh install of Unity 2017.

  2. Started the SteamVR app first to be sure it was working fine.

  3. Started 2017.3.0f3.

  4. Downloaded the SteamVR plugin from the asset store.

  5. Deleted the default camera.

  6. Drug the [CameraRig] prefab into a scene.

  7. Notice the absence of controllers, but no errors yet:
    controllerproblem1-2-3_01

  8. Pressed play in the editor. Now I get errors:
    controllerproblem1-2-3_02

  9. Exited play and overrode the default model of "none" with "vr_controller_05_wireless_b". Now the controllers show up:
    controllerproblem1-2-3_03

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.

aleiby avatar aleiby commented on June 1, 2024

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.

gevarre avatar gevarre commented on June 1, 2024

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.

aleiby avatar aleiby commented on June 1, 2024

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.

gevarre avatar gevarre commented on June 1, 2024

@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.

aleiby avatar aleiby commented on June 1, 2024

@gevarre Correct.

from steamvr_unity_plugin.

gevarre avatar gevarre commented on June 1, 2024

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.

justinwasilenko avatar justinwasilenko commented on June 1, 2024

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.

zite avatar zite commented on June 1, 2024

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.

chengnay avatar chengnay commented on June 1, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.