Virtual Windows in Passthrough Mode | Selective Passthrough Shader & Stencil Shader

  Рет қаралды 2,800

Black Whale Studio - XR Tutorials

Black Whale Studio - XR Tutorials

Күн бұрын

Hi XR Developers! In this video we will learn how you can easily create these amazing virtual windows inside your room, like we have seen from many viral videos lately, like Ocean Rift! If you want to take this experience one step further and smash realistic wholes into your walls and ceiling, check out my exclusive tutorial on Patreon, on how to create your own “First Encounters” Meta Quest experience!
💥 [EXCLUSIVE] Mesh Destruction System - Recreating 'First Encounters' by Meta!: / exclusive-mesh-99965227
Resources:
🔗 ShaderLab command Stencil: docs.unity3d.com/Manual/SL-St...
🔗 Explore your own aquarium in 360 for VR!: • 【360°VR】Explore your o...
🔗 ShaderLab Culling & Depth Testing: docs.unity3d.com/2019.1/Docum...
🔗 Selective Passthrough Sample: developer.oculus.com/document...
🔗 Vintage Ship Portholes Type A: sketchfab.com/3d-models/vinta...
Other Videos:
📹 Mixed Reality Utility Kit: Build spatially-aware apps with Meta XR SDK: • Mixed Reality Utility ...
📹 Meta’s Building Blocks | Develop Mixed Reality Apps lightning fast: • Meta’s Building Blocks...
📹 How to use Lights & Shadows in Passthrough Mode: • How to use Lights & Sh...
📹 Get Started with Meta Quest Development in Unity: • Get Started with Meta ...
📹 Meta Quest Scene API: • Meta Quest Scene API |...
📹 Meta XR Simulator: • Meta XR Simulator | Sy...
Join the Discord!
👾 / discord
Support the Channel:
🫂 Patreon: / blackwhalestudio
🐦 Twitter: / xrdevrob
🤝 Join this channel to get access to perks:
/ @blackwhalestudio
Need professional XR & Multiplayer development for your project?
👨‍💻 Get in touch with us: bento.me/blackwhale
Chapters:
0:00 Intro
0:48 Project Setup
1:26 Create Video Skybox
2:30 Scene Setup
3:11 Passthrough Shader
3:54 Stencil Shader
6:10 Setup Render Object in URP Render Settings
7:00 Script to Apply Layers to Walls
8:16 Create Window Prefab
9:06 Script to position Windows
11:04 Outro

