UE4 Tutorial: Occlusion Masking

  Рет қаралды 45,319

underscore

underscore

Күн бұрын

Пікірлер: 124
@olusia2581
@olusia2581 5 жыл бұрын
Thanks a lot for the mention and the link in the description :) Your video tutorial is great - much easier to follow than my simple and hasty description. Nice work!
@underscore00
@underscore00 5 жыл бұрын
Thanks for watching! :) And thank you for the great method! Olusia is looking great so far, keep it up! I love roguelikes ;)
@KavanBahrami
@KavanBahrami 2 жыл бұрын
@@underscore00 is there a reason you use the nodes 'subtract AB' 'abs' 'vector length' rather than the single 'distance AB' material node in your blog post write up?
@DanielGreenDGArtworks
@DanielGreenDGArtworks 4 жыл бұрын
In case anyone is still watching this I found a solution to the shadow issue, add a node in called 'Shadow Pass Switch' and plug the 'if' output into the 'Default' slot on the node, then add a single 'constant' with a value of 1 to the 'Shadow' slot and then plug this into the end of the function!
@DragonCrestPC
@DragonCrestPC 3 жыл бұрын
Thanks!
@Nkrasart
@Nkrasart 3 жыл бұрын
Thanks!
@bardiyaes1399
@bardiyaes1399 3 жыл бұрын
Big Thanks!
@isaackershnerART
@isaackershnerART 2 жыл бұрын
Thank you! been looking all over for that answer!
@franciscojavierpapaia9140
@franciscojavierpapaia9140 2 жыл бұрын
Legend
@JAMbosco
@JAMbosco 4 жыл бұрын
Wanted to point out To prevent occluding the shadows of the object, you can use a *Shadow Pass Switch* node in the material between the occluder function and the opacity mask output Just put the occluder result on the Default pin and add a material expression with number 1 with value "1" on the Shadow input and connect the Switch to the opacity mask and you got it Thanks underscore for sharing this ! It's much appreciated
@JAMbosco
@JAMbosco 4 жыл бұрын
Something like this: imgur.com/a/mR5XNOv
@AJeyLMFAO
@AJeyLMFAO 4 жыл бұрын
@@JAMbosco It works, thanks man!
@JAMbosco
@JAMbosco 4 жыл бұрын
@@AJeyLMFAO Welcome mate
@AJeyLMFAO
@AJeyLMFAO 4 жыл бұрын
@@JAMbosco can you tell me how to add a glow around the edge? Or just the color at the edges of the sphere?
@JAMbosco
@JAMbosco 4 жыл бұрын
@@AJeyLMFAO Will look upon that and tell you, I'm also interested in something like this !
@justadaniel
@justadaniel 5 жыл бұрын
At 13:30, you can actually place a texture object parameter node, you just can’t promote the texture object to a parameter. (Just in case you need it for a future tutorial.) You can also set the texture to the node in BP using the same “set texture parameter” as a regular one. :)
@pompompela6339
@pompompela6339 4 жыл бұрын
Wow, been trying to do this on my own for a while now. This works perfectly, thanks dude!
@jvcnb_off
@jvcnb_off 4 жыл бұрын
Could you happen to help me out lol?
@pompompela6339
@pompompela6339 4 жыл бұрын
@@jvcnb_off ???
@jvcnb_off
@jvcnb_off 4 жыл бұрын
Yeah lol
@pompompela6339
@pompompela6339 4 жыл бұрын
Go on...???
@jvcnb_off
@jvcnb_off 4 жыл бұрын
It’s just not working lol
@Xperto_
@Xperto_ 5 жыл бұрын
I can see how this could be useful in a dense forest. Thanks for the great tutorial
@Xperto_
@Xperto_ 5 жыл бұрын
PS nice window layout
@Vakaseemer
@Vakaseemer 3 жыл бұрын
Awesome result! Thanks for the tutorial!
@KavanBahrami
@KavanBahrami 2 жыл бұрын
Solid tutorial, I now need to make it work for VR as its currently locked to the camera forward, whether or not it's look at the player. If I get a clean solution I'll come back and edit this comment.
@KavanBahrami
@KavanBahrami 2 жыл бұрын
Ended up going a different route. I compared the distance between CameraPos and PlayerPos to the distance between CameraPos and AbsWorldPos, If it was less I just passed white, but if greater I took the angle between the CameraToPlayer vector and the CameraToPixel (AbsWorldPos) divided it by the max degrees I wanted to expose around my character (15) and then clamped result between 0 (or whatever fade I wanted) and 1. Different route, but was the only way I could get the same effect without being locked to the camera view. Now if follows my character around behind objects even if I'm in headset looking away from it. Hope that helps if anyone is doing this effect in VR, if you have any questions hit me up and I'll share a blueprintue pastebin
@matthewdusty199
@matthewdusty199 5 жыл бұрын
Playback Speed 0.25. Good Tutorial!
@_Envoy
@_Envoy 5 жыл бұрын
thinking about to add this to my top down shooter
@aura-interactive
@aura-interactive Жыл бұрын
Thank you! Very helpful indeed!
@Grimswoden
@Grimswoden 5 жыл бұрын
Another awesome tutorial thank you
@RonitManhas
@RonitManhas 5 жыл бұрын
Really great quality content 👍👍👍
@NatePlayzGamez
@NatePlayzGamez 3 жыл бұрын
this is absolutely awesome :) thank you SO much. quick question if its ok, im using the top down templae on ue4, and its not really working when trying to click and navigate within an occluded object. any ideas on how to make it work? thank you so much for your time mate :)
@darkagestudios8879
@darkagestudios8879 2 жыл бұрын
go into the Mesh I think and make collision custom then tick ignore visibility
@DeiversonSilveira
@DeiversonSilveira 3 жыл бұрын
Amazing! Thank you!
@luyaohuang6579
@luyaohuang6579 2 жыл бұрын
THANK A LOT, it is really helpful
@YousefBuHazza
@YousefBuHazza 5 жыл бұрын
Thanks for this tutorial
@Nkrasart
@Nkrasart 3 жыл бұрын
Thanks! Awesome!
@ethandoesguitar1019
@ethandoesguitar1019 3 жыл бұрын
Great tutorial, one of the complex ones that I actually managed to follow! What values would I have to tweak to make it not fully opasive, im trying a tilting maze where the occlusion masking happens on the walls closest to the camera, so would I be able to somehow have the lowest opacity 0.5?
@risenchief6143
@risenchief6143 4 жыл бұрын
Hello, thanks for this tutorial. Did you find the way to fix this hole in shadows?
@benmoseley5178
@benmoseley5178 Жыл бұрын
This is awesome thank you for sharing. Im trying to do something a bit more simple with this but struggling to. I have a diorama with rocks sticking out the base of it, instead of modifying the rock models i was hoping to place a mesh like a cube over them with an occluder material so they disappear. Is that possible with this method if i simplify it somehow? Thank you
@najh1717
@najh1717 5 жыл бұрын
That's awesome! I subbed btw. Can you make a tutorial for creating an Iron Man type blast?
@Tomipolus
@Tomipolus Жыл бұрын
Great tutorial, how would I go if I wanted to apply the effect to my third person character? Lets say there is a button that controls the characters arm, but the character itself is obstructing the view, and I would like to apply the effect inside the middle of character's body, so that the arm is visible from behind the character.
@Tomipolus
@Tomipolus Жыл бұрын
I kinda did it, but its centered in the camera view, is there any way to make it follow the hand? As if the effect is between the wrist and the camera?
@codeyhanson259
@codeyhanson259 4 жыл бұрын
could this effect be done only by one camera and not all camera's
@arturin8084
@arturin8084 Жыл бұрын
Where you able to do it?
@tomraitener8281
@tomraitener8281 3 жыл бұрын
thanks for your tutorial learn a lot ! I need to apply this effect on megascan material but no idea how to do it? Any solution ? Thanks in advance Tom
@LLamafux
@LLamafux 5 жыл бұрын
Perfect
@Went2PlayLLC
@Went2PlayLLC 4 жыл бұрын
how to receive shadow on 100% transparent material? Something like a cutout material, where you dont see color, only shadows from other objects.
@eran3161
@eran3161 3 жыл бұрын
Great video, it's a pretty good start to build on. Btw since opacity masks can only switch between fully visible and fully not visible, the Hardness parameter doesn't really do anything, right?
@JoeTheSpaceGuy
@JoeTheSpaceGuy 5 жыл бұрын
There are literally no tutorials out there for «fog of war». Could you try to cover this?
@coderpup4639
@coderpup4639 5 жыл бұрын
Hey, I've not tried fog of war myself, but if you want to try it yourself, my initial thoughts would be learn how snow trail textures work and you could probably adapt that to a map for fog of war.
@Sivxgamer
@Sivxgamer 3 жыл бұрын
Theres a free one on the marketplace now by VAFogOfWar that works pretty nice, but it's a plugin.
@uddandushaik2051
@uddandushaik2051 5 жыл бұрын
Can you help me i have weapon fps animations but i want to replace with my character in place of another character.reply please i will be so happy. thanku
@underscore00
@underscore00 5 жыл бұрын
Hi! Sounds like you need to look into animation re-targeting! That's where you take the animations from one character and re-target them to the skeleton of a different character. Is that what you're trying to do?
@LeeJackson3d
@LeeJackson3d 3 жыл бұрын
Nice. Any chance you know how to make the occluded object just fade a little so the opacity is half, but still within a bubble?
@underscore00
@underscore00 3 жыл бұрын
Yes you can! I chose a masked material for performance reasons, but you can set the material to translucent if you like. You can also use a node called 'DitherTemporalAA' that will add graded opacity to masked materials without losing functionality by changing it to translucent :)
@LeeJackson3d
@LeeJackson3d 3 жыл бұрын
@@underscore00 thanks for reply. That works well, the issue i have tho is my whole terrain is translucent now heh. The things to be occulded at mostly terrain that runs from one material.
@SkullsForSale
@SkullsForSale Жыл бұрын
@@underscore00 MY GOD SIR! You are absolutely the bees knees!
@lightps5515
@lightps5515 5 жыл бұрын
wooow! COOL
@alessiagrassi
@alessiagrassi Жыл бұрын
is there a way to use a cylinder shape instead of a sphere?
@ayanoaishi794
@ayanoaishi794 5 жыл бұрын
Thanks for the tutorial! But I was wondering if you could show how to create icons like in fortnite. Would be nice to have cool icons for cosmetics in my game C:
@pakoo7715
@pakoo7715 5 жыл бұрын
hello, could u say some words about Wpn world collision? i mean, could u make a video how to fix weapon clipping through the wall?
@LooksLikeIdiot
@LooksLikeIdiot 3 жыл бұрын
Sick tutorial, just the thing I needed, would anyone happen to know why it doesn't work with an ortographic camera? If i change my camera to perspective it goes just fine but with ortographic it leaves a weird stationary culling spot always in the same place in the scene. Does the ortographic camera not physically move? is there a way to make this work with it
@lhmsc
@lhmsc Жыл бұрын
In theory an orthographic camera is infinitely pulled back and zoomed in. Probably because of it's nature the camera position isn't calculated correctly.
@AdrenResi
@AdrenResi 5 жыл бұрын
hey underscore are you coming back soon
@ФедорСимонов-ф1ч
@ФедорСимонов-ф1ч 3 жыл бұрын
tell me how change size first sphere in center???
@yashbijlani6652
@yashbijlani6652 5 жыл бұрын
It annoys me soo much seeing how underrated you are :(
@underscore00
@underscore00 5 жыл бұрын
The channel is growing slowly :) The best thing you can do to help is to share videos far and wide and get as many eyes on it as possible! No pressure though, thanks for watching :)
@yashbijlani6652
@yashbijlani6652 5 жыл бұрын
@@underscore00 ok ill tell my friends to subscribe to you
@yoapolloboy
@yoapolloboy 5 жыл бұрын
Hey bro, u can do a new tutorial to cloth simulation for 4.21 please?
@MadaoKing
@MadaoKing 4 жыл бұрын
Great tutorial! I am having a problem where the occlusion mask is not happening on the character but right next to it. Do you know what might be the cause for it?
@bernardgra
@bernardgra 4 жыл бұрын
Hello, did you manage to fix this by any chance?
@MadaoKing
@MadaoKing 4 жыл бұрын
@@bernardgra yes i did! :)
@bernardgra
@bernardgra 4 жыл бұрын
@@MadaoKing I am having a similar issue. How did you manage to fix it?
@MadaoKing
@MadaoKing 4 жыл бұрын
@@bernardgra I missed one variable in it. happened when i try to skip steps
@bernardgra
@bernardgra 4 жыл бұрын
@@MadaoKing I see. I think my problem comes from the fact that my camera fis finda fixed in the center of the screen and the character is not always in the center :/
@ChinaFriedPanda
@ChinaFriedPanda 4 жыл бұрын
Is there any way to make this a semi-transparent mask instead of fully transparent? I'm aware that Opacity Mask is designed to be either 0 or 1 :(
@underscore00
@underscore00 4 жыл бұрын
Yes! You can convert the material to translucent and then use the opacity pin (instead of opacity mask) and then use a clamp node to increase the minimum to a value above 0. This also opens you up to using soft edges and other effects, but you might notice a slight hit to performance.
@studiotkt2991
@studiotkt2991 11 ай бұрын
Thanks for the vid, but i have a problem, the panner node refuses to work. I also tried a rotator (as it only needs a single value) but they don't update, so to speak. Using the MPC if i adjust the speed value in real time, you can see the U channel scrolling, but it won't move on its own. I'm on 5.3 and have had panning lava materials work in all versions prior to 5.3. Is it a bug? My mat function looks exactly like yours, and yes i have meticulously gone over every node to confirm.
@underscore00
@underscore00 11 ай бұрын
Hmm interesting. Are you saying the panner doesnt work in the editor or when you play the game? It sounds like your editor is potentially not set to real-time. If that's not the case then I'll have to investigate, I havent followed this in 5.3 yet. Thanks for the thoughtful comment :)
@studiotkt2991
@studiotkt2991 11 ай бұрын
@underscore00 I've actually had to read some pretty obscure articles but it seems that a scalar parameter (fed from MPC) is understood by the panner to be a 'fixed' number, i unplugged the speed and multiply and just fed it a .1 on x speed and it works. Maybe this is a change in 5.3? i.e the panner can also be used to offset the uv coords, not just animated panning. Not sure, but thanks for your time.
@underscore00
@underscore00 11 ай бұрын
@@studiotkt2991 ah interesting, I hadn't noticed that! Might be worth making an update video about
@studiotkt2991
@studiotkt2991 11 ай бұрын
@@underscore00 I think it would benefit new users especially to make a new video ( more likes the better am i right :) ? ). I mean a few nodes have changed, for example, the 'absolute world position' node now has split struct pins so you can choose which axes to take, ultimately meaning you don't need to 'transform vector' anymore. Little things like that would confuse a newbie. As I said, i have been using unreal from 4.6, i moved from unity when i heard murmurs of nanite being developed and OMG am i glad i did. Moving to materials without tessellation was a shock to me, it made sense for high poly models in the nanite system, however, characters aren't supported within nanite, so doing away with tessellation/heightmap in this instance, in the knowledge that nanite will eventually include characters, probably wasn't their best move. I know a lot about unreal, but i am sooooooooooooooooooo far away from knowing everything. Point being, i thank you once again for making specific videos, but more importantly, with specific titles. Searching for what you need in unreal, is a completely different vocabulary for searching a unity vid.
@jvcnb_off
@jvcnb_off 4 жыл бұрын
So this isn’t working for me, is there any way my camera distance has something to do with it? Aspect ratio and camera distance are the only thing I changed from the third person template
@jonzcrypto
@jonzcrypto 3 жыл бұрын
Hey, you ever get this resolved? I'm having the same issue where it appears behind my player if the camera is not centered directly over them.
@jvcnb_off
@jvcnb_off 3 жыл бұрын
@@jonzcrypto kzbin.info/www/bejne/a4qUi51rnb2XkNk I find this one easier to follow, even though it's in what I think is Russian lol
@arvideo2145
@arvideo2145 Жыл бұрын
Hi, Does it affect performance in any way? e.g Does it reduce FPS?
@underscore00
@underscore00 Жыл бұрын
If you use it like in the video, the performance impact should he negligible. If your experience a frame rate drop, let me know and we can discuss the specific case :)
@JAMbosco
@JAMbosco 4 жыл бұрын
But how can you implement this on an already masked two sided foliage material?
@JAMbosco
@JAMbosco 4 жыл бұрын
Okay I got this.. Using multiply *face palm* xD
@underscore00
@underscore00 4 жыл бұрын
@@JAMbosco thats exactly what I wouldve suggested :)
@Mr1eeer
@Mr1eeer Жыл бұрын
@@JAMbosco Wish I read this comment three hours ago.
@SkullsForSale
@SkullsForSale Жыл бұрын
Can you elaborate please? I have foliage that already has an Occlusion Mask node, without it plugged in the leaves are a globby mess, how do I input both of them into the Occlusion Mask input?
@SkullsForSale
@SkullsForSale Жыл бұрын
AAAhhhh I mixed it with the "MultiplyVectorWithQuaternion" node, it works! :D
@darkagestudios8879
@darkagestudios8879 2 жыл бұрын
So this only works as a Material? I am new to this and I have it working but If I have a pre textured BP asset how do I get it to work on that without replacing the material ?
@underscore00
@underscore00 2 жыл бұрын
Its a masking material, so you only need whatever nodes are plugged into 'opacity mask' to make the effect work. This means you can pretty easily adapt your existing materials by selecting the main output node and changing the domain to 'masked'. Hope that helps :)
@darkagestudios8879
@darkagestudios8879 2 жыл бұрын
@@underscore00 Thank you for the reply, I realized that after a little playing around :) I was using pre made assets and didn't know how to get it to work with them (Still don't) so I am making my own :)
@leoivanovic4538
@leoivanovic4538 Жыл бұрын
@@underscore00 Great tutorial I wish this part was in the video but really glad you responded. So we have to go into each material for each object and add the "occluder_MF" into the mask plug? Thanks again a lot of us are really new and all these little steps really matter!
@nowak93
@nowak93 3 жыл бұрын
Where did you learn all this? I find it hard to find good learning material on Unreal Material Shaders.
@sloane_lysbeth
@sloane_lysbeth 3 ай бұрын
i can only get it working along horizontal planes. has anybody else had this problem? im not sure if it's a change between ue4 and ue5 or if im missing something somewhere. i included a vid that shows what i mean. kzbin.info/www/bejne/gZycfqVmjJucgrM
@sloane_lysbeth
@sloane_lysbeth 3 ай бұрын
i figured it out. in unreal 5 the transform vector node has drop down options. by default the source is set to tangent space. you just need to switch the source to world space. silly mistake on my part.
@a_blue_chicken1093
@a_blue_chicken1093 7 ай бұрын
1:44 racism!!! (its a joke)
UE4 - Tutorial / HowTo - Line of Sight Vision System
46:52
OkariCrafts
Рет қаралды 25 М.
UE4 Tutorial 101 - Occlusion Outlines
40:33
Rod Villani
Рет қаралды 77 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 125 МЛН
Perfect Pitch Challenge? Easy! 🎤😎| Free Fire Official
00:13
Garena Free Fire Global
Рет қаралды 90 МЛН
UE4 - Tutorial - Render through Walls!
16:30
Dean Ashford
Рет қаралды 45 М.
UE4 - Tutorial - Hologram Material! (Request!)
21:46
Dean Ashford
Рет қаралды 182 М.
Unreal Engine AI with Behavior Trees | Unreal Engine
26:38
Unreal Engine
Рет қаралды 361 М.
Stylized lines and outlines - Unreal Material
46:47
Kamil Hepner
Рет қаралды 59 М.
TPS Mesh Fading - Tutorial Episode 7
21:54
NeuroFlow
Рет қаралды 7 М.
UE4 Tutorial Occlusion Masking
29:01
Channel Zero
Рет қаралды 6 М.
Distance Fields (Part 1) | 5-Minute Materials [UE4/UE5]
9:20
PrismaticaDev
Рет қаралды 116 М.
Unreal Engine 5 - Occlusion Masking (See Through) Part 1
29:56
Unreal DevOP
Рет қаралды 7 М.
Understanding "Components" in Unreal Engine | UE5 Explained
28:11
Ali Elzoheiry
Рет қаралды 42 М.
Hoodie gets wicked makeover! 😲
00:47
Justin Flom
Рет қаралды 125 МЛН