How to Automatically Setup Materials in Unreal Engine 5 using USD Export from Substance Painter

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
howy you everybody today we're going to be looking at how we can bring in materials from substance spainer all the way into Onre engine right here so the process for doing so we can actually go ahead and do this in two different ways one we can just export the textures from over here and then rebuild the material inside of unal engine or we can also do it the other way which is using USD or Universal scene description to be able to bring in our materials automatically from here all the way into Unreal Engine now there is one small caveat that I want people to understand when it comes to bringing in stuff with USD automatically this methodology only works for hard surface objects so right now for in this case this would actually work perfectly well with this backpack because we do not have any sort of subsurface or any sort of translucent material right here where uh the USD Shader does not actually get supported with so because this is a hard surface asset we can actually go ahead and export this using USD so let's go ahead and do just that go over to file go over to export textures and then what we want to do right here is we want to actually go ahead and select the unreal 4 packed map right here as the output template now I actually ended up creating my own preset right here which says under Engine 5 because I want some specific details about how I'm exporting certain things so let's actually go ahead and take a look at exactly what those settings are so that you can recreate this template as well but but if you don't want to recreate the template this under Engine 4 packed map right here is the exact same preset that I actually used to build this so you can actually just go ahead and use this preset and it should work just the same so let's go go over here to Output templates and then let's go over to my Unreal Engine 5 template that I've created so right here we start off with our base color map which we have our base color information as RGB and a alpha information that we can plug in if we have any sort of masking our next map right here is actually a very interesting one that you probably would not have seen in many other dcc's which is a packed map right here which contains information about occlusion roughness and metallic the r actually stands for ambient occlusion so if you were to go over here we can see that this blue value which says mixed AO is mapped right here to the R value next we have our roughness which is mapped to the green channel right here as you can see right there and then our metallic which is mapped to the B Channel which you you can see right here so this occlusion roughness metallic map is a color image but actually contains three different maps that are black and white and so we'll be using this for that information right there next up we have our normal map and our normal map of course is an RGB map we have our emissive map which can also be RGB we have a scattering map that I've created right here which I just go ahead and use as a gray value because this is just the scattering amount that I want to put in and then we have scattering color if we need be that's that'll be RGB and then lastly we have World position offset or as we like to call it the height map or displacement map that we can put in as a gray value right here now the most important thing when it comes to creating this template is actually what format you're using and what type of uh bit depth that you have for each of these Maps Now you kind of notice right here that some of these are 8 Bits plus dithering and some of these are 16 bits what's up with that well any sort of color maps that are coming into Unreal Engine if you were to use a 16-bit color map you'd have to do a lot of extra steps and conversion for it to not be looking very gray um and so the easy way to make sure that you're getting the perfect color that you're getting right here is to make sure you set your bit depth to 8 Bits plus dithering and then we can reserve the 16 bits for actually for our float values which need more information to be able to convey height and all those details correctly so if there's any sort of color map with the exception of of course our occlusion roughness metallic map which again again is just a bunch of black and white Maps stacked together and our normal map which is actually technically an information map the main thing we have to realize is that any other color Maps absolutely need to be 8 Bits plus dithering instead of 16 bits now that we did that we should have our template all ready to go to export so let's go over here if you were to use the unine four packed map template you want to make sure that you're setting this to PNG and you can set this to 8 Bits plus dithering or 8 Bits because again we need that color information to be this so if you're going to force it I would force it to 8 Bits but we have our under 5 uh preset right here so I'm going to go ahead and use this I'm going to set my size to 4096 for a 4K map and we can keep the padding the same as what it has and then the main thing we want to do here this is the most important check box you want to use the USD workflow is to check this box that says export USD asset once we were to do this we can go ahead and press export so right now I have this in D converted assets text Tes in the backpack and if I were to go ahead and click export it'll start exporting and it'll not only export your texture Maps but would actually also export a mesh from substance Banner itself perfect so now that we have everything exported we can actually go ahead and exit out of substance spanner and then what we can do is we can go into Unreal Engine right here to be able to bring our asset in so how do we import a USD asset well the way to do that is you go over to import and then what we can do is we can go over to our converted assets folder now if we were to go into the folder that we have exported which is backpack unreal right here let's double click this and you actually realize that you're not just getting a folder with all of your texture maps in here as we can see but also you're getting a geo. USD file a material. USDA file and a USD file right here what you want to do is if you just want the material you can just go ahead and select the USDA file if you just want the Geo you can just select the Geo USD file but I want both of them and the textures all involved with each other so I want to go ahead and select the USD file press open and you'll see a uh popup coming in here that asks you where you want to put your imported Assets in let's go put this in the materials folder let's press okay and as you can see right here we're getting this import options all ready to go um right here for the data to import I can select all of these if I wanted to but I just want the geometry and the materials so I have these selected right here also when it comes to the render context I like to keep this at unreal I like to keep the material purpose as full CU we're planning to render this anyway and in fact we can also keep that as a purpose right here once we have this all ready to go we want to go ahead and check all the stuff that is getting imported so right now we have our material right here we have our backpack and then we're seeing that it's connected to a USD preview Shader and we also have all these texture coordinates we have the diffuse roughness occlusion metallic all these maps all ready to go now something of a fair warning if you have any sort of opacity map here you want to go ahead and actually uncheck that make sure and double check that there's any opacity Maps coming in that you actually disable that right here with these check boxes so we don't actually have any apacity Maps coming in which is great so we can actually go ahead and press import awesome now that we've gotten this imported we see ourselves that we have all of our textures ready to go and if we were to go back to our actual folder right here we have materials static meshes and textures we want to go ahead and go into the static meshes folder and as you can see you have our backpack right here all perfectly exported let's go ahead and make this backpack a little bit bigger and now we have our backpack right here all nice and good but you might be wondering where's the materials where's the textures but what you have to do is you have to go over here and we see our materials folder and just like that we have all of our materials perfectly plugged in and and we can just go ahead and click and drag and put this onto the object and any place that has this material will get detected and make sure everything is properly plugged in and all ready to go so you can take this patch put this here you can go ahead and put this elastic all the way in the back so I'm going to go ahead and put that later on I'm going to go ahead and put this metal material right there go ahead and put the um leather right over here perfect and then I think if we were to rotate the bag around so let's go ahead and rotate that real quick we can add material to the straps right there in the back so that should be this one nice so we have ourselves our backpack it's all shiny and nice and ready to go now let's say that you're using multiple UV tiles or udims which this backpack actually does use multiple UV tiles sometimes your textures might get messed up and you might be wondering how you can fix that and so the way to do that is you go over to settings go to Project settings come all the way down into the rendering section which should be right here and what you want to do is that you want to go ahead and select enable virtual texture support you got to check both of these boxes and it'll actually prompt you to restart your unreal make sure that you have save everything and make sure that you do that so that udm tiles properly work inside of Unreal Engine
Info
Channel: Adithya Sathyanarayanan
Views: 11,478
Rating: undefined out of 5
Keywords: unreal engine, unreal, ue5, usd, ue5 materials, unreal materials, substance to unreal, substance painter, substance painter to unreal, automatic materials, usd unreal, usd materials, plugin unreal textures, unreal textures, substance textures
Id: 3G_3Z3miN_s
Channel Id: undefined
Length: 9min 27sec (567 seconds)
Published: Mon Oct 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.