Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SteamVR Render Model component does not use Universal Render Pipeline shader. #421

Closed
jgwinner opened this issue May 6, 2019 · 25 comments
Closed
Labels
Has workaround Will Fix This is an issue we're planning to fix but is not yet fixed in the latest version

Comments

@jgwinner
Copy link

jgwinner commented May 6, 2019

The HTC Vive controllers appear pink with a fresh project created with the LWRP, version 2019.1.1f1 and SteamVR. I have not installed the Oculus VR runtime.

All project materials were converted with Edit->Render Pipeline->Update project materials to Lightweight RP Materials. No other materials in the scene look odd.

It is the Vive controller, not the 'hand' that's part of the SteamVR Sample Interactions (Prefab is at SteamVR->InteractionSystem->Core->Prefabs as "Player".

Steps to reproduce:

  1. Generate a new Unity project using the Lightweight RP.
  2. Install the SteamVR package from the Unity asset store
  3. Delete the camera in the scene
  4. Drag the "SteamVR->InteractionSystem->Core->Prefabs->Player into the scene.
  5. Update the materials by Edit->Render Pipeline->Update project materials to Lightweight RP Materials
  6. Click "Play" in the editor.

The Vive controller will show up pink.

@jgwinner
Copy link
Author

jgwinner commented May 7, 2019

note that this isn't related to the controllers not showing up; they do, they just show up as pink. I found a work around, at: https://answers.unity.com/questions/1615702/htc-vive-controllers-are-pink-in-unity.html which leads to https://forum.unity.com/threads/changing-the-htc-vive-controller-model-with-a-custom-hand-model.395107/ but I figure if I do this, other models may not show up as well.

I tried it with Windows Mixed Reality, and NOTHING showed up. Oddly, when I first ran the program, the controllers showed up as gray transparent outlines and 'teleport' callout signs, but once I teleported the first time, the controllers disappeared, along with my hands.

That's a bigger bug, WMR should work I'd assume.

    == John ==

@zite zite added the Will Fix This is an issue we're planning to fix but is not yet fixed in the latest version label May 24, 2019
@andybak
Copy link

andybak commented Jun 4, 2019

LWRP is out of preview now. It would be fantastic to get an ETA on this being fixed.

@Manchaiser
Copy link

Problem of this issue is here:

material = new Material(shader != null ? shader : Shader.Find("Standard"));

Workaround - replace it with default lit shader:

material = new Material(shader != null ? shader : Shader.Find("Lightweight Render Pipeline/Lit"));

Or create your own shader which must be compatible with default one

@Nufflee
Copy link

Nufflee commented Jul 8, 2019

any updates on this?

@PierreLouisPAUGAM
Copy link

LWRP will soon become the Universal Render Pipeline (2019.3), thereby it will be the default Unity Render Pipeline. Are there any news about the "pink controller" issue ?

@Hexodus
Copy link

Hexodus commented Jan 23, 2020

The same goes to HDRP - pink is everywhere. Should be fixed urgently. URP(formaly known as LWRP) is essential.

@flightCrazed
Copy link

Hi guys, any word on this? or a work around? thanks!

@jgwinner
Copy link
Author

I switched renderers for a project last year, but honestly I've abandoned Unity to use Unreal lately. So, I don't have an update. It's somewhat absurd that Unity hasn't fixed this.

    == John ==

@flightCrazed
Copy link

shader set on steam controller

I figured it out See the screenshot. You canto set the shader here.

@flightCrazed
Copy link

I switched renderers for a project last year, but honestly I've abandoned Unity to use Unreal lately. So, I don't have an update. It's somewhat absurd that Unity hasn't fixed this.

    == John ==

Thanks. Yeah, Unity is moving fast, its probably difficult for other parties (such as Valve) to keep up with their assets, but I think in the end it will all come together. I just switched to URP and I was really surprised to see the performance boost I got despite much better lighting/graphics in VR.

@airdorf
Copy link

airdorf commented Apr 15, 2020

shader set on steam controller

I figured it out See the screenshot. You canto set the shader here.

This worked for me (using URP)! Thanks for the tip!

@andybak
Copy link

andybak commented Apr 15, 2020

@jgwinner

It's somewhat absurd that Unity hasn't fixed this.

