How To Setup Vertex Painting 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 what i want to do is cover how to set up vertex painting inside of unreal engine 5. um this is kind of a refresher as vertex painting is not necessarily something new in unreal engine 5 it's been in the previous unreal engines but at least for someone that might be getting into unreal engine for the first time and wanting to be more familiar at least with ue5's ui and how to set it up that way i wanted to kind of run through and actually give this so in here i have a material already set up so this is my snow ground or whatever down here and basically what i want to do is add the ability to paint between two different materials that's nice because sometimes you know you're not able to necessarily like apply two different materials to a surface just with how yeah your mesh or geo might actually happen so with this you're able to really be able to customize and paint in the material or the shader that you're wanting to do so i'm going to go ahead and actually open up my snow ground here and you will see now that we have the material editor open um we have our material so right now it just is pretty simple has base color uh the roughness normal map amine occlusion therefore and then yeah i think it had a metallic two but there's not really anything in there but um then over here i just have the texture coordinates for the tiling amount it's currently tiling times 10 and i like keeping it separate from the actual texture coordinate because you can put it in here but if you multiply it instead then you have a little parameter down here that you can control custom just specific to the snow but with that i actually want to bring in my uh like my other materials so the other material i'm using is going to be the cobblestone and i want to basically have a cobblestone underneath my snow that i can paint in and have the snow kind of merging with that um starting off what i want to do is i'm going to start and click here and i'm going to bring in a vertex color so we can see this little thing here and basically what this is going to allow us to do is we're going to have three different channels so we're going to have our red green and blue and we'll be able to actually paint and the mesh paint mode using these channels uh specifically for like what we're wanting to do so going over here now what i want to do is i'm just going to set up a very simple thing that way i can show you exactly what we're going to get from that so i'm going to change this over to be let's say a red and this is just a a basic color and then what i'm going to do is i'm going to show two different types of blending methods the first one is going to be a linear interpolate or a lerp you can also just press l on your keyboard and click and it'll make it but it is basically my blend type that i'm going to be using so with this i'm actually going to plug in my snow to the b and then in the a i'm going to be plugging in my red color and then i'm going to plug this into the base color now you'll notice that right now yeah it's just going to be red because there's not actually anything calling that out and so i want to plug this alpha into specifically the red channel so now that i save this very simplistically and i close this out i can go up here to my mode and go over to mesh paint so if i click on here and then go to paint itself down here under colors we can see now that if i go all the way down you'll find channels and by default i believe all three are on you'll want to make sure that only the red channel is on for this and then now if you actually go over here to your scene and you start to paint with the let's see so yeah i want to select this ground here and then i'm going to go to mesh paint paint and then make sure i have the channels on and now you can see that i have my brush i can change the size over here i can change the strength of it as well and then the you know the fall off and there's a couple of other features as well but simply i'm just going to hold shift and you'll see that yeah i have the red being painted in um and so i actually like having it to wear um basically the yeah the uh the underneath part like my cobblestone where i'm wanting to kind of expose it as in that a channel in my material just because it's a little bit easier for the uh the painting process to be like going that way at least now if you did want to have it to where you don't have to hold shift to paint if you go back here and switch to paint you can switch these paint colors here and now you don't have to hold shift you can just paint by default and it'll paint in that uh that red part as well but i'm going to yeah basically i'll actually leave a little bit here that way we can see some of the updates as they kind of go along um and by default yeah we just have that now what i want to do is go back over to my snow ground and i want to set up the the rest of it so the lerp is nice because it's just blending between an a and a b and you get the alpha so it's very simplistic and all but one that i like to use a little bit more is actually called the height lerp so if i type that in you will get this one and it's a little bit bigger and more intimidating just because it has a couple more features and all but i like it because you are able to use the height texture and actually get some more interesting blends with it and i'll show that in a second so what i want to do is it's got the same a and b i can plug this in here and then plug this in here to the b and then my results can go to the base color there and then in the let's see the transition phase that's going to be where i actually want my vertex color to be plugged in from so i'm going to do that and you'll see that i have an error right now the reason being is because it does require high texture it's not an optional thing with the height lerp you do need one so i'll plug that in in a second but what i really want to do now is get rid of my lerp and going to go over here and i want to bring in my actual uh cobblestone that i have so i'm going to drag that up a little bit and let's just grab my base color my amine occlusion normal roughness and height i'll bring all of them in um so we'll probably only set up a couple of these for the purpose of the video because it's the same exact process but i'm going to do the base color there i'm gonna bring in the normal map down bottom and then let's see that's the height that we'll definitely be using in a second and then that's gonna be our roughness there we go and then our ambient collision as well so uh we have plenty of room on this graph no need to like have things bunched up so i'll start to spread things apart and i want to make sure that the cobblestone is going to be on the top just so it's a little bit easier when we go to placing the the nodes and all but i can go ahead and drag in this to the a slot and then going to go ahead and copy paste this down as well and do the same thing for all of these plug in that and then of course the transition phase remember again is going to be that red channel and then with the height texture i do want to go ahead and actually plug in my height map so the reason why i'm going to use the height map is because i actually want the height details to be influencing where the stuff is painting or not painting and i want it to actually like almost fill in to some of the cracks before it lands on top of the cobblestones if that makes sense so what i want to do here though is because i want it to be inverted i'm going to do a 1 minus so there we go then i'm going to plug that into the height texture location there and there and then the one other thing that we are going to want to do uh because right now the cobblestone if i just hit save and show you what it looks like in here um hold on drag the wrong one uh so you'll see that yeah it's pretty massive it's not you know correct or anything so i want to make sure that we do have our uv set up correctly so i'm going to basically take a another multiply out of here and let's say we put this there and then i'm going to plug this in and then do a another uh one here and i'm going to just do let's say the tiling amount to 20 a little bit extreme but we'll plug that in to our base color and this one is specific to the cobblestone so this number here will adjust the tiling amount for the cobblestone and then this number here will adjust the tiling amount for the snow but there we go plugging that in i want to also make sure that i plug this into my normal map and then the one other thing is of course we are using that uh cobblestone height to be the blend i do want to make sure that the cobblestone height is also used in the same tiling amount because otherwise it's going to look really off so now that we have that that should be good to go with that and of course the roughness and the amine occlusion would use the same exact like setups so you would just have the height lerp um plugged in with your uh your cobblestone value going into your a and then your um your like main texture which is the snow going to the b the transition phase again is the vertex color data and then the height is our cobblestone what we're actually wanting it to be adjusted upon the one thing that we have not added so far is the contrast so i'm going to just hit one and put in a number here and i can turn this into a parameter if i'd like uh later on but right now i'm just going to maybe do a value of five just to see yeah what we get but i'll i'll leave this there so the stronger that number is the more the contrast is going to be with that that actual high texture so there we go we have a pretty good setup so far and i can hit save and see what we have in the actual engine so there we go we are starting to get our cobblestone tiling um you'll notice that the cobblestone is actually blending where the the snow is coming into the cracks first before uh actually going on top of the cobblestones and that's what we did actually with that uh that uh height map and everything that we've set up so now if i go back over here and let's say yeah paint this out so i'm going to need to uh turn this up quite a bit i can paint it out and let's say i want to make a pathway right now just got a really strong like strength so it's going to be yeah pretty solid but if i say take this all the way there and then what i can do now is that i have this like kind of mapped out i can come back with a really low value on the the strength and i can do the inverse where i paint in some of that and then maybe yeah change the size as well and you can see that i'm yeah starting to really get a lot of variation maybe i bring up the strength levels a little bit more um and this this will just take some tweaking and all but you can see that yeah it's it fills in to the cracks first and then it basically rises as it's using that contrast um and so i'm gonna just do some more of this and there we go and if if the contrast is too strong we can of course go back and adjust that as well but right now i just kind of want a simple block in of what i'm somewhat imagining of it so keep on paying here get something down yeah nothing nothing too crazy but it's it's really fun um to be able to like have this ability in control because it's not like you're jumping back and forth between a modeling um like program or anything you're just able to actually be in here and custom like you know with your scene like let's say we had like a little village or so i'm actually painting like the the specific snow and everything uh or the the cobblestone based off of how it kind of works with the environment so that i think that's like something really nice about the vertex painting being an option is just because it gives you a lot of hands-on like control and creativity with your environments overall so i can keep on i could you know spend a lot of time on this really but for that purpose i'm going to stop here and then we can see yeah we're starting to get a decent look to it i want to go back over here and that contrast that i was talking about before i'm going to right click and convert it to parameter and then i'm going to name it let's see um contrast there we go and hit save so once that has been boosted i'm just going to bring this over and if now if i actually had like an instance material instance i could control it there as well but i can also just control it here in the shader so you can see uh that's yeah really tweaking the the contrast of the the blend between the two um but there we go gives a pretty nice look you know the snow's kind of building up maybe there's a little bit more diffusion where like some of the snow is like fading off or melting into the rock so something like that could be pretty cool but um just simply yeah and then that like time we've been able to set up just a blend that we could really achieve and now if you wanted to additionally like have another layer where you painted on a like a a third material basically you could just almost almost like pretty much uh like staircase it so i could do a height lerp as well here and then this would then go into my b value and then i could do a red again um similar to what we started with at first so do that there and then i can do or let's say that we don't even want to use the height lure because i don't have a height texture i can blend between the the lerp itself too so i'm just gonna do one of these um and then if i want a third material being blended in i'm going to use the green channel and then a fourth one i could use the blue channel so each material would have its own channel that you're painting in so i just took the green channel plugged it into the alpha the b version is whatever is coming previous to this and then the red which is our third material it's kind of our stand-in for our third material is going into our a and then we can plug in here so i'm just going to just do that the base color nothing else because that would be the same way you can kind of propagate it down to the rest of the material itself but now if i go over here and go back to my mesh paint and i'm gonna go to paint now uh yeah like we had it before i can paint with the the red channel and get the the cobblestone and that that break up there but now if i change the channel to the green channel we should be seeing the the red like we had so i might have to change the strength a little bit but it's going to be on top of all of that the the normal map's not changing because i don't have a normal map in there for the uh the third material but uh if you did have that then you would then be blending between three of them so this is a pretty cool way to yeah be able to blend between a bunch of materials have them all on one ground now of course like if you're wondering like you see all the little dots this is vertex painting so it matters how much vertices are on your mesh so if you're doing a ground and you're wanting to paint on it then you are going to want more vertices and just yeah more uh like basically edges running through your model and all that way you have the ability to paint on there if your model is too low or it doesn't have enough verts in the middle of it then you're basically not going to be able to have smooth transitions and blends like this with what you're kind of limited with so but with uv5 like you're able to definitely get a lot more geo in there and so if you have ground planes that are kind of set up that way you can do some really awesome like yeah basically vertex painting kind of like what we're doing here so far um so yeah that is about it for this video it's just kind of a rehash of what the vertex painting process is inside of the engine with the new ui like i said everything's pretty much the same as like unreal engine 4 or the previous versions it's just that the ui is a little bit different but if you're new to ue5 or just unreal engine in general i really hope this uh helped you kind of understand how to set up vertex painting with your shaders and get them prepared for a scene and yeah that's about it for this one and i'll see you next time
Info
Channel: Peyton Varney
Views: 50,110
Rating: undefined out of 5
Keywords: ue5, ue4, unreal engine, unreal engine 4, unreal engine 5, tesselation, displacement, parallax occlusion, game development, environment art, texture art, texturing, maya, substance designer, lumen, ray tracing, pov, vertex painting, vert painting, material, shader blending, material blending, cobblestone, ground material, snow material, vertex painting in unreal engine, material editor
Id: 86vm_m0_YbQ
Channel Id: undefined
Length: 19min 11sec (1151 seconds)
Published: Wed Jun 01 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.