PAINTING DIRTY GLASS - Game Asset Texture (DETAILED TUTORIAL) -Maya-Substance Painter-Toolbag-UE4

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello welcome back to the channel and in this tutorial we're going to be looking at how to make a grimy or dirty material in substance painter so for this tutorial i have a bush shelter here that i've made i want to have this like an abandoned bush shelter post-apocalyptic say like um the last of us type stuff i don't want it particularly damaged i just want it very dirty and maybe some moss on it and stuff like that so when doing glass materials especially for game assets like this you need to think about how you're going to set up your glass model first so with this bus shelter here i have a few different types of glass so for example i have this piece here and this piece has a thickness to it so we can see the edges of this glass here and so it's got double sides to it and each piece of that has a unique uv as opposed to say this piece here so if i just isolate this you can see that this face here and this face here aren't connected because the edges of these go within the model so i don't need to have those edges and if we look at the uvs for these as well you can see that they actually are on top of each other perfectly so that whatever gets painted on this piece will be exactly the same on this piece will be mirrored across now you don't have to have two pieces one piece will do when you render it with um no back face cutting or two-sided rendering uh switched on in whatever program this goes into after substance painter you will get the same effect you'll see one side and the other but the glass will have no thickness so in this example i've packed a lot of this stuff into the same uv channel and that's okay for me because i'm just going to be rendering this in marmoset but you might be better off taking everything that is just glass so if we just select just the glass pieces here and then repack these to better take advantage of the full uv tile and then make a new material just for the glass so say if you're taking this into ue4 it would be much more advantageous to have the just the glass on a uv tile well packed all by itself that way you can create a specific glass shader just for the glass and have everything else that isn't glass re-packed onto a second material channel this will give you more space for the glass but also let you do some stuff to the glass shader without affecting the rest of the model i've already set up most of my textures for this particular asset in substance painter now when you bring your asset into substance painter one of the first things you'll need to do is bake all your maps down so this is actually baked from itself but it would be better say if you had a high poly asset so you might have a high poly version of this that you want to bake down get all your maps from like your normal map your ambient occlusion curvature and stuff like that all this stuff will inform the uh specific smart materials and masks and procedural stuff you'll need to use to do your texturing so one of the first things you'll need to do once you've brought your asset into substance painter is of course bake all your mesh maps now um i'm not going to go over how to do this or how to do any of the texturing for the hard the the non glass stuff in this i will presume that you already know how to do that and if you don't well then there's quite a few tutorials on my channel that run through all this anyway so have a look through that uh once you've got everything else sorted what you want to do is set this up for glass shading so to do that we can go to windows we can go to views and we can go to shader settings now in shader settings now by default you'll probably have pbr metal roof setup we want to change this to pbr metal rough with alpha blending okay once we've done that we will also need to add a new channel to our channels layer now here we have base color height roughness metallic and normal and we will also want to add opacity by default this isn't added so we can just come up to the plus sign in the corner here and we can scroll down until we find opacity in here and that will add it to your channels so now if we go to layers you can see that i have also already got a few layers set up here and i've got this empty folder called glass now within this glass is going to be all my textures for the glass material so if i just create a new fill and drag and drop that into glass there we can see on our properties for fill we have color height roughness metallic normal and now we have opacity as well so the first thing i'm going to do is just create a general opacitiness within this glass layer so i'm just going to go down to pasta here and i'm going to slide this up to a mid or close to black so if it's fully black i mean it's going to be completely um transparent is it fully white it's going to be completely opaque so we just want something not quite fully transparent so i'm just going to go for like a dark gray now if it's fully transparent you're not going to see anything at all you're not going to be able to see any of the roughness or um the reflectiveness from that glass so only use completely transparent for things like here where i've done this poster on here i've made it completely transparent where i want that poster being completely ed away by mold and age you'll also use completely transparent for stuff like alphas for grass and things like that so the next thing i want to do is make sure that this is only going to affect the glass parts of this mesh so i'm going to come up to my folder here i'm going to right click and add a black mask and then in that black mask i'm going to add a paint and then i'm going to go across to my tools here and i'm going to select polygon fill now with polygon fill we can select by triangle polys which is a square the entire mesh so standalone meshes or uv chunks so whatever works best for how you set up your uvs and mesh so i'm going to go from mesh fill here and i'm just going to select the different parts of the mesh that i want to be glass okay so the next thing i want to do is create a base rough base reflection level for this class so i'm going to go back down to my fill layer and i'm just going to rename this to base glass and i'm going to turn the roughness up to add a bit of reflectivity to this glass now you can leave it at this here um which kind of gives a nice glass effect but sometimes this kind of looks a bit plasticky now you can you leave it at just utilizing the roughness for this but to get a more reflective and more realistic looking glass you can actually take the metallic from black and just turn that up to white or some midpoint there now this isn't strictly correct i mean glass is not a metallic so it should be completely black but without the use of fresnel which i don't think you can set up for now in substance painter at least not that i know of very hard to get realistic looking glass so in ue4 we can set up for now and that means we can make it more reflective the more of a glancing angle you're looking at a glass so if you look glass a glass side on it looks a lot less transparent and a lot more reflective and it only becomes completely transparent when you're looking at directly face on but without fresnel it's very hard to do so i find that just adding a little bit of metallic does help it look less plasticky and a little bit more glass-like okay then so if your scene doesn't look exactly like this i've also added a different environment here so you can do that by just grabbing one of these and dropping it into anywhere outside your asset so normally you're on panorama i think here i have maybe glazed piazza patio or something like that that was just to get some more interesting reflections in the glass while i'm working on it so the next thing we want to do is layer the different dirt up in separate folders so that we can more easily control what type of dirt we have on this so i'm going to start off with basically a general dust on this so what i'm going to do is just create a new folder and i'm going to call this dust and then in that folder i'm going to drop a fill now it's worth noting as well that this folder has been made inside the glass folder so everything that goes inside this glass folder will only affect the glass and nothing else that we've made so i can put as much as i want into here without worrying um about what part of this asset is going to be attached to so i'm actually also going to create another folder inside dust i'm just going to call this dust layer one and i like to do this because i find building up my folder structure like this just keeps everything a little bit more neat and whatever i want to put that's how it categorizes dust i can just put in this dust folder and it won't get confused with everything else so in here i'm just going to make this base color kind of a dusty brown always change this as a later date and just to get some variation on this i'm also going to duplicate it and make this one a little bit lighter i'm also going to set the roughness of this as well something pretty low okay and then i want to mask some of this lighter one out so that we get an interesting pattern to do that i can right click and add a black mask and then within that black mask i can add a fill and in that fill we can add one of the grunge maps and i want something kind of low contrasty and quite noisy so there's loads and loads of different grunge maps to choose from here i very rarely ever have to bring my own grunge into substance painter because there's just so much to to choose from so i want something that's just going to break up the and add a little bit of noise and pattern to this so i'm going to crease the scaling to say 2. now be careful how much you increase the scaling with this stuff because it very quickly becomes obvious that this is a tiling texture and the more interesting the grunge you pick the more obvious that's going to be so i'm going to set this to 3 and decrease the balance and the contrast okay so that's very broken up now we can start placing this where we want it to be placed so we can come to this dust layer and we can add a black mask to that to get rid of it okay so annoyingly what you guys will not have just seen then is i've just paused to answer the door and i forgot to unpause it and i have just done this entire tutorial without recording it so i've come back to this point if i sound a little bit more hoarse it's because i've just been talking for an hour uh and didn't record it so a good lesson for anybody that mistakes can be made no matter what you're doing and you've just kind of you've just kind of got to push on okay so we've got the dust layer here and we're going to add a black mask to this and we're going to start masking this out so rather than create our own masks by going to add generator i'm going to see if we can just use the stuff from the smart masks here now i found that you can get 90 of the way there with most of this stuff and it does speed up the process a lot one of the beautiful things about substance paint and the stuff that comes with it so i think i'm going to use maybe occlusion soft just drag that and drop it onto that dust layer and on that mask editor there i'm going to increase the balance of it and also increase the contrast a little now we can see it's getting these edges nicely here but it's um it's also adding a lot of ambient occlusion in this corner here so what i want to do is just come down to i mean inclusion and just roll that back quite a lot and i'm going to come into curvature here and i'm just going to increase that a little bit maybe even open that up and add some of the details here okay and then i want to lay this up so i don't just want the edges like this i want to add another layer to this so again i'm just going to go into here and find something appropriate maybe like dirt soft and drop that on there uh now i want to lay this up i don't just want the edges like this for the dust because the dust is kind of an overall layer now if we look in the opacity at the moment we can see you should have something like this where it's black where it's transparent and it's white where we started adding the dirt into this now the black itself will not show up very well in programs like ue4 and even marmoset so we just go back to the material here it looks good in substance painter but the the where it is kind of quite pale that won't show up very well in ue4 it'll be mainly where the dark material is here and also it won't be quite as reflective because the darkness of the opacity mask will remove like the roughness as well as the base colour and everything else so we want to make sure that this is not so dark and also has some sort of kind of texture right across it and that's basically what this dust layer is it's kind of giving you the base layer of all this stuff so first of all i'm going to add a fill on top of this and i'm going to make sure this is set to additive so as not to blast out all the masks that we've done so far in there and in that fill i'm going to click grayscale and i'm going to find a nice dust type texture for this something that looks like it's maybe been washed out a little bit so i'm going to go for this one you can see it's got this kind of washed out look to it and increase the scaling of this a bit okay so that's nice dusty surface layer there and then i'm going to increase the contrast of that so let's jump into the opacity view here we can see that there now what we can do is we can come down to this dirt heavy layer and we can just go to the opacity slider here and just turn that down so we've just got a nice subtle background of dust on this turn the balance of that down a little bit let's invert that as well now i also want more dust on the top surfaces as well and what we can do for that is add another mask now you should have one called sun fade this didn't used to come pre-packaged with substance paint but it might do now but either way you should be able to find it on the substance sure store for free so we grab that and drop that on top and again make sure this is set to additive you can see this will take the top surface based on the maps that we we baked and only apply that to the top surface so we need to select that mass first of all and turn the contrast up so that it's not leaking onto the liver surfaces and you can see here if we just scroll this up and down this will just appear on that top piece don't want to go too far or it'll just take over everything so we've got more on the top there now and the last thing i want to do is right click this and add paint and then i want to go to my brushes and find a nice paintbrush and we've got quite a few different ones to work with here but i'm going to go for first of all dirt 2 so it's got a nice flow to it increase the flow and turn the opacity down a little bit and i'm just going to start painting in some custom dirt around some of the edges that aren't picked up and then i'm going to add yet again another paint layer but this time i'm going to set this to subtraction and i'm just going to paint out some of the dust that we put in so far just a little bit i'm just going to check the opacity i don't want to go too far with this i don't want to go it to go too black but what we can do is just paint in where we want this custom transparency to be um so at the top here i'm going to put some streaks in this so this is where having a a pressure sensitive tablet of some sort helps because you can get some nice variation in lines on this i'm just kind of going to make some streaks up maybe have been removed through rain drips and such stuff then you can come back to these layers and if you feel like you've removed too much you can just slide the opacity on this down and remove or add that back in okay so that's our first layer done the dust next off we want to add another folder and i'm going to name this one mud i'm going to do much the same again with this so again i'm going to put another layer in there just in case i decide to add second mud layers to it a and a fill into that mud actually instead of using a fill for this i'm going to use a pre-built material i find for mud often mortal wall will work well in a pinch so i'm just going to drop that in there i'll delete the other layer and i'm going to increase the scale of this okay and i'm also going to just make that a little bit darker decrease the saturation a touch i'm also going to turn off the normal map for this and as you can see here i've accidentally made that mud folder inside the dust folder i don't want to do that so i'm just going to grab that and put it on top of the the dust but still inside the glass so we've got this mud here we've got mod 8 in there with the motor wall on that okay and then in the mod a folder we can right click that and add a black mask and we can start painting this mud back on here so first of all though i want to add a few more smart masks to this so i'm going to use ground dirt which is much like the sun fade but kind of the inverse it'll start adding the uh material from the bottom up so if i just grab that and drop it onto mod a we can see it also adds as well as the mask editor it adds a grunge map so we just have a look at that grunge map you can see now that just had some flecks of mud across the surface here so we just turn that on and off you can see that there so maybe just increase the contrast of that increase the balance a little bit let's make this mud a little bit lighter okay so we come back down to the mask editor for the mud we can now increase and decrease the balance of that and you can see that'll start appearing from the bottom and move up the model so we just want a little bit at the bottom increase the contrast of it okay so for this again just to get some of that extra dirt in the corners here i'm going to add a occlusion soft so i'm just going to pause at that point and see that i never changed the layer blending for that mask to additive so it just wipes out everything that was underneath it which was the mud ground dirt that we just placed in and i didn't realize i did that and i never bring it back so on yours make sure that you put any layers that you put over a mask is set to additive or subtractive depending on what you want so that you can blend it with the other layers and in that i'm going to increase the balance of it but turn the ambient occlusion right down don't want too much in the corner there because it just doesn't really make too much sense and i'm going to turn the curvature up a little bit and turn the global contrast right up now the rest of it i'm going to paint with custom brush so i'm just going to add a paint layer to this and again go back down to my brush folder and find say the dirt 2 again and get to painting some mud around all the edges and stuff like that so just a small note if you want to spin the lights around your scene you can shift right click outside and just move the mouse to left and right to line up the lighting a little bit better to help you paint in any custom mud and i also want to paint in quite a bit around the backs of here because my little poster isn't double-sided so you can kind of see the the reverse of it which is inverted so once i've got two layers of this in my rendering software you won't be able to see it because that mud will be blocking it so just look a little bit better same with this here okay so at the moment with the mod the opacity isn't working properly so we go into our opacity map here you can see the mud is actually we just turn the opacity onto that it's actually minusing it out so a quick way to fix that is if we just make another layer above that and just turn off everything but opacity and then we can change the opacity on that layer and because that layer is inside this folder and it's the folder that has all the paint and masks and shapes on then we don't have to do anything else to that in fact we can put any layer we want inside there because we're using the actual folder to generate the masks so that's the beauty of putting things in folders it doesn't matter what you do to these it won't affect your nice masks here so then we can just go like that make sure that is nice and opaque now we can get back to painting this mud and you can see much more realistic now and if you want to remove some of the painting that you put in if you can just you can go to your paint properties and just change the gray scale down to black and then you can just remove some of the painting that you put in there and if you want to crisp up your mud a little bit what you can do is on top of your stack here in the masks we can add a filter and in that filter we scroll down to the bottom we can add a sharpen and that'll just crisp up some of them shapes right now the last layer i want to add here so we add a new layer and move it to the top above mud and we can call this moss and in that we can create a fill and another layer actually moss a like normal just drag that into mos a okay so in here with this we can make this nice green it's always good if you've got some reference for this kind of thing i'm gonna make this a dark green and i'm gonna turn the i'm going to keep the roughness up with the dark green and i'm going to duplicate that layer and i'm going to make this one a little bit lighter so i'm going to add a black mask and then in that black mask i'm going to add a fill and then in that fill i'm going to find something that will look kind of mossy so i want something evenly like fractally let's see what noise ones we've got dirt for let's have a look that looks about right okay with the noise ones you can actually jump into the noise parameters here and increase stuff like the scale and you can also change the seed as well so i want to increase the contrast of that and i'm going to add just a little bit of height information to this as well so i want the light spots to kind of come out a little bit okay and i'm going to increase the tiling of dirt until we have something kind of mossy change the roughness around this okay i think that works pretty well yeah that looks kind of moss like okay now we've got our moss we can start to paint this in where we want so first of all let's add a black mask to this and i just want to bring it into the edges first so we can use one of the smart masks for that again i think the occlusion soft will work well with that it's well worth just messing around with these things trying to find something that works well um this is working pretty well at the moment for this particular model turn the contrast right up now we want to try and keep the contrast quite high high for the moss because it's more of a solid object on the surface of the glass so it wouldn't have too much transparency so now we've got a little bit of edging on there i'm going to right click this and add paint and start to paint in the rest of this custom moss so again i think i'll just start with the dirt 2 brush and i want this to look a little bit more organic now there's no i don't think there's any moss brushes in here but i do find that uh this one works pretty well so we set this to really small and just go around the edges here you can see it does have add like these little stipples that kind of look like organic growth for moss just have to change the orientation for both sides of these okay and that's pretty much all there is to it to adding dirt to glass it's just about layering up and thinking about how best to place it why it would be there and stuff like that so when we go and look at our opacity channel it should look something like this so you shouldn't have anything to black now when you export this and set it up in either ue4 marmoset or whatever program you're going to be using it might not work first time to get the roughness values right and everything might take you it might need you to come back in leave substance painter open and just tweak the values of this so we just come down to the base class for example and just decrease the opacity there you know you might have to tweak this because whatever looks good in substance painter doesn't necessarily mean that it's going to work out the same way in your engine or whatever program you're going to be using to render so now it's time to export this and set it up in mamza so for that i'm going to export textures and i've got this set to the right file so i already have tutorials on my channel how to export this for marmoset but for this one i'm going to export it as unreal engine 4 and show you how to set an unreal end up engine 4 map up in marmoset which makes it just a little bit different than some of my other tutorials so the output template for this is uh the unreal engine 4 packed and then all i've done is added a changed it to project name and also added an opacity map here as well now you do get an opacity in your base color but i also like to export a separate one so i can work just with that so i'll link how to set up the opacity map for ue4 adding your own opacity map to this and i'll link that in the comments down below so with this selected i'm just going to export these okay so in my mizer here i have this scene set up and i've set this up exactly the same way as i did the old cam in the lighting for portfolios uh in marmoset tutorial i've got on my channel so with this setup and the lighting kind of nice i want to create a new material and in this material we want to turn occlusion on we want to turn transparency on so we can change that to dither and we want to change reflectivity from specular to metalness and we want to change surface to normals and we want to find our maps and first of all i'm going to plug in the normal map that way i can just make sure that the normal details are correct so we want to flip y okay so we can see that moss coming out the surface there and i might even want to go back into substance painter and just increase the amount of bump on that so that's why it's good to keep substance painter open while you're testing the rendering of this so you can make small tweaks and save them out and see the results so the next thing i want to do is plug in the reflectivity so i'm going to do the metalness and when you're exporting for ue4 you'll get this one which is a packed map collision roughness and metallic and each map of that it's a black and white map is plugged into a different rgb channel in this just to save space so we need to split this up so we can grab this and drag it into macro surface gloss and we want to change this to green and then invert it as well and you also want to make sure srgb is switched off for these so i'm going to leave albedo for now i'm just going to plug in the next one which is reflectivity metalness put that in there and i'm going to change this one to blue and also make sure the srgb is off on that which is and then i'm going to do the same again put in occlusion okay so we've got a little bit of ambient occlusion in there now and that should automatically be set to red and then next i want the opacity map so we're going to grab this drop it in there and i'm going to set the channel to r r now we can see through that glass and you'll see this noise on this as well and that's just the rendering that'll go away once we render it out and it does more passes on the calculations of the glass and the last layer we want in here is the albedo or the base color so we can grab that and drop it into albedo slot there and that one is the only one that we want srgb ticked on with so now we can see our moss is opaque and the rest is transparent or semi-transparent and you can see we can't see through the roof of the bus shelter as much because there's more dirt on top of there okay so now i can set all the settings in my render to high so i'm going to turn on local reflections high red shadows enable gi secondary bounces and i'm going to turn the occlusion detail up to 4. now this will move really slow so i recommend only turning these on when you're about to do a render and for the rest of the time turn them off because if i try and spin round this model now it really lags obviously better machines will handle this better but for me i find it easier to turn that off and then we can go to capture here go to settings and we want to make sure that image is set to 100 or more but i do find 100 will do set this up to a nice big image here at 2560x1440 click ok on that and then i can go to capture and then capture image now we can see that rendered out from marmoset it looks really nice very similar to what we had in substance painter and the setup of this in ue4 is pretty much identical though you will get more transparency and you'll get less of the reflection on the surface so there is some other techniques to kind of overcome that when you want dirt on glass in ue4 uh but basically this will get you quite a long way though this will still look pretty good in ue4 okay and just quickly setting this up in uv4 is much the same as you would any other textures so i have the bush shelter set up here and the only thing i've made differently is i've assigned a different material to each of the parts of the mesh that represent glass and represent solid surfaces so that i've got more material slots here so i set that up in maya just made some blank materials in maya and assigned them to various polygons so i've also dragged in the materials here and the one thing we want to do to the materials is we want to get the mix map and just turn srgb off save that so we create a new material and we can call this bus shelter glass and we can drop into that that channel and you can see it's gone black with the glasses and then we double click that we can drag in our materials our textures and we can start plugging these in so we want the base color into base color and we want normal into normal and then the mix map we want to go from red down to the bottom ambient occlusion the next one up green roughness and blue is metallic and we also want to grab this shader here and make it a glass translucent material so we can go to where it says blend mode here and change that to translucent and we also want to set this two-sided so we can see both sides and then we want to come down to a translucency tab where it says lighting mode and we want to change this to surface translucency volume and then we can grab our opacity mask and plonk it into the opacity slot so we save that and close the window okay now once that's saved we can see that shows up nicely on the bush shelter now one thing you'll notice is there's not as much reflectivity on the surface of the glass and really to get that to work with more reflectivity you can incre decrease the opacity or increase the opacity so we'd make this black here a little bit more gray that'll start to show a bit more of the roughness but it'll also make the glass much less transparent which isn't necessarily what you want now there is another technique where you basically duplicate the glass and you make one glass material that's just a basic glass material with roughness and reflectivity set up and then you have another piece of glass over the top which is the dirt and then them two together she'll get the should get the result that you want and i'll show how to do that in another tutorial and just mention down below if you if you do want to see how to do that but for now this works out pretty well i mean it's not as nice as the render in substance painter or marmoset but it does look nice and dirty and grungy and with a little bit of tweaking to this you can definitely get a lot further along there now one thing you can do to bring out some more of the detail from the alpha is this is at the moment set up as a normal image you can change the compression settings from default to alpha now if you do that and save it you'll get an error on the material so if you look here we've got an error on this one so we just need to change the sampler type from color to alpha now if you have saved out your base color with the alpha from substance painter we don't need this at all we can delete this and we can actually grab the alpha channel from here and we can just plug that into opacity there now this won't crush the blacks quite as much and you'll get just a little bit more of the dust detail coming through now we can see we've got some more detail from that dust coming through there and that glass looks a little bit more realistic and one last thing i mentioned at the beginning of the tutorial why doing two panes of glass that share the same uv isn't ideal and that's because they basically just have a repeat of whatever texture is painted on one because of the gap between them it means from certain angles you can see both of them textures at the same time and from a distance this can kind of cause a weird kind of everything's just slightly blurry so you can see on this one where it doesn't show the same side and they've got a different texture on each side it's quite crisp and you don't get any kind of double vision to it but here kind of looks a bit weird so yeah that's uh that's why it's probably best to do either just single pane of glass or put each side on its own uv so that's just about it for painting dirty glass in substance painter and rendering it in marmoset and uv4 i will be doing a more realistic type of glass in ue4 soon but until then please check out some of my other tutorials on painting stuff like the bus shelter getting realistic metal in substance painter and also realistic rendering in marmoset so good luck with your creations and i'll see you in the next video you
Info
Channel: RobotArmy
Views: 17,321
Rating: undefined out of 5
Keywords: Stylised, Substance Painter, Game Asset, 3D, CG, Maya, Pixologic, Autodesk, Algorithmic, Realistic, Glass, Grime, Drity, UE4, marmoset, toolbag, Dirty, Grimy, grimey, Textureing, Texture, Texturing
Id: isuqEx30VBg
Channel Id: undefined
Length: 42min 57sec (2577 seconds)
Published: Sat Apr 24 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.