Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
Anonymous's avatar
Anonymous
7 years ago

Oculus hands and controllers show PINK using Unity VR Lightweight Pipeline

Hello!
I wonder if some one can help me with this problem.
Im using Unity 2018.2.17 - VR Lightweight pipeline.

The problem is that the VR Lightweight pipeline only accepts the Lightweight Pipeline Standard shader. Anything else is just put on a PINK color.

You cant (to my knowledge) change the hand material to the right one so they will display the typical blue. In other objects, you just change the shader type in the material settings...
This also happens with the controllers, they are in beautiful pink.

Please help :):smile: I am desperate to get the "usual" materials for the hands and touch controllers. I am very surprised they dont work straight - the new VR Lightweight pipeline is going to be huge for VR and the new games in Quest. I have already tested that it can handle better FPS than the normal 3D Template.

Thanks all for your inputs.

9 Replies

Replies have been turned off for this discussion
  • The Scriptable Render Pipeline (which includes LWRP) is a whole different rendering pipeline for Unity.  The "right" way to fix this is for Oculus to update their Unity asset package to account for SRP as well as Standard rendering paths.  That seems unlikely to happen while LWRP is still in preview.

    A super-quick dirty hack to make the pink hands go away is to just replace the Oculus shaders with ones that work for LWRP.  Assuming you're on PC, ou can do this with a one-line change in OvrAvatarSkinnedMeshRenderPBSV2Component.cs (v1.32) at line 36:

    #if UNITY_ANDROID
            var singleComponentShader = "OvrAvatar/Avatar_Mobile_SingleComponent";
    #else
          //  var singleComponentShader = "OvrAvatar/Avatar_PC_SingleComponent";
            var singleComponentShader = "Lightweight Render Pipeline/Simple Lit"; // LWRP HACK
    #endif

  • Anonymous's avatar
    Anonymous
    Hello,
    Thanks for your reply.
    I tried to apply your method, but the version of the Oculus Integration available right now from the Asset Store is newer than the one you have made your fix. I did find the script but its radically different that yours. I really hope I am wrong and that you can give me a hand! :smile: I wonder if Oculus will make an update of their integration with unity so that the VR lightweight pipeline can be used with their standard avatars, which are amazing.
  • Hey, I'm not sure if this is still an issue you are having or not, and while not a perfect system this worked for my needs. all i did was create a script that grabs the newly spawned hands and changes their material.


    heres the script. hope it helps


    // i assigned this to the OVR player controller.

      public Material mat; // this is the mat you want the hands changed to.


        private GameObject handLeft;
        private GameObject handRight;

        //
        void Update()
        {
            // find and grab the hand objects
                handRight = GameObject.Find("hand_right_renderPart_0");
                handLeft = GameObject.Find("hand_left_renderPart_0");

                        // if i've found the hands change the texture
                if(handRight !=null && handLeft !=null)
                {
                    handLeft.GetComponent<Renderer>().material = mat;
                    handRight.GetComponent<Renderer>().material = mat;
                    Destroy(GetComponent<handMatChange>()); // remove this script so it stops running.
                }
        }



  • Anonymous's avatar
    Anonymous
    thanks a lot!! really.

    I will try it asap!
  • Hey Oculus. So now that LDRP and HDPR are shipping time to update your SDK?
  • I tried to build my own shader for URP and for basic features it was not so complicated, but struggled with integrating the masks for the face.
  • Here in July 2022, still having the same issue no matter which editor version I use, the problem exists with 2019, 2020, 2021.