The Secret to Hide TEXTURE REPETITION in Unreal Engine 5: 4 PRO TIPS - UE5 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
tiling textures are a staple of game art but when it's done badly it can really ruin the sense of immersion in a game you're a good game artist though and you want to make sure your talent textures don't actually look like hot garbage well then my friend you have come to the right place I'm Shane this is Game Dev Academy and in this week's class I'll give you four Pro techniques for breaking up the tiling in your textures you can stack each of these techniques up to make it so that your textures don't even look tiled at all so make sure you stick around to the end of the video to get the full effect if your textures look really tiled the first thing you should do is make sure that the texture is actually seamless this means that the colors at the edges of the texture will match up when it's repeated in both the X and Y Direction in this example here you can see that the seams are very noticeable and that's because I've purposefully chosen a texture that I know isn't seamless here it is on Google image search in all of its unseamless Glory let's swap this out for a seamless texture then to show the difference it can make I'm going to go to Mega scans as I know that all of their textures are seamless I'll search for a wild guess material that I like the look of and then download it next I'll need to import the textures into a real engine and then I'll create a new material for the wild grass I'll just add the base color and normal textures and then also add a constant for the roughness and that's all I need to do this material is identical to the one I created with the texture that isn't seamless so let's see what a difference using good seamless textures makes and as you can see this already looks way better than the original now we'll add some micro variation to our material to break up the tiling even more the first thing I want to do for this is to add the ability to tile the texture by differing amounts so to do that I'll add in a texture coordinate node and multiply it by a scalar parameter which I will call Micro tiling I'll set the default value of this to 0.5 as I think this gives a better result by default next I'll add in the ability to add a tint to the color with a vector parameter which I'll call Micro tint and then multiply that by the texture for the base color I just need to make sure I set the default color of this to White by default which means it won't change the color unless I change this value now I'll stick all of this into a comment and then copy and paste everything down here I'll change the name in the comment to micro color variation then I'll replace the scalar parameter and call the new one micro variation tiling I should also have changed the default value of this parameter to 0.5 but I forgot to do this when I was recording the video now I need to change the name of the vector parameter to micro variation tint and then I'll take the green channel of the graph texture to multiply this by now I can change the value of the micro variation tint to a pale yellow color now I have a microcolor and micro color variation I need a pleasing way to blend between them for this I'll create a new texture sample and the texture I'm going to use is called T underscore macro variation which is available in the Unreal Engine starter content I want to have control over how this texture tiles so I'll create another texture coordinate node and multiply this by a scalar which I will call Micro variation Alpha tiling and I'll set the default value of this to 0.01 now for the blend I will create a linear interpolate node and then I can plug in the red channel of the result of the micro variation blend to drive the transition between the two variations then I'll set the result of our micro color 2A and the result of our micro color variation to B and then finally take the result of the alert and plug it into our base color now I'll save it and check out the result once it's applied you can see that the tailing is broken up by the difference between the two variations and that I can also use the material instance to change the color of the tints to keep the transition from being too jarring so this looks better again and this is even before I remember to go back and set the default tiling value for the micro variation now I'll break up the tiling even further by adding some noise to the material in the form of Darker patches of the grass I'll go back into the material and then create another texture sample using the T underscore macro variation by cupping and pasting the one I already have next I'll put it in a texture coordinate node and multiply it by a constant which I'll set to a value of 0.005 then I'll make a copy of all that and set the value of the constant on this one to 0.0015 just control the brightness of these textures I'll take the red channel of each and add 0.5 to it and then I'll multiply the results together then I'll stick it all into a comment named macro variation noise now I'll just give myself control over the contrast of the Noise by creating a scalar parameter called noise contrast I'll set the default value to 0.5 and then put this into the a input of alert I'll leave B set to 1 and then I'll take the result of our macro variation noise and plug it into the alpha of the alert now I can add a quick comment neaten things up a little and then multiply the result of our macro variation Noise by everything we already had going into the base color now I can take a look at the result and compare it to our previous work straight away you can see the difference but I'll just match the tint colors to the previous material to get a better comparison and then you can see the effect that the macro variation noise is having more clearly if I change the value of the noise contrast parameter at this stage it's almost impossible to tell that this material is made up of the same tile and texture even with all the variation we've added to the material so far the textures can still look tiled on large environments when you're viewing them in the distance I've created a nice long strip of landscape to illustrate that here to solve this issue we'll make it so that the towing of the material can be changed when it's further away from the camera I'll go back into my material for one final time and then select the micro color micro color variation and micro variation blend groups and put them into a comment which I'll call near then I'll select everything in that comment and copy and paste them below the originals then I'll rename this comment too far now I replace and rename the parameters of everything in the file group so I'll call this far tiling and this one far variation tiling it's also at this stage that I realized that I had forgotten to set the default value of the micro variation tiling so I corrected that now and then I set the far tiling to 0.05 and the fart variation tiling to 0.05 next I went to the micro variation blend in the far comment replace the scalar parameter and named it far variation Alpha tiling and set the default value of this to 0.001 I also change the name of the tint to far tint and far variation tint next I created alert and connected everything for the far part of the material up to it now I just need a way to show the near textures up close the far textures far away and to blend between them smoothly to do that I'll create a pixel depth node and then from that I'll create a subtract node into B of the subtract I'll create a scalar call it far distance and set the default value to 5000. now I'll come out of the subtract and create a divide I'll create a scalar to go into B of the Divide call it far fade amount and then set this value to 7500. now I'll take the result of the divide and create a clump leaving the values at 0 and 1 to make sure that I get black and white values which I can use to drive a loop I'll stick this into a comment and just to show you what this does I'll plug it straight into the base color and then apply the material to the other landscape over here as you can see close to the camera the color is black further away it's white and there is a smooth gradient fading between the two colors black will be where we have our near textures and white will be our far textures let's set it up so back in the material I'll put everything back as it was and then create a new alert then I'll take the result of the lurp from the near group and plug this into a and take the result of the alert from the file group and plug this into B and lastly I'll take the result of the crate gradient far from camera group and plug this into the alpha I'll then take the result of the loop and put this into the B input of the multiply which adds a noise and that's everything I need to do so I'll save the material create an instance and then apply it to the second landscape next I'll just match up the colors for the tint to get a better comparison and then using the material instance I can change the values for a far distance and the far fade amount parameters to get a result that looks like this and that is everything I have to teach you for today I hope you found all of this useful and if you have be an absolute G and give that Thumbs Up Button a thorough spanking if you want to get more from Game Dev Academy then please subscribe and also consider supporting my work on patreon the link for this can be found in the description below the video for my next video I am considering creating a devlog for a PS1 style horror game that I've started making in a small amount of free time that I get let me know if you want to see that video in the comments thanks so much for watching and I'll see you next time
Info
Channel: Game Dev Academy
Views: 167,162
Rating: undefined out of 5
Keywords: unreal engine, blend, seamlessly, landscape, materials, tutorial, ue4, ue5, tiling, repetition, tiled, break up, texture, texture seams, texture repetition, macro variation, micro variation, how to prevent texture tiling, landscape material, texture tiling fix, fix texture tiling, landscape tiling, seamless texture, megascans material
Id: zY8AtjM2Jxg
Channel Id: undefined
Length: 9min 45sec (585 seconds)
Published: Sun May 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.