It's not something for Unity to fix. URP uses different shader to the legacy pipeline. Valve should supply a material that's compatible with URP. However @airdorf has proposed a fix that's very simple to apply - and Valve are working on an entirely new XR plugin that will replace this within the next few weeks (hopefully)

@Jack-Eatock
Copy link

Problem of this issue is here:

material = new Material(shader != null ? shader : Shader.Find("Standard"));

Workaround - replace it with default lit shader:

material = new Material(shader != null ? shader : Shader.Find("Lightweight Render Pipeline/Lit"));

Or create your own shader which must be compatible with default one

This worked perfectly for me! Thank you so much!!!! But one thing is as the Light Weight Render has now become the standard Universal renderer. You need to do this instead:

" material = new Material(shader != null ? shader : Shader.Find("Universal Render Pipeline/Lit")); "

@jgwinner
Copy link
Author

@andybak

It's not something for Unity to fix. URP uses different shader to the legacy pipeline. Valve should supply a material that's compatible with URP.

Whoops, my bad. You're right. Restated, it's absurd that Valve hasn't fixed it in nearly a year, and it was a problem before I opened this bug last year.

Unity could have helped; the newer rendering pipeline was their baby, and you'd want your baby to succeed in the world. But you're right, it was really up to Valve to fix.

Don't get me wrong, Valve has done more to advance XR than any other company - even making their flagship content compatible with other headsets, unlike their competitors. Still, a bad bug is a bad bug.

Looking forward to the new plugin. Hopefully Unreal will get some love :)

@flightCrazed
Copy link

This is really a simple fix, not a big deal at all, just needed the info on how to set the right shader. Took 2 seconds to make it compatible. As far as I know valve is already working on a new plugin that supports SRP.

@flightCrazed
Copy link

flightCrazed commented Apr 16, 2020

material = new Material(shader != null ? shader : Shader.Find("Lightweight Render Pipeline/Lit"));

One more point: note that shader is checking to see if this is null, and it is likely not null as seen on my screenshot and this will fail to set the new one. Either remove the null check or set it to null in the inspector.

@ziomio
Copy link

ziomio commented May 12, 2020

After I changed shader to HDRP/Lit controllers appeared white:
image
Anyone experience the same issue? How to fix it?

@RFlintstone
Copy link

RFlintstone commented May 19, 2020

After I changed shader to HDRP/Lit controllers appeared white:
image
Anyone experience the same issue? How to fix it?

Same issue here (although mine are pink / missing textures) - I use the Valve Index.
(I'm using the Unity plugin)

@zite
Copy link
Collaborator

zite commented Jun 5, 2020

As a temporary workaround you should be able to set the shader to a hdrp shader on the controller render model component. For the interaction system that's at Assets/SteamVR/Prefabs/controller. For the CameraRig that's in Assets/SteamVR/Prefabs/[CameraRig] and in the hierarchy under [CameraRig]/Controller (left/right)/Model.
image

@zite zite changed the title Vive controllers appear pink SteamVR Render Model component does not use Universal Render Pipeline shader. Jun 5, 2020
@yellowneck
Copy link

yellowneck commented Jun 5, 2020

The workaround does not render the controller model correctly. I achieved the 'best resutls' with the HDRP/Lit shader resulting in a white controller model like @ziomio mentioned above.

grafik

@ghost
Copy link

ghost commented Jul 23, 2020

I was able to fix the white controllers by changing this line right below the other one:

to:

material.SetTexture("_BaseColorMap", texture);

The default HDRP Lit shader doesn't have a _MainTex field, so setting the mainTexture property on a material using it won't do anything.

@zite
Copy link
Collaborator

zite commented Jul 23, 2020

The latest beta should also fix this problem. See the release here: https://github.com/ValveSoftware/steamvr_unity_plugin/releases/tag/2.6.0b3

@chris-redbeed
Copy link

Im using 2020.1 with 2.6.1 and everything in the "Sample" Scene ist Pink.

@zite
Copy link
Collaborator

zite commented Aug 5, 2020 via email

@zite
Copy link
Collaborator

zite commented Jun 28, 2021

This has been fixed

@zite zite closed this as completed Jun 28, 2021
toydev added a commit to toydev/HC_VRTrial that referenced this issue Nov 21, 2023
toydev added a commit to toydev/HC_VRTrial that referenced this issue Nov 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Has workaround Will Fix This is an issue we're planning to fix but is not yet fixed in the latest version
Projects
None yet
Development

No branches or pull requests