Skip to main content
December 12, 2018

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.

This topic has been closed for replies.

9 replies

Inspiring
December 20, 2018
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

March 2, 2019
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.
Participant
March 5, 2019
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.
            }
    }



June 12, 2019
thanks a lot!! really.

I will try it asap!
New Participant
February 25, 2020
Hey Oculus. So now that LDRP and HDPR are shipping time to update your SDK?
Participant
June 29, 2020
we're also waiting to develop in URP - any roadmap?
Inspiring
June 29, 2020
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.
Up and Coming
August 4, 2020
Hey all, our team has just released an asset to solve this, we started a discussion about it here:

You can also get to the asset from here: https://coskami.com/avatars

Hope this helps! Please ask any questions you have, we're happy to help.

Twitter: @RickEM
v4rsh
New Participant
July 18, 2022

Here in July 2022, still having the same issue no matter which editor version I use, the problem exists with 2019, 2020, 2021.