ExtendRealityLtd / VRTK

An example of how to use the Tilia packages to create great content with VRTK v4.
https://www.vrtk.io/
MIT License
3.69k stars 993 forks source link

[Controller] Provide highlight of controllers on interactions (touch/grab/use) #28

Closed thestonefox closed 8 years ago

thestonefox commented 8 years ago

It's not possible to change the colour of the controller meshes as the dark textures of the HTC controllers don't lend themselves well to tints.

However, it may be possible to use a different shader and provide an outline colour on the controller models (like as seen in The Lab)

thestonefox commented 8 years ago

Attempted to use an outline shader on the controller model, but the model shows outlines around all of the sub components and looks quite messy.

GloryFish commented 8 years ago

I spent some time messing with the 2-camera approach described here: http://blog.tammearu.eu/index.php/2015/10/09/unity-outline-glow-2-cameras-edge-detection-and-single-color/

It renders proper outlines for objects including the controller models but I could not get the overlay camera to match the FOV of the SteamVR camera or render in the headset. My guess is this is due to how the SteamVR_Camera component submits frames to the compositor which seems to preclude multiple cameras.

I tested in Unity 5.3. Perhaps the native implementation in 5.4 supports multiple cameras?

thestonefox commented 8 years ago

I've done it with custom shaders, but the controller models are full of edges that when you glow the outline it's not very nice looking.

thestonefox commented 8 years ago

Can use SkinnedMeshRenderer to change the controller colour

thestonefox commented 8 years ago

Trello Card https://trello.com/c/BRJRrzrH

thestonefox commented 8 years ago

Kinda completed with: https://github.com/thestonefox/SteamVR_Unity_Toolkit/commit/1c7c93b8349b7b1d12510792d4cce8f43d1eb988

I'm closing for now