Show LOOT & ENEMIES Behind Walls (Unity URP)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys it's Matt welcome to speed shooter I'm going to show you how to do a really cool occluded or objects that hide behind walls and to be able to show those whether you use them for a cool effect for searching for assets that might be hidden and this will be solely in urp with a few render features and it's really awesome and quick to do and I'll show you today okay so to start off I've got two objects here this could be any object it could just be some cubes if you really wanted what we need to do is create layers for these to be honest so they'll be occluded if they're on a particular layer so I'm just gonna make sure I go to the top Corner if I've got an object selected and choose to add layer and I'm just going to call it Loot and that's what it'll be you could name it enemy anything you want I'll select my two objects and I'm going to make sure that I set those objects to that layer and I'm going to say yes to change all the children if each of these have children because we want to affect every single 3D object that it has now I've created a new material by right clicking create and choosing material and I've just called this red occluded I've got it as the normal Universal render pipeline lit material with a transparent surface type and I've just made it red and pulled the alpha down so it's a slightly see-through material now from there we want to go to your urp renderer so in this case the default scene uses the High Fidelity renderer and then we want to add a new render feature and we want to add render objects which is the experimental feature so what I'm going to do is I'm going to call this the occluded render object just so that we know when if it's collapsed we know what that is we can render after our picks and we want to set the layer mask to loot or whatever it is the thing we want to mask we want to make sure that we open up the overrides and we want to add depth and then we want to make sure that we untick the right depth and you make that the depth test should be greater than so now you can already start to see these through walls because it just renders it above other objects you can add your own material here so we can just add red occluded in this case and then as you can see in my in my scene even when where in front of it we always actually see the occludedness now we need to be able to create something so when we're near it or not behind something it's not occluded anymore so I want to add another render object and we just call this one not occluded then we can do the same thing but in the filters we want to make sure that we add loot again as the filter and we don't need any overrides at all and then you can test out when you start your game you can see that the object is occluded but you can also see it through that wall with the material and you can also see any other objects that you tag that's through the wall too so I hope you found this tutorial useful and you can use it to create some cool things in your games do be sure to check out my patreon to get access to over 185 different scripts assets and projects you cannot find anywhere else be sure to check out all the links in the description for the best sales savings and everything you can find in Game Dev and check out my great assets on the unity asset style along with massive savings on my website big thank you to all my patrons including Peter Steiner rohini Whitaker Manos paracas Walter doing some running Leisure Alyssa faden hush Thomas Murray Mark rondu Marvin Church crew for Life gaming Austin certain Jin quid Duan Cooper Johanna Nixon Leslie winter Heather Fletcher Mark VAC on Andre Ferreira larion to Dylan C Liam gray woblin Lin Dennis Foreman lemu Shin Finley Cal Frederick shibimarian Darko Pena ASAP gunawan tozigai Fury and tame ire and thank you for watching the video and don't forget to like comment and subscribe cheers
Info
Channel: SpeedTutor
Views: 6,181
Rating: undefined out of 5
Keywords: speed tutor, speedtutor c#, speed tutor c#, speed tutor unity, see through unity, occlude unity URP, urp occluding objects, can for loot, loot scanner unity, unity scanner, unity see through shader, unity occlusion shader, unity occlusion material, unity occlude culling, unity see through objects behind walls, behind walls, unity behind walls, unity urp tutorial, unity hdrp, unity tutorials, unity tutorial, unity3d, unity
Id: NXXc9xXzqnk
Channel Id: undefined
Length: 3min 41sec (221 seconds)
Published: Tue Mar 21 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.