Пікірлер: 31
@leynenslucker2991
@leynenslucker2991 3 ай бұрын
Damn, you can't stop giving! Keep going!!
@blackwhalestudio
@blackwhalestudio 3 ай бұрын
Thanks! I'll keep trying my best! What would you like to see next?
@NathanPuozzo
@NathanPuozzo 3 ай бұрын
You deserve way more views ! You rock !
@blackwhalestudio
@blackwhalestudio 3 ай бұрын
Thank you so much! Honestly, it's not about the views, I'm quite happy already. It's just great to see reactions of people when they save time or manage to do something thanks to my videos! :)
@JasonSGameDev
@JasonSGameDev 3 ай бұрын
Excellent Tutorial. I've been looking forward to more information on this. With some experiments on top, I learnt if you want a raycast to shoot through the wall and hit objects behind you will have to make a collider for the window object, the one that lets you see through the wall, big enough that it is thcker then the wall, and when the ray hits it has to create a new raycast to continue in the previous cast's trajectory (I used a ~Wall layermask, to avoid the ray from picking up a hit from the wall layer, on the new "continuation ray"). My only issue is with now using Canvas layers, and other alpha effects, all seem to be rendered behind my walls until the walls are blasted away and all there is, is the 3d world behind. My guess it has to do with sorting layers? ** update to that question. I figured out that if you replace the materials for your UI elements to be Opaque materials, then you will not have that issue. Transparent and Alpha textures are drawn from back to front. So, for all your effects and UI elements that are happening inside your living space, you might want to use Opaque materials so that they are drawn in front.
@blackwhalestudio
@blackwhalestudio 3 ай бұрын
Thanks so much for all this info, im sure it will help a bunch of people!
@rogerpingleton9199
@rogerpingleton9199 2 ай бұрын
First of all THANK YOU! This is so cool! Second. I am having an issue that is preventing me from implementing this. When I get to the 3:42 point where I should be able to see just the passthrough to the walls, I see passthrough in my left eye and the skybox in my right eye while using the link to test. Additionally I get the "...it's required to do a runtime permission request" issue, and when I hit fix, it just comes back, and the OVR manager never asks permission. Any ideas. Again thank you for all your videos. They are so amazing and so helpful!
@wallawAllwlla
@wallawAllwlla 2 ай бұрын
I bumped into the same issues, but I just kept following up the tutorial, and the final outcome works as normal (build to the device, unplug the quest link, and run on the device alone)
@blackwhalestudio
@blackwhalestudio 2 ай бұрын
Yes unfortunately it is normal to see two different things on two eyes. I am not entirely sure what this is caused by. Is there still an issue you are facing?
@grimsbaldruk4014
@grimsbaldruk4014 Ай бұрын
Hello ! Currently facing this problem in Editor and can't seems to make it work on standalone headset (Passthrough not showing at all). Did you encountered the same issue, if so did you manage to fix it ?
@anmaavr8315
@anmaavr8315 3 ай бұрын
Great tutorial! Can’t wait to try it! I have a question. Do you know if it’s possible to have multiplayer option to the passthrough mode? Can I have it other people join (remotely not in local) when I am in the MR environment?
@blackwhalestudio
@blackwhalestudio 3 ай бұрын
Technically yes, the passthrough shouldn't have any impact on your multiplayer features!
@LucasHorgan-go5ln
@LucasHorgan-go5ln 3 ай бұрын
Great Tutorial man, very straight forward and easy to understand ! Keep up the good content ! I have a question is this functionality currently only doable using the OVR toolkit ? Or is there a way to do it with OpenXR aswell ? The MRUK has to be used in connection with the OVR set up I guess ?
@blackwhalestudio
@blackwhalestudio 3 ай бұрын
Technically you can just use the same shaders with OpenXR. But yes, to use MRUK you have to use OVR!
@LucasHorgan-go5ln
@LucasHorgan-go5ln 3 ай бұрын
I ended up taking a different approach BUT your tutorial is the only one I saw on youtube which mentioned checking for the renderer in ProjectSettings ->Quality, I was stuck for days with it not working on the Quest but now it does... So thank you very much this really is a helpful tutorial !@@blackwhalestudio
@mrbanana101
@mrbanana101 Ай бұрын
Amazing tutorial, thanks so much! I was able to successfully get it up and running. Though, do you know if there's any way to enable rendering of transparent objects with alpha (materials that aren't completely opaque) in passthrough? Another commentor below said that they had to just not use alpha materials, but for the game I'm developing, the particular art style takes a bit of a hit if I can't render alpha materials in passthrough mode. Thanks!
@blackwhalestudio
@blackwhalestudio Ай бұрын
Can you try setting the render queue to 2999?
@mrbanana101
@mrbanana101 Ай бұрын
​@@blackwhalestudio thanks for the quick reply! Almost there - I set the vr passthrough material's render queue to 2999, and alpha works now in passthrough, thanks so much! But unfortunately, the stencil shader no longer seems to take effect, so it's not cutting out to display the VR world behind it. I have the stencil material at render queue of 3000, so I attempted setting it higher without any luck, I tried adjusting the shader and material settings for a bit with no success yet
@kylehentschel4858
@kylehentschel4858 Ай бұрын
great tutorial. this method has a lot of flexibility. But I am stuck, the default UI material is rendered underneath the passthrough material. any tips to fix this?
@blackwhalestudio
@blackwhalestudio Ай бұрын
Have you tried adjusting the render queue?
@Filmblanc
@Filmblanc Ай бұрын
How can I get particles to render in my actual space and not as a part of the "outside" skybox rendered world?
@blackwhalestudio
@blackwhalestudio Ай бұрын
MRUK allows you to spawn things within your actual space, check the MRUK API
@user-id5rx4xu8m
@user-id5rx4xu8m 3 ай бұрын
Thanks for this, is there a version that doesn't use URP? What would I need to change to make it work in core?
@blackwhalestudio
@blackwhalestudio 3 ай бұрын
URP is required unfortunately
@user-id5rx4xu8m
@user-id5rx4xu8m 3 ай бұрын
Ok I achieved it in Core but it took a lot of experimentation :)
@blackwhalestudio
@blackwhalestudio 3 ай бұрын
@@user-id5rx4xu8m Great! How did you do it?
@user-id5rx4xu8m
@user-id5rx4xu8m 3 ай бұрын
I'll post to your Discord channel when I have the time.
@yoyopei3793
@yoyopei3793 2 ай бұрын
@@user-id5rx4xu8m Look forward! I use built-in too
@mdelight31
@mdelight31 3 ай бұрын
Very interesting tutorial! Thanks heaps! My only problem is that the raycast hits much closer from the user than the actual room wall thus placing the window offseted from the wall instead of flush to it... Any idea ?
@blackwhalestudio
@blackwhalestudio 3 ай бұрын
In the editor or on your device?
@mdelight31
@mdelight31 3 ай бұрын
⁠thanks for the quick reply! In the device, and also realized it was not a problem with the raycast but more that my room was all offseted and rotated weirdly…
Create and Manage SwiftUI windows with Unity PolySpatial for Apple visionOS
13:30
Black Whale Studio - XR Tutorials
Рет қаралды 1,8 М.
Loading Scenes On Demand Has Never Been Easier!
16:00
git-amend
Рет қаралды 3,9 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН
World’s Deadliest Obstacle Course!
28:25
MrBeast
Рет қаралды 141 МЛН
Универ. 13 лет спустя - ВСЕ СЕРИИ ПОДРЯД
9:07:11
Комедии 2023
Рет қаралды 6 МЛН
From the NAB Show Floor | Evercast
12:30
ProVideo Coalition
Рет қаралды 9
Quest 3: The ULTIMATE Cinema Experience
8:15
Cas and Chary XR
Рет қаралды 216 М.
The Liquidview Story -   Stunning Virtual Windows
2:46
Leon Speakers & the Leon Loft
Рет қаралды 9 М.
Atmoph is your virtual window to the rest of the real world
1:45
BOOST your FPS with occlusion culling | #UnityIn60Sec
1:00
Nerd Head
Рет қаралды 104 М.
XRI Hand Interactions with PICO Unity OpenXR
18:13
PICO Developer
Рет қаралды 680
Apple Vision Pro UI Interactions with Unity PolySpatial | Keyboard and Voice Inputs
8:52
Black Whale Studio - XR Tutorials
Рет қаралды 1,2 М.
OMG🤪 #tiktok #shorts #potapova_blog
00:50
Potapova_blog
Рет қаралды 17 МЛН