4 ms·
Oh man, I've wanted to do something like this for a while, but I didn't know the software to do it had already been written, and also I don't have a VR headset.
by drdeca 6y ago
Oh man, I've wanted to do something like this for a while, but I didn't know the software to do it had already been written, and also I don't have a VR headset.
So you can have it render an object which shows different colors to different eyes, while rendering the rest of the scene normally?
What software supports this?
- r34 6y agoThat's exactly my problem as well. I have GearVR headset which fits seversal Samsung smartphones and it's really nice to play around (and it's cheap), but the only piece of software written for WebVR is Three.js module, which doesn't allow different scene presentation to each eye. But maybe I'll get back to work on my hack. Some suggestions are here: https://stackoverflow.com/questions/53775620/webvr-update-scene-independently-for-each-eye https://stackoverflow.com/questions/53775620/webvr-update-sc...
- terramex 6y agoI used Unity's layers system (more on that in sibling comment: https://news.ycombinator.com/item?id=24367460 https://news.ycombinator.com/item?id=24367460). I have zero experience with WebVR, but solution you linked seems sensible.
- terramex 6y agoI used old version of Unity (5.4? maybe even older) and tested it on both Google Cardboard and Oculus CV1. It used to have separate cameras for left and right eye. Unity has a system of layers and every camera has a bitmask that defines which layers are rendered by it. So I simply left environment on default layer rendered by both cameras, put one copy of an object on 'Left' layer and another copy with different material on 'Right' layer. Worked really nice for "vampire" eyes (specifically irises) rendering. Few years ago they switched to single pass stereo rendering to avoid rendering whole scene twice. In theory this legacy option to use two cameras is still there, but quick googling says that it has some issues on modern Oculus SDK's and new Unity render pipelines but workarounds are possible. https://forum.unity.com/threads/right-eye-black-for-urp-on-quest.785216/?_ga=2.240617926.410097421.1581197907-1098139994.1581197907 https://forum.unity.com/threads/right-eye-black-for-urp-on-q... https://forums.oculusvr.com/community/discussion/90660/unity-xr-management-and-right-eye-rendering-issue https://forums.oculusvr.com/community/discussion/90660/unity... https://answers.unity.com/questions/1534621/vr-how-to-render-gameobject-in-one-eye-only.html https://answers.unity.com/questions/1534621/vr-how-to-render...