UE4 Tutorial 101 - Occlusion Outlines

  Рет қаралды 78,146

Rod Villani

Rod Villani

Күн бұрын

Пікірлер: 313
@Bas3008
@Bas3008 5 жыл бұрын
This tutorial is really awesome! The best thing is that you don't just add all the notes and show the result, but you explain the thought process behind it. That's incredibly helpful.
@RVillani
@RVillani 5 жыл бұрын
Thank you! I always wanna know the "why", not just the "how". So that's how I try to explain stuff. Because if you know the "why", you might use it to solve something else.
@rexxthunder
@rexxthunder 4 жыл бұрын
I like how you actually explain what each of the parts are doing as you make them. Great job!
@RVillani
@RVillani 4 жыл бұрын
Thanks, Rexx! I really appreciate that, as it's the thing I try to focus the most. ^^
@NJoint
@NJoint 9 ай бұрын
Man, this is the best tutorial I've watched in a long while. It wasn't just some mindless button-pushing. You made me understand what I was doing. Thanks a lot
@RVillani
@RVillani 9 ай бұрын
Thank you for letting me know! 🫶 I really strive to teach the why, not just the how. That way you can get this new knowledge and apply it to a different problem.
@NJoint
@NJoint 9 ай бұрын
@@RVillani you nailed it with this one. I shared it to a couple of colleagues. I really hope you can afford to do this more often
@RVillani
@RVillani 9 ай бұрын
@@NJoint Thank you for the kind words! I hope so too. I was very frustrated with my latest videos. The audio was bad (don't know how I didn't notice that while editing) and I feel like I'm not explaining things in a clear manner. Because of that I've been holding off on making more content until I figure out why I became so terrible at explaining this stuff.
@IinesySankka
@IinesySankka 7 жыл бұрын
As a newbie in the VFX community, I'm extremely grateful for you doing these. Just wanted to let you know that. You're a huge help. Thank you so much
@RVillani
@RVillani 7 жыл бұрын
I'm very happy to help ^_^
@micmacha
@micmacha 7 жыл бұрын
I'm relatively new to the UE4 community, and have been looking everywhere for a reasonable tutorial just on post processing and making occluded objects visible in some way. You sir hit the nail on the head. I've subscribed to keep track of you--thank you very much!
@RVillani
@RVillani 7 жыл бұрын
Thanks! Just a heads up, I don't post only tutorials, I also do some art stuff using Unreal and post the videos. But I'll soon be back on making tutorials. Gotta make time in between jobs.
@Beriol9
@Beriol9 7 жыл бұрын
Thanks a lot for the explanation! I've looked everywhere for an explanation for outlines, but everybody just shoves the material in your face without any comments. You explained it perfectly :)
@RVillani
@RVillani 7 жыл бұрын
Thanks! I'm also not very fond of "do this and that" tutorials. I wanna know WHY to do this and that. Why press this button instead of the other one?
@Beriol9
@Beriol9 7 жыл бұрын
Exactly :) by understanding how it works I managed to modify it to suit my needs, for example making it work with multiple outlines on top of each other (as you mentioned at the end of the video). By the way, I'm looking forward for your next tutorials! :D
@RVillani
@RVillani 7 жыл бұрын
Thanks! I'll tru to get back to them, but right know I need to be able to pay the bills, so I'm drowning myself in freelancing. But I still have a big list of tutorials to make.
@erbmur
@erbmur 8 жыл бұрын
Dude, you, you are something special. I have been looking for something like this for a very long time now! Modified it slightly to only highlight on things when you are close to them, but wouldn't have been able to do it without you.
@RVillani
@RVillani 8 жыл бұрын
Great! Glad I could help! :D It's greatly appreciated if you share it wherever you can! ^_^
@coreythomas2778
@coreythomas2778 7 жыл бұрын
If you could explain how you did that it would seriously help me out.
@RVillani
@RVillani 7 жыл бұрын
You can measure the distance between the object and the camera using the custom depth output. Then, take that value, subract your minimum required distance from it, ceil, clamp to 0~1 then use 1-x (OneMinus) on the result. Multiply that by the outlines alpha. So, if the distance is less than the required (ie., you're close to the object), the result will be 1 and it will show the outlines. If it's any greater (you're far), the result will be 0 and the outline will be removed.
@erbmur
@erbmur 7 жыл бұрын
I just used an overlap volume, and have overlap enable/disable custom render
@RVillani
@RVillani 7 жыл бұрын
Hahahaha that'll work too XD But for several objects at different locations, you'd need more overlaps.
@fl260
@fl260 3 жыл бұрын
The fact that you explain every detail with that Portuguese accent is brilliant since it reminds me of my jiu jitsu coach. I was bummed out when I saw the length of the tuto at first, but in the end it's totally worth it. Muito Obrigado.
@RVillani
@RVillani 3 жыл бұрын
And to think I've been trying to eliminate my accent all these years XD Thanks a lot for the kind words ^.^ Denada :D I hope you learned something new and useful. :D
@chlbrn
@chlbrn 7 жыл бұрын
Thank you for explaining the concepts and reasons behind this technique. I have watched some videos about custom depth pass and your video is this only one that I fully understand and I achieve the result I have been looking for a long time. Thank you.
@RVillani
@RVillani 7 жыл бұрын
And now that you know the concept, you can even do new stuff with the acquired knowledge :D
@mailerdaemon85
@mailerdaemon85 7 жыл бұрын
Hey, thanks for the nice tutorial! I noticed that the outlines flicker a little bit. Just in case someone else wants to get rid of that flicker: In the material settings go to Post Process Material and set Blendable Location to Before Translucency.
@RVillani
@RVillani 7 жыл бұрын
Till Mohr Thanks! =D
@alneirfernandes8492
@alneirfernandes8492 5 жыл бұрын
GOD
@user-jw9zn1fg9n
@user-jw9zn1fg9n 5 жыл бұрын
THANK YOU SO MUCH!
@pauldead
@pauldead 4 жыл бұрын
Thank's man.
@techpaiva
@techpaiva 4 жыл бұрын
Its saved me!thank brother!!
@DD-zw6qf
@DD-zw6qf Жыл бұрын
I had an issue with something I made and couldn't find any information so I decided to watch this video as a break and to learn something new After 30 minutes I saw you did something which was exactly what I was looking for, thank you!
@RVillani
@RVillani Жыл бұрын
Thanks for letting me know! What was it that you needed?
@del1an
@del1an Жыл бұрын
@@RVillani Rendering the side of an actors with custom stencil that is not behind walls or any mesh (28:07)
@mFurb988
@mFurb988 3 жыл бұрын
Very clear explanations. One learns about the different components and why their combinations provide the different effects. Thank you.
@RVillani
@RVillani 3 жыл бұрын
Thanks, Sven! I believe knowing the "why" besides the "how" helps us create other things from the same concepts.
@mbwilding
@mbwilding 3 жыл бұрын
You're insane man, thanks for explaining everything step by step rather than just doing it.
@RVillani
@RVillani 3 жыл бұрын
Thank you, Matthew! Yeah, man. Sometimes I appreciate quick videos that just show me how to do what I want ASAP, but on mine I like to show the why's too, so you can use the knowledge to create something else.
@bot-bot
@bot-bot 8 жыл бұрын
Thank you Rodrigo! This helped me very much. Another great tutorial with all the explanations. Not sure which version of Unreal you are using, but in 4.13.2 there is a small difference on how the material is being assigned to the PostProcessVolume. It is under Details -> Post Process Volume -> Blendables in case someone is on the 4.13. The rest is the same. Keep up the good work mate :)
@RVillani
@RVillani 8 жыл бұрын
Thanks a lot, Bojan! I'm using 4.15
@MortMort
@MortMort Жыл бұрын
When i change the UV cordinends of the Custom Depth and add them togeter It dosn't mask it out, but if I dont offset the Scene texture custom depth texture it dose mask it out, why dose it not work as soon as I offset the UV's and add them togeter?
@RVillani
@RVillani Жыл бұрын
Maybe the offset values are miscalculated somehow? Could be many things. I advice you preview each node in your sequence of nodes to see if they display expected results. If you need to see specific numbers, you can use the debug nodes and preview them (Debug Scalar, Debug Float2 and so on). That way you debug where things are going wrong in the logic and find what needs fixing.
@Sabselol
@Sabselol 7 жыл бұрын
You Mister Villani, are my personal hero of the day!
@RVillani
@RVillani 7 жыл бұрын
Sabselol Wow! Thanks a bunch! =D
@Zarrey
@Zarrey 6 жыл бұрын
this was the only outline tutorial that i got to work. it even worked the first time. thanks a lot!
@RVillani
@RVillani 6 жыл бұрын
That's great, man! Happy to help
@AlexM-xr4rc
@AlexM-xr4rc 7 жыл бұрын
Hey thanks for the help! The material I followed in the video didn't exactly work for my situation (because I'm working on a 2D game) but I'm able to replicate this method to an existing highlight material I have that works. Really great tutorial! Very thorough.
Жыл бұрын
Thanks man. It couldn't be more descriptive.
@Darth_Gamers
@Darth_Gamers 6 жыл бұрын
For anyone on 4.21 getting not just an outline but a fill too, I have a fix for that. After the step at 39:02 ish, replace the Lerp with an “If” node. Plug the old Alpha in the “A” slot, set “B” to 1 using the details menu, plug the color in the “A>B” slot, and plug the Post Process Mask in the “A
@kamui6780
@kamui6780 5 жыл бұрын
What a good guy ^
@RVillani
@RVillani 5 жыл бұрын
No. If is bad for performance. For anyone with that problem, use "Start Previewing Node" on each node of the process to find where the mistake is. A "fix" will only create more operations on top of something wrong.
@Righteous_Destiny
@Righteous_Destiny 5 жыл бұрын
@@RVillani I was wonder if you knew about an issue that I'm having. The issue is even my character is 30 meters away he has a very thin outline when not occluded. Do you happen to know a fix for that? I'm in 4.21. Thank you
@RVillani
@RVillani 5 жыл бұрын
@@Righteous_Destiny doesn't sound familiar. Is the character too thin or small? Can you share a screenshot?
@Righteous_Destiny
@Righteous_Destiny 5 жыл бұрын
@@RVillani Thank you so much for the reply! I figured out the ossue it was the temporal AA that was causing the issue
@GrayveRoseMusic
@GrayveRoseMusic 7 жыл бұрын
Good work, very well spoken, even if in a language that isn't your first, because that didnt stop me from understanding. Really wanted a stylistic approach to letting Players with certain roles see all other Characters through walls with an outline, and have each Character a different unique color that matches them. This was perfect for that, thank you gent + scholar.
@RVillani
@RVillani 7 жыл бұрын
Thanks a lot!! I'm happy to help the Unreal community! :D
@zimavi
@zimavi 2 жыл бұрын
How to fill inner part of object with same colour with transparency?
@Randenie
@Randenie 2 жыл бұрын
Thank you so much for this tutorial. It has everything I needed for the project I'm working on. Thank you, thank you, thank you!
@hasanshafy_
@hasanshafy_ 3 жыл бұрын
Where can I learn more about outline detection theory? How the renderer caculates the pixel depth and such.
@RVillani
@RVillani 3 жыл бұрын
That's an excellent question. I've never thought about it that way. I just found a bunch of tutorials with different techniques that helped me decide what worked best for me with the tool I have (Unreal, in this case). When you read about different ways to do the same thing, I think the theory comes as a consequence, because you start to realize what works better for certain situations, why it is so and with that knowledge you can even start creating your own way of doing it. That all said, I guess you could read about image processing with kernels to understand a bit more about this kind of effect. Sharpening is a similar technique to edge detection.
@hugogomezcervantes7102
@hugogomezcervantes7102 7 жыл бұрын
Man You make PP and outlines so easy to understand! thank you very much. Subscribed :D hope to see more tutorials!
@RVillani
@RVillani 7 жыл бұрын
Hugo Gómez Cervantes Thanks a lot! I'm currently working a lot and there's not much free time, but I'll get back to them some day. I do miss doing it.
@ColdfireAC
@ColdfireAC 7 жыл бұрын
Thank you for this excellent tutorial! So well explained. Please do more tut's like this
@RVillani
@RVillani 7 жыл бұрын
Glad to help! :D I will start making them again. Just gotta complete some stuff before (work and a Broly model in Unreal)
@hiro4476
@hiro4476 2 жыл бұрын
Easy to understand tut! @29:14, the lilo outline. Is there a way to exclude terrain/ground from the calculation?
@RVillani
@RVillani 2 жыл бұрын
Thanks! Good question. The floor has to render into the depth buffer, otherwise it'd be a translucent material, wasting performance by rendering everything behind it. So it should be there in the Scene Depth. That said, you might be able to mask out lines on top of it by rendering the floor mesh(es) with a custom depth stencil. Then you could test in the post process material if the scene pixel also has that stencil value, and if so, don't display an outline there.
@zackcanoe
@zackcanoe 6 жыл бұрын
非常感谢,你的教程帮我了一个大忙!thank you very much, your tutorial helped me solve a big problem!
@nick9137
@nick9137 Жыл бұрын
If anybody wants to be able to selectively occlude (for example lets say you have a pickup coin and your character, you don't want the outline on your character when behind the coin) you can do the following: do everything in the video except ALSO add an IF node, and we will use a stencil value of 2 as an object we don't want to occlude, (our coin will be 2, our character will be 1), you can do an if and if the stencil value is = 2 then instead of rendering out whats in the video you want to render out just the post processing input with mask of RGB, hope this helps
@RVillani
@RVillani Жыл бұрын
If you were asking how to do that, that's pretty much what I'd have suggested. A stencil value for "ignore this". I don't think there's another way if you can't tell those objects apart. Thanks for that comment!
@DevinDTV
@DevinDTV 7 жыл бұрын
Ok I spent some hours being frustrated trying to get outlines to not x-ray, but finally got it working thanks to your video. Then I learned a way to make outlines even appear above other objects that also have outlines. I think a lot of people want to know how to do this. It's very easy to implement. You can even have objects have outlines above other parts of themselves (like the near side rim of a bowl having an outline). i.imgur.com/O1xwUO8.png i.imgur.com/SGJ0WHE.png i.imgur.com/t6jNAjh.png Hopefully those screenshots explain what you do well enough. Basically at every point where you'd normally be adding the texel depths together as in this video, instead you subtract the pixel's depth by the texel depths. Then you add those subtraction results together. Divide by a new scalar parameter which will let you adjust how aggressively it outlines things, and then finally subtract by 1 instead of 10 million. Clamp and ceiling as normal and the rest of the steps are the same. Hopefully someone else found this as useful as I did.
@DevinDTV
@DevinDTV 7 жыл бұрын
Oh also in the screenshot you'll see that further objects have thinner outlines than nearer ones. This was easy to accomplish. Not only that, but I have it adjust for your screen resolution as well. i.imgur.com/loG4CLJ.png This should explain it.
@RVillani
@RVillani 7 жыл бұрын
Very good, man! :D
@stasismedia
@stasismedia 7 жыл бұрын
Thanks for your input. I've managed to implement the overlapping outlines based on your screenshots.
@DevinDTV
@DevinDTV 7 жыл бұрын
np, glad I could help
@siba2893
@siba2893 5 жыл бұрын
Thank you this was really helpful, do you know how to avoid the x-ray on the outlines when other objects are occluding them?
@Stefan-xt5sk
@Stefan-xt5sk 7 жыл бұрын
This seems very useful, so I've subscribed to remember you when I might need this. :) Also I've coincidentally found comments of a fellow student on this video who has watched this just one day ago. (Arlen der Dichter) :D
@RVillani
@RVillani 7 жыл бұрын
Cr4zy Dude cool! It's a small world indeed! :D
@LauriKalliola
@LauriKalliola 9 ай бұрын
Thank you for the awesome tutorial and in-depth teaching! I have a question on using a similar material: In the editor viewport view the occlusion outlines are drawn as intended, which is only when an object is behind something, for example a wall. But in the play mode and camera view the outlines are drawn on meshes even when there is nothing between the camera and for example the player mesh. Any ideas on how to fix this or what settings to look at? Thank you!
@LauriKalliola
@LauriKalliola 9 ай бұрын
Hmm, the problem was fixed when I swapped from using the normal "Camera" component to using "CineCamera" component. The normal camera probably has some rendering/post process settings which caused my issues.
@__foo__
@__foo__ 3 жыл бұрын
28:46 / The part of showing the visible lines only in the hidden parts of the object did not work, they are still visible in the visible and hidden part, but in the visible part the lines were blinking frequently. UE4.24.3
@__foo__
@__foo__ 3 жыл бұрын
I managed to fix it by changing the following project option: Project Settings> Engine> Rendering> Postprocessing> Activate the option: "Custom Depth with TemporalAA Jitter"
@RVillani
@RVillani 3 жыл бұрын
@@__foo__ by activating it? Not deactivating? Usually that settings is what causes people problems XD
@__foo__
@__foo__ 3 жыл бұрын
@@RVillani activating
@Shrublandsprite
@Shrublandsprite 7 жыл бұрын
This is so awesome! You saved me from pulling my hair out over this! :D
@RVillani
@RVillani 7 жыл бұрын
Arlen der Dichter I'm very happy to help! ^_^
@Shrublandsprite
@Shrublandsprite 7 жыл бұрын
I really appreciate it! I have another question though. Everything works fine now, but I would also like to add a colored silhouette to the outlines, as to basically fill them with a different color tone. In the video you are at one point seperating the inner shape from the outline, so I tried to use that to create my desired effect, but I couldn't figure out how to do it. Maybe you could give me a hint on how to do it? :)
@RVillani
@RVillani 7 жыл бұрын
Arlen der Dichter you mean to tint the object itself? There's a part where you detect what's inside and what's outside the object, so you'd use the inside as an alpha to lerp the final color with the tint you want. I can't really see it in detail right now (traveling), but if it's not clear, tell me and I'll try to explain better when possible.
@Shrublandsprite
@Shrublandsprite 7 жыл бұрын
The Lerp already helps, but somehow I cant manage to get the desired effect. I have been able to get outlines and fill my character, but then the rest of the world had a tint as wenn. Also I could no longer use the two color system you set up in the video. A more detailed explanation would be greatly appreciated, but don't stress yourself. if you dont have the time :)
@RVillani
@RVillani 7 жыл бұрын
Well, approx. by 23:00 I showed how to get only the objects as white. So you can multiply this result by your Lerp tint alpha in order to tint only the objects.
@rickfuzzy
@rickfuzzy Жыл бұрын
This was great. Thank you. Learned a lot
@flatinumfox
@flatinumfox 2 жыл бұрын
Great tutorial. I was looking at ue5 and ScreenPosition now has a ViewportUV / PixelPosition options. I'm curious how those work.
@irenenaya7644
@irenenaya7644 2 жыл бұрын
Not sure how they work, just want to point out that the one we're meant to use here is the ViewportUV one
@piingy489
@piingy489 9 ай бұрын
This tutorial is great! You explain so well!! I have a question regarding the time stamp 29:12 - how can I do so that I it will only render the lines on the objects that are not behind any other scene object?
@piingy489
@piingy489 9 ай бұрын
I finally got my nodes right, so what i did was: Custom depth - Scene Depth, then put that into ceil and then clamp bethween 0 to 1. Then I masked R and then did a "oneminus". This then got put into the multiply node that was put into the lerp alpha :)
@RVillani
@RVillani 9 ай бұрын
Nice one! Sorry I didn't answer before. I think I missed the comment notification :( There were some people who asked something similar, I think. But KZbin's comment ordering is weird, so it's a bit hard to find it. Thank you for the compliment on your first comment as well! 🫶🏻
@twinsplayknight
@twinsplayknight 3 жыл бұрын
hey, This tutorial was very helpful to me, but im noticing that the lines are drawing within the object rather than outside of the object. Its important for me that the lines go around the outside of the object instead of within it, do you know how i could do this?
@MrJayden1116
@MrJayden1116 2 жыл бұрын
did you find a solution to this?
@ZioYuri78
@ZioYuri78 8 жыл бұрын
Great tutorial, thanks for the theory part, it's really well explained and i learned a lot about shader!
@RVillani
@RVillani 8 жыл бұрын
Thanks for the feedback, Zio! :D I'm glad it helps!
@michtrns3396
@michtrns3396 2 жыл бұрын
So great job! i love it! :D - What if i want a Range in this? you know, when a camera need to been close to see it?
@michtrns3396
@michtrns3396 2 жыл бұрын
nvm. i found a way to make it :)
@LJ_Dev
@LJ_Dev 2 жыл бұрын
Great tut. Thank you very much! . Is there a way to hide the outlines for certain objects? Like for example, my character goes into shallow water and his legs are hightlighted by the outlines. How can I ignore that water on this shader? Thanks!
@RVillani
@RVillani 2 жыл бұрын
I'm not sure about that because water is a translucent shader, usually. I think you'd have to enable depth writes for it on the water material settings and then have the water mesh render to the same custom stencil channel as the character. Or a different channel that you account for in the post process and use it to hide the outlines.
@davidewing2825
@davidewing2825 6 жыл бұрын
I love this tutorial, it is amazing! I'm trying to figure out how to make this effect a character ability, so I can turn it on and off in game.
@RVillani
@RVillani 5 жыл бұрын
You could have a Lerp in the material in which 1 uses the effect and 0 doesn't. The Lerp alpha would be controlled by a Material Parameter Collection parameter. Than you could set that parameter's value from Blueprints.
@AndrewSearaCanada
@AndrewSearaCanada 2 жыл бұрын
Hi! Thank you so much for the video! It helped me a lot. Can I Ask you if you think it would be possible to apply in the material something that activates the outline only when the camera/player is close (at x distance)? Or because it's a post-process material it wouldn't be possible? Thanks eitherway :)
@RVillani
@RVillani 2 жыл бұрын
Thank you! You're in luck! Because this technique only generates inlines (so contours only on top of the outlined meshes) you can get those meshes distances from the camera (custom depth map) and subtract it from your desired max distance. The result will be negative for meshes further away and positive for the ones closer. Than you can use Saturate on that result to clamp between 0 and 1 and use it as a mask (lerp or multiply) for the outlines.
@AndrewSearaCanada
@AndrewSearaCanada 2 жыл бұрын
@@RVillani Thank you soo much 😃☺☺
@1_Man_Media
@1_Man_Media 5 жыл бұрын
other than the fact mine is a fill not an outline this tutorial was great explained a lot of material stuff for me.. In the newer ue4 with 2 outpots for screen position uv seemed to do nothing pixel works but I have a fill is there something I can do with the uv or something to change it to an outline? I kinda dig the fill if I get an outline working I will prob make a toggle for the fill as well :)
@MrNecaKralj
@MrNecaKralj 3 жыл бұрын
You ever found a solution for this?
@pitblastbeat
@pitblastbeat 3 жыл бұрын
Finally I found that efficient one! Great!
@RVillani
@RVillani 3 жыл бұрын
Haha awesome!
@michael6422
@michael6422 5 жыл бұрын
Man you're awesome , savior to us all .
@kanoeyes
@kanoeyes 6 жыл бұрын
The best tutorial about outlines! Thank you!!!
@dreaghy
@dreaghy 6 жыл бұрын
Hello ! In UE4 4.20.3 the outline does work but within a weird part ! I followed each step and your material is the same as mine ! If I can describe more, the outline appears to fill up the entire outlined object,but I wanted just an outline !
@dreaghy
@dreaghy 6 жыл бұрын
Oops my bad, the "Screen Position" node have now 2 outputs, and I did plug it in the second one rather than the first one ! The first one worked finally ! Sorry for the inconvenience !
@zacd1297
@zacd1297 6 жыл бұрын
Thanks for posting this, it really helped save me some time! To anyone else who reads this, for clarification, you want to use "ViewportUV" NOT "PixelPosition".
@Darth_Gamers
@Darth_Gamers 6 жыл бұрын
Im on 4.21 and I’m getting the same thing, but all of my nodes are correct. When he shows the different previews of what should happen, my results are all the same except for the step at 24:43.
@Darth_Gamers
@Darth_Gamers 6 жыл бұрын
I figured out a way to fix it. I have a comment that’s not a reply to you, you can find how there
@pixelazedd
@pixelazedd 3 жыл бұрын
at 14:55 where do you pull it out of that zero? doesn't work btw
@RVillani
@RVillani 3 жыл бұрын
Hold 1 on the alphanumeric keys and click
@RVillani
@RVillani 3 жыл бұрын
www.google.com/amp/s/odederell3d.blog/2019/12/26/ue4-material-blueprint-shortcuts/amp/
@RVillani
@RVillani 3 жыл бұрын
docs.unrealengine.com/en-US/RenderingAndGraphics/Materials/HowTo/Placing_Expressions_Functions/index.html
@randomguru1770
@randomguru1770 6 жыл бұрын
Hey man, thanks for this tutorial. I finally managed to not render outlines for hidden objects. I do have another question tho. In the end of your video, at about 39:25 you're talking about rendering the outlines for overlapping objects with custom depth on. Could you please explain to me how i should do this? I've been trying for a while now, but none of my efforts work. Working with materials is different from other programming logic to me, and i just can't fully wrap my head around it.
@RVillani
@RVillani 6 жыл бұрын
The logic you use to detect the outlines between custom depth and non-custom depth objects, you'll have to use it to detect outlines between different custom depth values
@joseruiz1763
@joseruiz1763 6 жыл бұрын
I've been trying to do this for a while but I think I'm still not undertanding how this works well enough to do it. From what I understood, you get the outline between custom depth and non-custom depth because the addition of the 8 texels around the one we're on gets very high if even a single one is in a non-custom depth area. I assume that if you're comparing two objects with custom depth enabled the difference between the numbers is going to be much smaller, but I'm not sure of how much. How do I figure out what is the number I should subtract to the final addition for this to work?
@nawakman
@nawakman 3 жыл бұрын
20:23 , actually since calculations are based on 8 samples pixels, this distance should be the meters multiplied by 80 instead of 100, because in your case there is 25% more lenght before the mask disappear. Anyway very good tutorial and well explained
@RVillani
@RVillani 3 жыл бұрын
I was just adding values there, so if the 8 samples are from 1/8 of the background distance (the 100km), it adds up to background distance. So I guess we're both incorrect XD The right thing to do would be to get max from all samples. Because the real intention was just to find if background is among the sampled pixels. That would really make sure it works up to 100km, not just 1/8 of it. I should've realized it back then. Thanks for calling it out and making me think again about it :D
@nawakman
@nawakman 3 жыл бұрын
@@RVillani To be fair this kind of calculations blow my mind, All yesterday I was trying to understand how it worked even though you given clear explication. Trying to think per pixel is so un natural to me
@RVillani
@RVillani 3 жыл бұрын
@@nawakman IKR! the way we have to think when making shaders is pretty unique
@SilverEye91
@SilverEye91 2 жыл бұрын
Hi! Is there a way to modify this calculation to render not just the outline but the entire object? I'm trying to find a way to render the silhouettes of different objects as different colors but I'm having some trouble getting it to work. This is a great tutorial but I need some extra help to get that final step to the result I want :D
@irenenaya7644
@irenenaya7644 2 жыл бұрын
If you only want to render the entire object in a different colour, you don't really need any calculations. You just use the subtraction between custom depth and scene depth, use OneMinus to invert it, and use that result as the alpha of a Lerp between the SceneTexture (the PostProcessing0 one) and any colour you choose. You can look at this tutorial from the UE people here: kzbin.info/www/bejne/gHmTaK1vdtVkns0 If you actually need both the outline and the entire object (like at different times you want one or the other), i would try playing with the line thickness parameter. Since the outline always grows inwards, there's got to be a value at which the whole object is 'painted' 🙂
@unrealkitty
@unrealkitty 7 жыл бұрын
although my english is not good. but your expression is very clear. thank you for your excellent tutorial. expect more.
@RVillani
@RVillani 7 жыл бұрын
Thanks! I'm kinda busy these last months (need money to make tutorials xD), but I'll try to get back to making tutorials as soon as I can.
@unrealkitty
@unrealkitty 7 жыл бұрын
of course, earning money is top priority. but your tutorial is also valueable. I learn much knowledge about why to do something, not just how to do.
@RVillani
@RVillani 7 жыл бұрын
Thanks! Yeah. I don't like those tuts where they just say what buttons to press. You gotta know why you're doing stuff.
@unrealkitty
@unrealkitty 7 жыл бұрын
yes, we all want to know what happen behind the back of node. just like what you painted about background knowledge of outline in the tutorial.
@kostet1977
@kostet1977 6 жыл бұрын
That`s very nice stuff man! Extremely useful for me. The only thing i`d like to ask is how to use it together with original material of outlined object.
@RVillani
@RVillani 6 жыл бұрын
Thanks! It doesn't affect the mesh material. You just need to activate custom depth on the mesh, but its materials remain untouched. So the original material will still be there.
@kostet1977
@kostet1977 6 жыл бұрын
ok, thanks a lot, i have to try to reproduce all your actions first. Maybe later will have some more questions.
@breikdans1646
@breikdans1646 5 жыл бұрын
Awesome Video!! I learnt a lot!! Muchas gracias por tu explicacion Rodrigo!!
@RVillani
@RVillani 5 жыл бұрын
Gracias, Alberto!
@hereticbyte
@hereticbyte 2 жыл бұрын
is there any method to some specific actor "not block mask"? im making RPG and when my character equip a Sword. the sword cause masking to player body mesh.
@RVillani
@RVillani 2 жыл бұрын
What if you add equipped items to the effect with the character? Then instead of blocking, it glows with them.
@Jorge-vv8cy
@Jorge-vv8cy 5 жыл бұрын
Awesome tutorial bro. this way i can comprehend why this works.
@prasadwadekar1499
@prasadwadekar1499 3 жыл бұрын
I loved the tutorial, but could you please elaborate how to toggle it, so that it can be use as an ability.
@christopheaurelie6943
@christopheaurelie6943 2 жыл бұрын
Hi Rodrigo, is it possible to keep the texture of the object instead of coloring the outline? I mean an oultline that keep the object texture
@RVillani
@RVillani 2 жыл бұрын
Hmmmm interesting. Like, if it was a weapon you'd see black outlines? I don't think so, because the object is hidden so if you tried to sample its color, you'd get the color from what's in front of it. You'd have to fake it with a texture for each Actor, but that would look a bit weird as the texture would likely move with the screen, not the object. Do you have an example of something doing that? Maybe there's a better way I'm not thinking of because I'm picturing it wrong
@christopheaurelie6943
@christopheaurelie6943 2 жыл бұрын
@@RVillani hey thank you for your answer. I'm trying to build a portal. I need : - the gun to be able to go inside the wall without being covered by the wall texture - and I was also thinking to use stencil for recursive portal (the dev of portal explained he did it with stencil). I'm burning my brain 😅
@RVillani
@RVillani 2 жыл бұрын
​@@christopheaurelie6943 I don't suppose he was talking abou the same type of stencil we see in UE. I found interesting solutions to that clipping problem here: forums.unrealengine.com/t/visible-through-walls/44042/11 My favorite is the vertex offset one: kzbin.info/www/bejne/gWLOgnqvd9aWqac The shadows problem at the end you could try to solve by not doing the vertex offset only in the shadow pass, like I show here: kzbin.info/www/bejne/g5KnmZuvp6uVqK8 (at 1:42:45)
@wecomfrom
@wecomfrom 2 жыл бұрын
@@RVillani thank you very much for your answer ! 👍👍👍
@Tin_Can
@Tin_Can 5 жыл бұрын
I've gone over the tutorial 3 times to try to figure out what's wrong, but this isn't working properly on 4.22.3 - in the final result, actors that are not occluded are still getting outlined, but that outline is jittering and looks glitchy - any occluded actors outlines work as they should though Edit: after reading a comment below, this issue is caused if Temporal AA is disabled, strangely enough - I originally disabled this because the occluded actors outlines were looking weird and this was a supposed fix for it, oh well, minor tradeoff for an awesome effect!
@__foo__
@__foo__ 3 жыл бұрын
I managed to fix it by changing the following project option: Project Settings> Engine> Rendering> Postprocessing> Activate the option: "Custom Depth with TemporalAA Jitter"
@Janokins
@Janokins 2 жыл бұрын
In the material, you can also set Blendable Location to "Before Tonemapping"
@samstersos
@samstersos 8 ай бұрын
Hey, so I followed the tutorial and it works perfectly within the viewport but for whatever reason when I press play it stops working. Do you have any ideas what could be causing that? Thanks for the great tutorial!
@RVillani
@RVillani 8 ай бұрын
thanks! Could be many things. The objects in play mode could be having stencil or custom depth disabled, for some reason. Or your player camera is overriding post process settings and disabling the PP material. Or something attached to the camera is drawing custom depth covering all the custom depth in the scene. Or you were testing from inside a Post Process Volume that's not set to infinite bounds, but in play you're outside of it. Or in your material you set some parameter during play that disables the effect. Or even something else specific to your project that I'd never guess haha You'll have to debug. While playing in the editor viewport, you can press F8 to eject from your player into level-editing mode. Then you can select things in the viewport or in the World Outliner and inspect their details to see if the expected depth/stencil settings are set on the meshes. You can also select your pawn/character and inspect its camera to see if it's overriding any post process settings. While ejected, you can also change the viewport mode from Lit to other view modes and see if stencil and custom depth look as expected. To go back into possessing the character, press F8 again.
@alangonzalezleon6556
@alangonzalezleon6556 7 жыл бұрын
I have a problem instead of coloring the edges the whole mesh has the color but when I move the camera the edge are the one with the color any idea D:
@beginadobe
@beginadobe 3 жыл бұрын
Is there a way to achieve this if the highlighted objects are being occluded by other translucent/transparent objects?
@RVillani
@RVillani 3 жыл бұрын
I don't think so. You could enable Allow Custom Depth Writes in the translucent material settings to get it to render its depth, but then you won't have the custom depth from the occluded object. It would only be possible if translucent materials rendered to the depth buffer, but if they did, they'd make things behind them not render at all.
@ruslandad365
@ruslandad365 2 жыл бұрын
Great Tutorial Thanks!!!!
@spinningninja2
@spinningninja2 4 жыл бұрын
Love this tutorial! Running into a bit of a snag though, if anyone can help. Every step of it has worked for me until he tests out the occlusion part around 28:10. When he tests it un obstructed objects are black while others are white, but for me everything just turns white, no matter the custom depth. My blueprint looks exactly the same, but I'm wondering if its possible if I've missed any steps anywhere? My current engine is 4.23 if there was anything changed there that might be causing this
@LeoToyCraft
@LeoToyCraft 4 жыл бұрын
From the ScreenPosition node make sure you are using the Viewport UV pin to connect to the add nodes - there are two pins in more recent engine versions compared to just one as in this video.
@MrSpronkets
@MrSpronkets 3 жыл бұрын
The resulting outline flickers a bit, any simple fix for this?
@RVillani
@RVillani 3 жыл бұрын
yeah. Project Settings > Rendering > Postprocessing > disable Custom Depth with Temporal AA Jitter
@Granxdavis
@Granxdavis 5 жыл бұрын
Awesome tutorial, thanks a lot. But it is possible to do the outline with translucent objects?
@RVillani
@RVillani 4 жыл бұрын
In recent versions, I think so. There's an option in the material details to make a translucent material write to custom depth. I haven't tested it, but I suppose that's what it's for.
@sleepwalker6043
@sleepwalker6043 7 жыл бұрын
Thank you for making my life easier.
@RVillani
@RVillani 7 жыл бұрын
Glad to help!
@adamc3607
@adamc3607 2 жыл бұрын
Great tutorial!
@abeymiranda5457
@abeymiranda5457 7 жыл бұрын
Hey thanks for the in-depth explanation! I have a question, how do i add a 50% color fill inside the outline?
@RVillani
@RVillani 7 жыл бұрын
You mean like highlighting the object? Well, it's been a while that I did this, but if I'm not mistaken there's a part that output's 1 or 0 if inside of the object. You can use that (multiplied by 0.5) as the alpha for a Lerp between the original SceneColor and your highlight color.
@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.
@RVillani
@RVillani 4 жыл бұрын
I did something similar once. It wasn't perfect, but enough to fool the viewer on some situations. On a transparent material, set opacity to 100% and set it to Default Lit mode. Then, for its Emissive channel use the SceneColor node. Let me know if it's at least close to what you want.
@Went2PlayLLC
@Went2PlayLLC 4 жыл бұрын
@@RVillani ok, i have two nodes on translucency material, 1. scene color to emissive, and 2. opacity parameter 0, there is no shadow, its just clear translucence material. What happened now, is that shadow is pure transparent, like a hole. Opposite of what we are looking for.
@RVillani
@RVillani 4 жыл бұрын
@@Went2PlayLLC But I said "set opacity to 100%", so it should be 1. Then, if the material uses default lit mode, it should get some shadows, display what's behind it (because of Scene Color) and be fully visible. The shadows might be weak though, because of the emissive. But using emissive is the closest you have to making it's brightness match what's behind it. Also, it might cast shadows, but you can turn that off in the actor. And, something I never managed to solve: it'll have motion blur. So if you move your matte object, you'll see what's behind it with motion blur.
@FLTxxdxx
@FLTxxdxx 5 жыл бұрын
Great Work, thank you for the time put into making this
@iandejong2570
@iandejong2570 4 жыл бұрын
really clear explanations - thank you!
@RVillani
@RVillani 4 жыл бұрын
I'm glad you think so! I've been teaching programming to my cousin and I always feel like I mumble too much. haha But that might be due to me not planning our classes ahead. 🤔
@D2lirium
@D2lirium 6 жыл бұрын
This is how you do a tutorial. Many Thanks!
@semaph0re
@semaph0re Жыл бұрын
Unfortunately, this tutorial does not cover the most basic use-case: highlighting items, as the outlines have x-ray (see through walls). I spent some days fighting this behavior, trying to make it actually occlude when it is behind walls, but I cannot make it work. This material is a bit too complex for beginners (especially due to the lerp use at the end). Any pointers welcome though...
@rickfuzzy
@rickfuzzy Жыл бұрын
Just do one minus on the bottom node
@rickfuzzy
@rickfuzzy Жыл бұрын
But you can just use a fresnel in an overlay material if you want a simpler solution for that. This video is clearly for occlusion
@semaph0re
@semaph0re Жыл бұрын
@@rickfuzzy I used this tutorial anyway as this almost does the outline effect exactly as in Deus Ex: Human Revolution. Most outline tutorials do not behave "this way" (google for a blogpost about Human Revolution rendering). As for "bottom node" and "do one minus" - please expand a bit more. I am a beginner, best to be specific.
@rickfuzzy
@rickfuzzy Жыл бұрын
@@semaph0re @37:31 try add an oneminus node after the clamp at the bottom of the screen. the example is masking only the occluded items so adding oneminus will invert and mask only the non-occluded items. hope it helps.
@markarmstrong4684
@markarmstrong4684 3 жыл бұрын
No matter what I do it colors the entire object instead of just the outline. Any advice on how to fix that?
@RVillani
@RVillani 3 жыл бұрын
output every node, on each step of the chains, to see if their output is making sense. That's how you debug materials. For numeric values, you can search for nodes called "debug". They exist for both a single scalar and float2, 3 and 4
@RVillani
@RVillani 3 жыл бұрын
doing that you can figure out where the problem comes from by seeing its origin and reduce wasted guessing time
@markarmstrong4684
@markarmstrong4684 3 жыл бұрын
@@RVillani Thank you
@diegososa3912
@diegososa3912 5 жыл бұрын
Hi Rodrigo, have you ever done the tutorial about how to fix when the outlines overlap?
@diegososa3912
@diegososa3912 5 жыл бұрын
Can I contact you any way? I'm using outline to add people in a scene as just figures but when they pass in front of each other they overlap and it is not ok but I can not fix it.
@RVillani
@RVillani 5 жыл бұрын
​@@diegososa3912 You could contact me here: rvillani.com/bio-contact There's more than just e-mail there, but I won't post here to avoid spam. But I've been very busy. :( I have another tutorial (not in english though) that uses a technique on the stencils that displays only one color at a time. The problem with that technique is that it displays the color of the highest stencil value using Max.
@diegososa3912
@diegososa3912 5 жыл бұрын
@@RVillani Thank you Rodrigo, I sent you an email from the company where I work explaining better my problem.
@matty3732
@matty3732 7 жыл бұрын
Great tutorial!! but I have a question, what if I don't want the outlines for objects behind? I mean for all the static mesh but not when are behind something. I'm trying really hard but I can't find a way to do it!
@RVillani
@RVillani 7 жыл бұрын
Thanks! Check if the custom depth value is higher than the scene depth. If it is, your custom depth mesh is behind some other scene object, because those values are the distance from the camera. An easy way to mask it out is to do: • SceneDepth - CustomDepth • Clamp (0, 1) • Plug the result into a Ceil node Now you'll have 0 if it's behind something and 1 if it's not. You can use that with a multiply or a Lerp to mask other effects.
@matty3732
@matty3732 7 жыл бұрын
ok I finally manage do it! thank you!!! (I didn't except you would have respond to my comment :D)
@RVillani
@RVillani 7 жыл бұрын
Matty37Casa nice! I was gonna send you an email, but when I had the time. Glad you managed to do it =)
@badrequest5596
@badrequest5596 7 жыл бұрын
i was having the same problem but doing SceneDepth - CustomDepth was just removing the outline completely. so i tried adding a 1-x node after the clamp/ceil and it inverted the result and now the outline is only when objects are visible and not when behind something else. while im at it, can i change the size of the outline? i wanted to make it just a little bit bigger.
@OmegaMouse
@OmegaMouse 6 жыл бұрын
Would you please spell this out for me? I'm having the same issue with the outline showing through objects in front of it. What exactly does this modification look like and where do you plug this in at? Thanks!
@GaneshPingale
@GaneshPingale 7 жыл бұрын
Thank you for the detailed explanation. Worked as expected but the outlines are kind of shaking. Do you know why and how to stop it?
@RVillani
@RVillani 7 жыл бұрын
I believe it can be Project Settings > Engine > Rendering > Postprocessing > Custom Depth with TemporalAA Jitter It's enabled by default. Try disabling it.
@GaneshPingale
@GaneshPingale 7 жыл бұрын
Unfortunately, still same jitter after disabling/enabling the option.
@RVillani
@RVillani 7 жыл бұрын
What about Rendering > Default Settings > Anti-Aliasing Method If it's not that, then I really don't know. Does it shake even with the camera and objects completely still?
@Beriol9
@Beriol9 7 жыл бұрын
I experienced the same thing, To fix it, open the material and go look in the parameters for the "Post Process Material" section. Inside there is an option "Blendable location": select "Before tonemapping"
@RVillani
@RVillani 7 жыл бұрын
Good one! I didn't remember that. It'll make you post process be calculated before the anti-aliasing pass, if I'm not mistaken.
@KIR_Engineer
@KIR_Engineer 6 жыл бұрын
Great Tutorial. I''ve got one question. Is it possible to change alpha of color to make outline some transparent?
@RVillani
@RVillani 6 жыл бұрын
Thank you! Yes. You can lerp the final result with the original scene color. The lerp amount will be the alpha
@KIR_Engineer
@KIR_Engineer 6 жыл бұрын
Big Thanks, Rodrigo! It works!
@DEFICITGames
@DEFICITGames 5 жыл бұрын
Awesome Tutorial! Thanks!
@MatheusGamedev
@MatheusGamedev Жыл бұрын
Would you help me? My game has several objects, I wanted to know if there is a way to limit the effect to a specific radius. Also, your tutorial is awesome!!!
@RVillani
@RVillani Жыл бұрын
Thank you! You could multiply the final effect mask by an additional sphere mask. Then you can set the center location and radius via parameters (perhaps from Material Parameter Collection), while passing WorldPosition as one of the inputs, which represents the location in the world of the pixel you're currently computing for.
@MatheusGamedev
@MatheusGamedev Жыл бұрын
@@RVillani Thanks again, worked really well!!!
@youtubi123youtubipel
@youtubi123youtubipel 3 жыл бұрын
Perfeito! Me tira umas dúvidas: Primeiro, como aumentar a grossura do outline? Tem um jeito fácil? Segundo, tem como os outlines ficarem independentes pra cada objeto ao invés de se fundirem quando eles se sobrepoem?
@RVillani
@RVillani 3 жыл бұрын
Vlw! 1. Vc chegou a assistir o vídeo? Tem literalmente um capítulo sobre isso no video. 2. Acho que sim, mas não é fácil. Vc vai precisar usar o mesmo esquema de detecção de linhas pra detectar diferenças no canal de stencil. Essas diferenças são as bordas entre os objetos.
@youtubi123youtubipel
@youtubi123youtubipel 3 жыл бұрын
@@RVillani Putz, que vacilo o meu. Eu acompanhei o vídeo e reproduzi tudo aqui no meu projeto só até antes do capítulo onde vc exclui as partes visíveis. Ou seja, 1 capítulo antes de vc configurar a grossura das linhas. Foi mal. Agora quanto as bordas, infelizmente usar Stencils pra uso Não é viável aqui no meu projeto. Eu já uso os stencils para outro efeito de PostProcess e vários objetos usam o msm Stencil. Segundo que eu tenho centenas de objetos na cena, vários colados um no outro. Usar 1 Stencil diferente pra cada um seria impraticável. Mas mesmo, obrigado pela ajuda! Seu vídeo ajudou demais e explicou muito bem. Seu inglês também é excelente.
@RVillani
@RVillani 3 жыл бұрын
Putz kkkk Pior que acho que só com os stencils mesmo. Obrigado! Agora melhorou um pouco, mas obrigado!
@ianx2012
@ianx2012 4 жыл бұрын
Good Tutorial!!! Is anyway to hide in some object? I want it visible behind the wall, but it also visible to the character....
@RVillani
@RVillani 4 жыл бұрын
Thanks! I didn't understand what you're trying to do. If it's visible behind the wall, it's visible to the character. Right?
@ianx2012
@ianx2012 4 жыл бұрын
@@RVillani :(( Sorry for my poor English... Easy to say, what I want just not effect on the character.
@folksgames7047
@folksgames7047 7 жыл бұрын
Thank you bro!! Great video
@RVillani
@RVillani 7 жыл бұрын
Thanks! :D
@furrybproductions
@furrybproductions 5 жыл бұрын
Is there anyway to make adjust the alpha of each color in the material? I'd like it so that one of them has an opacity of 0.
@RVillani
@RVillani 5 жыл бұрын
The Lerp that mixes the effect with the scene: multiply the value that goes into the Lerp alpha by how much you want the colors to affect the scene.
@furrybproductions
@furrybproductions 5 жыл бұрын
@@RVillani can you post a pic of the graph? I'm trying to use your material as a highlight material in game and need it to be visible behind walls as well as not behind walls.
@furrybproductions
@furrybproductions 5 жыл бұрын
@@RVillani the reason I need one of the colors to have an opacity of zero is because I'm finding that the postprocess on the character helps occulude the highlight of objects behind them. If you have a better solution where I can have the highlight not show thru or over my character that would be best. Can you do a tutorial specifically on creating a highlight material that works in this way? It'd be a lifesaver for noobs.
@szerothH
@szerothH 4 жыл бұрын
Thanks bro, this helps me a lot!!
@Severe_Valenok
@Severe_Valenok 7 жыл бұрын
Hello What music track playing at the start? Great tutorial by the way!
@RVillani
@RVillani 7 жыл бұрын
Thanks! It's Cold Killa (Sting) from the KZbin Music Library
@MrSpronkets
@MrSpronkets 3 жыл бұрын
Can you go over how to hide active player-related meshes without setting their custom depth to 0? Is that possible?
@RVillani
@RVillani 3 жыл бұрын
If you mean hide from the post process, don't activate their custom depth
@MrSpronkets
@MrSpronkets 3 жыл бұрын
@@RVillani What I was basically meaning is to make the outlines not show when behind certain meshes, but not all. Or maybe you can better explain what you meant...
@RVillani
@RVillani 3 жыл бұрын
​@@MrSpronkets​ actually, I need you to clarify XD Do you want to not have outlines drawn behind the player mesh or not have the player mesh draw outlines when behind other meshes? Or something else?
@MrSpronkets
@MrSpronkets 3 жыл бұрын
@@RVillani If you remove custom depth render from the character's mesh, it won't hide the outlines showing through your character's mesh. If you have 2 materials showing custom depth, the material will hide the outlines of the mesh behind it, so the character mesh would need to show custom depth render. But that would also mean the character mesh would be showing outlines. Yes? I want the outlines to not show through the character's arm and I don't want the character to have an outline.
@RVillani
@RVillani 3 жыл бұрын
@@MrSpronkets ah, I see. You'll need custom stencil, then. Besides custom depth, you can have a different value rendered to the stencil buffer for each mesh (up to 256 different values, because it's 8 bit). If you need a custom depth mesh to not occlude another custom depth one, you can use the stencil options with bitmasks. They write only the bits they're assigned to and don't overwrite other values' bits. So if you had a mesh render custom stencil 1 with bitmask 1, and another with custom stencil 2 and bitmask 2, both stencils 1 and 2 can be seen overlapping in the stencil buffer. But you need material logic to read those bits individually. I make a custom node with two inputs: StencilValue and Bit. Then its code is return (int)(StencilValue * 255) >> Bit & 1; Bit should be the zero-based bit index you want to test the stencil for. If you want to test the bit that means 2, for instance, it's the second one. So count 0, 1. 1 is the second, so you'd pass 1 as Bit. Stencil values matching your mask will return 1 and others will return 0. It requires some knowledge about binary numbers. But I can't think of other ways (at least rn) to have both the player and meshes behind it be distinguishable on the post process. This way the player will render on top of the other meshes in the custom depth and you can filter what generates outlines or not from their custom stencil values.
@HarukiGamer
@HarukiGamer 7 жыл бұрын
Vídeo incrível, porém infelizmente não compreendi ele completamente por não saber muito de inglês, seria ótimo se algum dia você pudesse fazer uma versão em português dele. Mas de qualquer forma esse vídeo já me ajudou, muito obrigado :D
@RVillani
@RVillani 7 жыл бұрын
Valeu, cara! Eu fiz uma técnica um pouco mais avançada neste aqui: kzbin.info/www/bejne/n5S0inmlbcuAqLc E está em português :D
@HarukiGamer
@HarukiGamer 7 жыл бұрын
Ok, vou dar uma olhada, vlw :D
@qwer4790
@qwer4790 7 жыл бұрын
It looks like you forget to connect a node at 17:18
@qwer4790
@qwer4790 7 жыл бұрын
BTW, your way of choosing outline color based on "lerp" is a little complex, I suggest you make a custom material function using "custom" node with code, that would be way easier!
@RVillani
@RVillani 7 жыл бұрын
You mean this 17:55? :D
@Jay66Bird
@Jay66Bird 7 жыл бұрын
Nice job man!
@Jukerlaw
@Jukerlaw 4 жыл бұрын
U just earned a sub.
@RVillani
@RVillani 4 жыл бұрын
Thank you! ^^
@Jukerlaw
@Jukerlaw 4 жыл бұрын
@@RVillani Actually there's one more thing I wanna ask. What's the differences between Scene depth and Scenetexture.Scenedepth nodes? Also I feel like pixeldepth and scene depth are similar, they all do output the distance between camera and the rendered pixels right?
@cmds.learning7426
@cmds.learning7426 4 жыл бұрын
very good tutorial!thanks friend!
@RVillani
@RVillani 4 жыл бұрын
thanks for the kind words :)
@saintkiler1187
@saintkiler1187 4 жыл бұрын
Great tutorial. Thank you very much.
@RVillani
@RVillani 4 жыл бұрын
Thank you!! Glad to help!
@George-pk5jw
@George-pk5jw 6 жыл бұрын
Nice thanks for tutorial, you are awesome!
@ayoubrezzouk3060
@ayoubrezzouk3060 3 жыл бұрын
Guys i followed this tutorial but my outline is always mixed like if the custom stencil mask ( R) is returning a float value between 0 and 1 .....
@RVillani
@RVillani 3 жыл бұрын
can you upload a screenshot somewhere and link it here? I didn't really understand the problem.
@limks96
@limks96 5 жыл бұрын
Thank you for sharing ur knowlegde !
@damnation8794
@damnation8794 5 жыл бұрын
Hey I did this tutorial twice just to make sure. I can not change colors. I want to use everything in this vid but several different ways. I did not realize that my game would basically be all post processing
@rodrigodias4251
@rodrigodias4251 4 жыл бұрын
Esse tutorial me ajudou muito! Obrigado!
@RVillani
@RVillani 4 жыл бұрын
É nozes! XD
Unreal Engine - Player Outlines Tutorial (1/2)
26:51
Reids Channel
Рет қаралды 16 М.
UE4 - Outline Material to Highlight Objects when Looked at Them
9:51
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
UE4 Tutorial: Heat Haze Post Process
6:31
underscore
Рет қаралды 27 М.
Why Majora's Mask's Blue Dog Took 25 Years to Win the Race
21:04
Vidya James
Рет қаралды 3 МЛН
Unreal Engine Multi Colored Outlines
7:51
CodeLikeMe
Рет қаралды 6 М.
X-Ray or Inspector Effect- (UE4 Material Tutorial)
16:53
UnrealCG
Рет қаралды 11 М.
Body Aura Effect -  UE4 Material Tutorial
17:32
UnrealCG
Рет қаралды 68 М.
UE4 - Tutorial - Render through Walls!
16:30
Dean Ashford
Рет қаралды 46 М.
How To See Through Wall  In Unreal Engine - Easy
25:09
UnrealCG
Рет қаралды 20 М.
Simple Post Process Outline in Unreal
5:47
wizvanmeter
Рет қаралды 64 М.
UE4 Tutorial 101 - Control Materials in Blueprints
35:02
Rod Villani
Рет қаралды 35 М.
Unreal Engine 4 Guide - Actor visible through walls
3:52
Tefel - Astro Colony
Рет қаралды 35 М.