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 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?
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!
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
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. :)
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 :)
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.
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
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?
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
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 :)
@@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.
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.
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?
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.
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?
@@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 :/
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
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?
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?
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
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.
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.
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 :)
@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 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.
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.
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
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 ?
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 :)
@@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 :)
@@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!
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?
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 :)
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:
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. th-cam.com/video/Kk9Mr0W6iLQ/w-d-xo.html
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.
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 :)
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!
Thanks for watching! :) And thank you for the great method! Olusia is looking great so far, keep it up! I love roguelikes ;)
@@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?
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!
Thanks!
Thanks!
Big Thanks!
Thank you! been looking all over for that answer!
Legend
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
Something like this: imgur.com/a/mR5XNOv
@@JAMbosco It works, thanks man!
@@AJeyLMFAO Welcome mate
@@JAMbosco can you tell me how to add a glow around the edge? Or just the color at the edges of the sphere?
@@AJeyLMFAO Will look upon that and tell you, I'm also interested in something like this !
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. :)
Really cool to see and actually followable
Wow, been trying to do this on my own for a while now. This works perfectly, thanks dude!
Could you happen to help me out lol?
@@jvcnb_off ???
Yeah lol
Go on...???
It’s just not working lol
I can see how this could be useful in a dense forest. Thanks for the great tutorial
PS nice window layout
Awesome result! Thanks for the tutorial!
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 :)
go into the Mesh I think and make collision custom then tick ignore visibility
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.
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
Playback Speed 0.25. Good Tutorial!
Hello, thanks for this tutorial. Did you find the way to fix this hole in shadows?
thinking about to add this to my top down shooter
Another awesome tutorial thank you
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?
Thank you! Very helpful indeed!
could this effect be done only by one camera and not all camera's
Where you able to do it?
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
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?
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 :)
@@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.
@@underscore00 MY GOD SIR! You are absolutely the bees knees!
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.
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?
There are literally no tutorials out there for «fog of war». Could you try to cover this?
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.
Theres a free one on the marketplace now by VAFogOfWar that works pretty nice, but it's a plugin.
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
how to receive shadow on 100% transparent material? Something like a cutout material, where you dont see color, only shadows from other objects.
Amazing! Thank you!
THANK A LOT, it is really helpful
Really great quality content 👍👍👍
is there a way to use a cylinder shape instead of a sphere?
That's awesome! I subbed btw. Can you make a tutorial for creating an Iron Man type blast?
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?
Hello, did you manage to fix this by any chance?
@@bernardgra yes i did! :)
@@MadaoKing I am having a similar issue. How did you manage to fix it?
@@bernardgra I missed one variable in it. happened when i try to skip steps
@@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 :/
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
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?
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?
tell me how change size first sphere in center???
Thanks for this tutorial
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?
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
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.
Thanks! Awesome!
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.
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 :)
@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.
@@studiotkt2991 ah interesting, I hadn't noticed that! Might be worth making an update video about
@@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.
hey underscore are you coming back soon
Hey bro, u can do a new tutorial to cloth simulation for 4.21 please?
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 :(
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.
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
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.
@@jzcrypto th-cam.com/video/5Y1Zj5hXdZw/w-d-xo.html I find this one easier to follow, even though it's in what I think is Russian lol
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 ?
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 :)
@@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 :)
@@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!
But how can you implement this on an already masked two sided foliage material?
Okay I got this.. Using multiply *face palm* xD
@@JAMbosco thats exactly what I wouldve suggested :)
@@JAMbosco Wish I read this comment three hours ago.
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?
AAAhhhh I mixed it with the "MultiplyVectorWithQuaternion" node, it works! :D
Hi, Does it affect performance in any way? e.g Does it reduce FPS?
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 :)
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:
❤❤❤
Perfect
wooow! COOL
Where did you learn all this? I find it hard to find good learning material on Unreal Material Shaders.
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.
th-cam.com/video/Kk9Mr0W6iLQ/w-d-xo.html
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.
It annoys me soo much seeing how underrated you are :(
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 :)
@@underscore00 ok ill tell my friends to subscribe to you
1:44 racism!!! (its a joke)