How to EXPORT MATERIALS from Blender to Unity 2023 (Updated)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
today I'm going to show you how I get my 3D models from blender into Unity also welcome to the channel I'm a game developer and artist and I love making content all around game development so if that's your thing I hope to see you around if you've ever tried to export a model from blender to Unity you know that getting models into your Unity project can be very challenging and this is because Unity does not understand blender's built-in node system but it understands some of it which can be extremely confusing when you're exporting your assets so you can create these awesome models with cool effects and materials when you export them it doesn't translate the same I'm currently making a game where you get to go and hunt for mushrooms so I need a lot of different types of models with unique colors and textures in my game as you can see I've completed a couple but I'm going to show you how to do this on my new purple mushroom model I already have all of my materials created for this model and as you can see there's a lot of gradient color effects that I'm using here because this mushroom is multi-colored but there's just one issue and that's that I'm using blender's built-in node system to make these colors and it's purely for use inside of blender if I were to export this right now none of my colors would show up correctly if at all the only thing that Unity understands inside of blender is the principled bdsf node right here and the material output node if you just have a really simple material where only that is needed you can export it and it will work inside of unity say you just need a flat white a flat red something of that nature but most of the time you're probably going to want models that have a bit more detail and interest so what we have to do is essentially translate this into something that Unity understands to start off we need to unwrap the different parts of our model for this model we have the cap the stem and the gills which will have slightly different colorations we'll have to repeat this process for each part of the model but let's start off with the cap so first off we're going to go into our UV editing Tab and in the layout tab if we tab into edit mode and hit a we can select the entire mesh now in our UV editing tab if we hit U and select smart UV project this will unwrap our mesh and prepare it for what we're about to do next most people will add some Martins here but since my models are pretty simple I actually haven't run into any issues with not adding them in now with our cap unwrapped we can proceed to the next part where we will be converting our materials from blender's node system and baking it into an image that Unity can read with the unwrapping that we just did we've just told blender how the image is going to wrap around the object so now we just need to create the actual image to do this we're going to need to create an image texture by clicking shift a and then searching for image texture we're going to select new and create a new file and name it appropriately in my case amethyst cap next we need to set up our settings to bake the image onto this texture if we go into our render settings on the right hand side which is the second one from the top we need to make sure that we have a few things in place first off you're going to want your render engine to be cycles and then you can adjust your sampling numbers as you please I'm keeping the default on the viewport samples but changing the render Max samples to 300 the general rule here is as low as possible without sacrificing quality 300 is still probably way too high for my model but it just affects how long it's going to take your machine to render and I have a very powerful machine so I can kind of get away with that going down to Performance Auto detect is fine it just means that blender will pick up on how many cores your CPU has going into bake settings we want to change combined to diffuse and uncheck direct and indirect lighting since we only care about color here and then with our mesh and our image texture selected we're going to hit bake and as soon as it's done we can see what that image looks like over on the left hand side now all we've done is bake an image texture but that's not what's appearing on our model currently so to see what this is going to look like in unity we're going to have to attach our new image texture that we just created to a principled bdsf node and a material output node I like to just copy and paste what we already have and hook it up and if it looks the exact same and we're good to go make sure we're looking at the right material we just need to select the material output node and that's the material that we are currently viewing now that we've set that up we can actually delete the other set of nodes since we don't want to confuse Unity when we export this very very important call out here you have to go in and save this image to your device it's very hidden in the UI so it's easily missed but your models will not work without doing this the cap done I'm going to repeat this process for the stem and the gills and while I'm just working with some simple materials here if you want a more in-depth tutorial on how to make this process more efficient and add in normal maps in more detail drop a comment below and I'd be happy to make one with all of that set up we can now export our model as an fbx I'm going to keep most of the default settings here which is going to import everything into my scene but I really don't mind cleaning it up in unity now in unity I'm going to create a new folder for my mushroom just so it's organized then I'm going to drop in my new fbx model and I still have a little cleaning up to do so I'm going to delete everything that's unnecessary but since I'm bringing this model in from my project window Unity automatically recognizes it as a prefab so I'm going to unpack it so I can edit it and even though it's looking a little gray at first as soon as I start dragging over my image textures Unity already knows how to map these images and that friends is my process for getting my blender models into unity and if you got value out of this content consider subscribing but until then I'll see you in the next video
Info
Channel: Rigor Mortis Tortoise
Views: 113,760
Rating: undefined out of 5
Keywords: export blender to unity, blender to unity, unity, blender, fbx import unity, blend file unity, how to import blender into unity, blender export fbx with texture, fbx export, blender export texture, blender unity
Id: yloupOUjMOA
Channel Id: undefined
Length: 6min 8sec (368 seconds)
Published: Sat Apr 01 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.