How To Highlight An Object With An Outline In Unreal Engine 5 (Tutorial)

preview_player
Показать описание
Hey guys, in today's video I'm going to be showing you how to highlight and object and give it an outline in Unreal Engine 5. This works great for X-Rays too!

NOTE: I forgot to mention this in the video, but I didn't come up with this originally. It has been within the community for years and no one really knows the true origin. However, I haven't seen a video on it in UE5 yet, so I thought I'd make one.

#UE5 #UnrealEngine5 #UE5Tutorial
___________________________________________________________________________
00:00 - Intro
00:07 - Overview
00:31 - Tutorial
16:23 - Final Overview
17:16 - Outro
___________________________________________________________________________

___________________________________________________________________________
If you want to support me, there are many different ways of doing so. This is by no means expected or required. It is just a nice support :)

Thank you :)
___________________________________________________________________________
To access the project files and screenshots from the video, check out my Patreon above!

___________________________________________________________________________
♫Outro Song♫
●Kronicle - Chill Noons
Рекомендации по теме
Комментарии
Автор

For anyone doing this with the newest UE5 version, I think you have to enable "enable with stencil" under postprocessing in the projectsettings. That was disabled for me. It worked after enabling that :)

Asmund
Автор

Just a little tip for the tutorial: if you want to be able to change the highlight color in runtime, you can use an actor with post process component and place that in the level instead of post process volume

Stellarneer
Автор

For anyone that wants to highlight the enemy or an object when looking at it: go to your character and off of the Add Controller Yaw Input, get a "LineTraceForobjects" node. Then get a player camera manager node and from this get a forward vector and a camera location. Off of the forward vector get a multiply and enter something like 2500 for the X. Then off of the camera location get an add and connect the multiply to this to add the camera location and forward vector nodes. Hook up the camera location to the start of the line trace and the add to the end of the line trace. Off of object type, type "make array" and change the type to whatever you like. For me it was pawn. On the line trace, break the hit result and off of the hit actor cast to your enemy if that's what you're trying to highlight. From their set the custom depth stencil off of your mesh and you're done. Make sure to set your reference to your object on BeginPlay and in the Variables section of your character BP or it will give you an accessed none error. Thanks for the awesome tutorial Matt!

Goggalor
Автор

Thank you for mentioning the keyboard shortcuts you use, a lot of people don't.

AminYabut
Автор

Thank you so much for making these videos. You've made Unreal 5 so accessible.

Your videos are great. You explain topics well, show how the code can be adapted to fit other scenarios and you do so with a very calm voice. Again, thank you so much. You've helped me so much!

Fit_and_Flair_
Автор

Great video!
It won't work If you have a translucent material. To fix it, tick “Allow Custom Depth Writes” flag in your translucent material settings, change "Opacity Mask Clip" Value(0.1 for example) and don't forget to tick "Render CustomDepth Pass" for your object.

mazentalaat
Автор

I would love that part 2 video that highlights as you get closer.

finessefulj
Автор

Thank you for the tutorial, but I would love explanation as to what the heck is actually going on there. I can't wrap my head around any of it lol.
edit: what exactly does viewSize->Ceil->Clamp do (the left-most 3 nodes)? It would always return (2, 2) because ViewSize is in pixels like 1920x1080 or something? I've tried replacing it with a const - I see no difference?

drawmaster
Автор

I really wish this explained the steps instead of just showing them.
I'm not actually learning anything if I'm just copy-pasting someone else's code, and I'm left without the ability to adapt and customize any of this.

grimwolf
Автор

This works, but it would be nice to explain why it works, rather than just adding nodes and saying "connect this and connect that." Most people know how to connect nodes, but they don't know how to reason through it.

totheknee
Автор

Awesome! Straight and to the point. Thank you!!!

JoeyFoxtrot
Автор

Very useful, got it working (turned on/off in object begin/end overlap) first time (a miracle for most youTube videos)! Would be nice if it was explained how it worked tho! Thanks!

PhilHarland-hzpm
Автор

Bro you are a truly life savier! i cant tell you the amount of things that i been working on thanks to you! keep it going! thank you!

agustincocco
Автор

Thanks for taking the time to make this tutorial! Exactly what i needed :)

MingHsiung
Автор

Incredible tutorial !!! Really helped when no other tutorial would. Thanks so much

supercolleen
Автор

Unfortunately, this doesn't work with Nanite enabled. Do you have a solution for this?

DemokratischDenken
Автор

Thank you, the tutorial is great! I however experience some jittering of the outline. Do you know what could be a solution for this?

vsevolodmetelsky
Автор

YES! Thank you Matt for making this tutorial!

Mayo
Автор

what would be the best way to make it so you can't see it through walls?

Saderz_
Автор

As usual great videos with a great professional

yorentior