Setting Up Custom Collision in Unreal Engine 5

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hi everyone my name is peyton and in this video i want to go over some simple collision fixes for your environments that way you don't get stuck on any invisible collision once you've imported some things and you want to kind of run around in your space and experience it so for this example here i have this outside little patio deck area and this grille um and countertop basically has some invisible collision and so i want to real quick show when i play you'll see that i can't run over there and get near the grill and additionally yeah i can actually show it here in the collision viewport as well so if you're having this issue basically where you can't run into a certain area so it's probably because of the model that you brought in and by default it has a pretty simple collision being applied to it it's just a bounding box and generally you'll have to either create your own or edit it in some way so if i go up here to the view modes um and currently we're in lit i can switch over to player collision and you'll see here that that table area has this large blocker and if i click on it it is the actual patio grill and you can see through here the areas that i can walk are pretty much the areas that don't of course have anything blocking them so we want to pretty much fix that so a couple of ways you can do it uh is if i go in here i can click on my patio grill itself and let that open up it's gonna load in my actual model and everything and this is just the the gray box uh like default shader or the world grid shader on it um but if you go up here and click on collision you'll see that you can actually show your collision as well on this and yes looks like that so far and then i actually want to basically there's a couple of ways that we can go about resolving this uh so the the first way um this is a super like like quick and um dirty way is of course you can actually remove the collision however you don't want to do that because we're going to then run be able to run through it and actually stand inside the grille so we probably don't want to do that now one thing to also consider is that collision is a expense a cost also so if you are making a game and wanting to have the collision for your player and the player's face then you need to factor in how expensive and high poly your collision is and i'll kind of get into that in a second as well when i show some more complex collision so if i scroll down here on the right side you'll find the collision details tab and there's a couple of things you can do customized collision you could actually bring in collision from maya as well or whatever modeling software and then the other thing uh the quickest way at least for uh you if you wanted to just yeah roughly play around with it is that i can switch this collision preset uh over to or the collision complexity sorry you can switch this from project default to use complex collision is simple and so what that is going to do now is it's actually going to use the so this is the simple collision is the green one that we see and then the complex collision is actually going to use the geometry uh that we brought in so it's going to be the the pink one that we're seeing which is the actual like verts and everything of the model so that's the difference and of course like there is a yeah costs like the green ones a lot more simplified less vertices and the pink one has more but it is more accurate as well now it might not matter if we have something that is super low poly that we're just wanting to add collision on but let's say that over here on these grill handles uh like some of these knobs and all are a little probably too high poly for what we actually needed so that would be where those unnecessarily costs are coming in for the collision however what we can do here is right now we have it using the complex collision as simple i can save that and you'll see that if i go over here to the player collision mode that now uh if we yeah basically see that separate then it is looking basically like the models and so if i uh play from here i can actually walk over here now and get around these um we'll see that yeah there's something else that is actually blocking it like this tree here that would probably need to yeah be resolved as well it's just like a placeholder but uh yeah at least this part so far has simplified collision to where we can actually walk through that area now like i said that might not be what we actually want to do because it's maybe a little bit too expensive so what are some other ways that we can actually go about setting up some collision for this so i'm going to go back here and just go back to the project default and i want to show if we come up here and click on collision you can also find it down here but there's the auto convex collision and so what this is gonna do is the the collision that we have um the simplified green one uh it is actually this is almost like an autogen collision tool and so if we click here then you'll see that over here in the [Music] details panel we're getting a convex decon decomposition uh like area and this is actually where we can make some uh like changes with these just yet values and basically get uh it to bake out a collision for us so i'm gonna leave it at this for now and just hit apply and you'll see now that it's showing the updated collision this might be perfect for what we're going for you know it keeps the the edges pretty clean we're able to get under here if we needed to which i don't think we do and generally like it yeah it has a rough indication of where everything is and it looks pretty low poly as well nothing too expensive so i think like maybe you know there's one or two areas here that are a little bit problematic but overall i think it's it's pretty good if i wanted to bring this up a little bit i could hit apply or five in the hole count and then hit apply again and it might yeah rerun it and get a better result but um that's another way that we can now have collision to where if i play from here i can now run in here again just like we did before but we don't have that super complex collision going on and now the other way that we can also do collision um just kind of showing a multitude of the ways that you can actually do it is you can also do it by hand so what i can do is i can actually i'm going to close that out go up here to collision and i want to remove collision so now we actually don't have any collision at all i can still use the complex because that's the the geo but right now we don't have collision um what i want to do is i want to then click on this again and then you can see that there's the ability to add collisions and so what i want to do is i'm going to click on add box simplified collision and you'll see that you actually get a box here and i can actually move this around so pretty much just like modeling or so i could basically just um place collision where i wanted it to be so let's say we like it here and i'm gonna click on that and then i can hold alt and then drag and then we're getting a duplicate um same thing with like placing and all i can use the snapping and everything in here uh but yeah i can pretty much just do a super simplified uh collision box and bounding up here so let's say that we like that and then over here i'm going to do the same thing and just get yeah four boxes so this is probably gonna be the cheapest way uh that you're able to have collision in the scene um and still being used now of course like i said if we wanted to go underneath this table for any reason or we had any other like further game mechanics that made it more complicated this might not work um but being that this is kind of like a a walking space and the main goal is to like not be able to walk into those things then that's pretty much what we could achieve with this uh now additionally like i said if i wanted to i could just do something like this and have this little bound here and then just duplicate it and make a very flat one for the actual table top or countertop that we have here and that would pretty much do the job quite well so there we go cool and yeah the the overlapping's fine pretty much like i could make it cleaner but that should be good so now if i play from here um we're getting the same result so uh now i know this tree had a bit of an issue with it but if i go back over to the player collision you'll see that it has the the geo that i just placed it's far more simplified but that works pretty well um let me move that out of the way as well but yeah so now you can see that the the collisions clean that area and is working like we would want it to be um so but yeah that's about it uh that should be helpful at least for just doing some simplified collision in your space if you're really wanting to just be able to run through not have any issues like getting stuck with blockers or anything and not also wanting to spend a ton of time making it in your modeling software that way you can actually just do it in unreal it updates real time to all of your instance props um and it's yeah pretty solid so that's about it for this one and i will see you next time
Info
Channel: Peyton Varney
Views: 13,997
Rating: undefined out of 5
Keywords: unreal engine, ue5, ue4, unreal engine 4, unreal engine 5, collision, setting up collision, custom collision, collision editor, environment collision, environment art, arch viz, architectural visualization, game development, indie development, game dev, how to setup collision, how to make collision, how to fix collision, texture art, environment creation, making a game in unreal
Id: 0YTy3ziLWqY
Channel Id: undefined
Length: 11min 33sec (693 seconds)
Published: Tue Jul 05 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.