Blender Bake Textures for EEVEE, Unity or Unreal [Material Displacement in EEVEE]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
there are several advantages in using baked textures over procedural textures procedural textures do give more flexibility especially afterwards if you want weak stuff however baked textures have a lighter cpu load and can be imported within blender or used within eevee and give you displacement within eevee or you can actually import them within game engines such as unity or unreal or 3d websites such as sketchpath now baking is actually really not that hard so let's get started and let's get into it in this video we'll be using this amazing roof style texture by benjamin roman he's very talented and this is a amazing procedural material and we will be converting it to actually baked textures now the process is very very simple i am currently within cycles and i have my material over here with the displacement enabled we want to start baking these materials now first of all what we need to do is we need to open up a workspace where we can actually do this so i have the shading workspace open and this is the actual node tree now if we go over here and we add in a image texture node we can just place it anywhere don't plug it in just leave it there now hit new and let's create a new image or texture i'm going to call this texture bake and i'm going to give it a resolution for a 4k texture textures come in 10 24 increments so basically meaning a 1k texture is 10 24 pixels by 10 24 pixels and a 4k texture is four times with that so just type in the actual value times four and hit ok and you should be good to go now we have a 4k texture called bake and we have our object over here if we now hit big we will get a strange result which will not be very good for a tolerable texture and if we hop on over to the uv editing workspace i'll show you why that is so this is our uv sphere and if we go over to the uvs over here so the actual unwrap for this sphere you will see it has all of these triangles now these triangles are basically the top and bottom parts of our uv sphere and they will create triangles within our texture which is definitely not something that you want or a square entitleable texture so instead let's go ahead and disable our object over here and let's just add in a new object in this case a plane we are going to do nothing with it but if i go into edit mode over here you will see that the entire plane consists out of one face which is completely failing our uv workspace head on over back to shading and with our plane selected let's open up the image editor since we have our plane selected let's add in our material to this plane so the procedural roof tiles which we already added to the uv sphere here and it still has this big node in there if we now select this bake node and we have our plane selected we can go up here and open up the baked texture now let me zoom out a little bit and you will see that the baked texture currently is just a black square because we haven't baked anything to it yet again with the plane selected and with the actual node selected let's hop on over here and let's go to the render properties and down to the big menu now the bake menu is only available when you are in cycles so make sure you are if we have a look at our material you can see it has several inputs it has the base color roughness a normal and a displacement input so that means we need to bake four maps for this texture first of all let's bake our base color now within the i don't know how do you call it like the material world that's weird i'm not madonna okay so within the texture workflow base color is usually called the diffuse color so we want to bake the diffuse type so set the bake type to diffuse and now you will see it has these three contributions direct indirect in color direct and indirect basically mean direct and indirect light so the lamps within our scene will also have an effect on our texture and that's definitely not something that we want so let's disable both these two and now with just the color enabled we can hit bake all right so after taking a bit to render we now have a nice square texture of our material we can zoom in and it it has a decent resolution it's a 4k resolution and this is the color map so you will see this asterisk next to this image over here and if you click it this basically means that it hasn't been saved yet so hit save as choose a save location i have already exported mine over here um but just give it a proper name something to do with base color so you know what it is alright so that's the diffuse color now next up is the roughness if we now change the bake type from diffuse to roughness and hit bake again we can now bake our roughness map alright so there's our roughness map nice and detailed if you check it out up close and next we want to bake are normal so that's our third so let's change this to the normal and let's hit bake again all right so there's our normal map third and finally we need to bake our displacement but if we click here you will see there is no actual height or displacement option so somehow you are not able to bake the displacement output now there's actually a very easy workaround for this and that's because we have this height output over here so if i preview this displacement map and i go back into the 3d viewport over here this is the plane we are working with you can see the output for our displacement here now this is not what we want because displacement or a height map needs to be a black and white map so if we take this and we actually instead use this height input over here and not the displacement map input you will see we now have a perfect black and white map black representing the things going inward and white representing the values going outward so we can actually use just the height output here but we can't render this viewer node so instead let's just remove it and re-enable our principal bsdf here and instead of using the base color so this value over here we are going to remove it and we are going to take the actual height here and plug that into the base color alright so we now have the height in the base color again we need to bake the base color so the diffuse and we want to disable direct and indirect again let's make sure our node in here is selected and our plane is also still selected and let's hit bake alright so that was very quick actually and we now have a perfect height map so let's go ahead and make sure we save this one as well just like we did with all the other ones and we have now a complete texture pack with four textures to complete our material alright so this is our cycles material still looking mighty fine hide it for now add in a new uv sphere here which i'm going to select and i'm going to add in a new material as well which i'm going to call roof tile pictures all right so let's open up a new window here and set this to the shader editor and with our principled psdf selected let's hit ctrl shift t now this is a node wrangler add-on function so make sure you go into preferences into add-ons look up the node wrangler add-on and make sure you have that enabled now let's open up our texture map where we saved all of our textures select all of them and hit principled texture setup now there you go this is starting to work our material is just not showing any displacement and that's because we need to enable it so let's go down here into the displacement and change it from bump only to displacement and bump now it will be a tad strong so let's make sure to set the skill here to 0.2 and we're good to go so basically what we have now is we have two of the same materials one being fully procedural so that's this one and the other one being the texture version so everything is working as it should however if we still hop over to eevee you will see we still get no displacement and there's actually a very easy fix for this if you go over to the modifiers tab and we add in a displaced modifier we can now click on the new icon here click on these two bars over there and hit open we can now select our high texture and we should be getting something okay so there is some displacement going on now let's go over to our modifiers again now let's change our coordinate system from local to uv and we should be getting the proper displacement again now let's change the strength to 0.2 again and there you go now we have it again and everything should look nice and there you have it the material works perfectly within eevee due to us baking the textures so i hope you learned something and if you did then please leave a like and subscribe i want to thank you for watching this video and see you in the next one thanks to the following patrons for supporting the channel [Music]
Info
Channel: Kaizen
Views: 38,468
Rating: undefined out of 5
Keywords: blender material displacement, blender material displacement not working, eevee displacement, blender eevee displacement map, blender displacement map, blender bake textures, blender export texture, blender export textures as png, eevee material displacement, blender eevee materials, blender import texture, material displacement blender, how to get displacement eevee, blender eevee displacement and bump
Id: G5soIHt7ofU
Channel Id: undefined
Length: 8min 24sec (504 seconds)
Published: Thu Mar 10 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.