Import 3D Models From Blender into Godot - Godot Quick Tips

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

I'm gonna link this from now on everytime someone asks how to import from Blender.

Everything I want covered in a video, minus animations (I suppose they are not relevant for everyone looking into this).

👍︎︎ 5 👤︎︎ u/MrMinimal 📅︎︎ May 04 2020 🗫︎ replies
Captions
what's going on guys Tom here and in today's video I'm gonna be teaching you how to import your 3d models from blender into the Godot engine so let's get started ok so you can see I've got blender open here and I've opened up one of my 3d models from the Ludum dare project and we're gonna get this employed into the Gorda engine the first thing I'm gonna do is I'm going to come up to the file menu I'm gonna go down to export and a lot of tutorials out there would have you choose the Colada format the dot Dae format that is still fine however the gada engine now recommends the gltf 2.0 as the format of choice gltf 2.0 is kind of like the successor to colada it's built by the same sort of group as far as I'm aware it supposed to be an open format like colada was however colada had a few issues and gltf 2.0 is trying to fix a lot of those things so gltf 2.0 is the way that we're going to be exporting our model today so we'll click on gltf 2.0 on the right hand side you've got a bunch of options for how you want to export this now if we expand include you can see that we have a selected objects checkbox here if we were to select that if I just move this out of the way slightly the only thing that would get exported is the top of the turret here and that's because we have it actually selected you can see that we don't have the body selected however if we just leave that as default which is unselected then this will explore everything in your blender scene so we're going to leave it like that because we want both the head and the body what I'm going to do is I'm going to export it here into my 3d assets folder you can see I've already done this here but I'm just going to do again so export gltf 2.0 and that's it done so that is exploited now as a gltf file we're going to minimize blender we're going to open up Godot and we're going to create a brand new project here so I'm just gonna create this in my code with tomm folder I'm gonna call it 3d looks 3d playground great folder create inhibit okay so let's create a 3d scene and what we're going to do now is we're going to open up our file browser and we're going to browse to where we saved that turret file and you can see I have it here Torito GLB I'm just going to drag that in to my file system over in the border engine and you'll see instantly here that we now have the turret glb file but we also have a pallet underscore 0 or 1 material now the reason we have this if I just quickly jump back to blender is that you can see we have this texture here and it's assigned to this object in the material panel of blender itself and I've called it pallet underscore 0 1 so good I successfully recognized that there's a texture assigned to this model and it's imported that as well which is fantastic so what we could do is we could simply drag the turret jlb file into the scene and you can see here we have a turret it's its own scene and that is fully textured it's ready to go however this isn't the best approach what we do want to do if we just delete that node is double click on the turret dodgey lb file and it will say that this was automatically imported and can't be modified so if we want to make changes to this model we have to create a new inherited scene so we're going to click on new inherited button and what that will do you'll see that we're in a new scene now it's unsaved we have turret as the top level and you can see that inside it we have the turret body and the turret head two separate pieces and we can move them about individually and this is great because now what we could do is we could go over to the turret head and we could rotate it and we can add scripts to this or particle effects or any other nodes that we want into this scene just like we would as normal so if we just save this as turret TSCA close this seam and then instead of dragging the GLB file in we're going to drag in the scene file now we have our 3d model important into the scene as its own scene that's completely customizable which is fantastic so if I just move this out of the way I'm gonna show you one more thing that you can do here so as you saw before this turret is in two pieces with got the head and the body now if I wanted to import this from blender into gold or as two completely separate meshes rather than this one scene that we inherit from with the locked pieces together what we can do is if we click on turret at G lb file we come up to the import tab you'll see here that we have a bunch of options here for how we want to import this mesh if we click on the preset tab you then have further options which are presets of all of these configuration options for different purposes if you come down to the import with separate objects and click on that and then press rien port you'll see that that popped up there it reemployed the file and if we look down in our file system we now have two separate mesh files we have a turret body mesh and a turret head mesh so if I drag this into the sea you'll see again it's fully textured it's ready to go let's just drag that out of there and again the head one if we drag that in again fully textured ready to go and now they are two completely separate meshes the other benefits are doing it this way is that these pieces are actually just mesh instances rather than a whole scene with the two pieces locked together so you can do whatever you want with this now this is a great option if you want to have a blender file that has a bunch of different environmental props all with their own materials and actually you just want to import them as completely separate meshes so that you can dock them around your scene as you want now you'll notice here that these two meshes are now no longer aligned because I've just dragged them into the scene however if we come up to the turret body we go into the transform and we reset it by clicking the little reset icon there do the same thing for the head transform reset you'll see that they've reset to the exact position that they should be in just like this one over here and the reason for that is that in blender itself we have our origin point set to the base of the turret here and that's the same whether or not we have the base of the turret or the head of the turret the origin point is the exact same now that might not be the case for you if you find that you're importing your pieces into Godot and they're actually misaligned or rotate is funny or they're scaled incorrectly and what you can do is in blender itself if you press a to select everything then you press ctrl-a we'll get this apply pop up here what you want to make sure you do is press apply all transforms and then save that and then reacts port the file and that will ensure that all of the transforms that you've done or rotations or scaling is applied to the model itself and that will then come across into go down and that's it for today's tutorial I've showed you a really quick way to import your blender models into the gota engine and I've also showed you how to import them as completely separate meshes which is really useful if you have multiple props in a single blender file if you enjoyed this video please click on that subscribe button and hit the notification bell I released new content every single Monday so make sure you don't miss out if you'd like to support this channel I also have a patreon the link for that is in the description below as always thank you so much for watching I'll see you guys in the next video [Music] [Music]
Info
Channel: Code with Tom
Views: 29,095
Rating: undefined out of 5
Keywords: Blender to Godot, Import 3D models from Blender to Godot, Import from blender in godot, 3d models in godot, blender export to godot, blender gltf 2.0, blender gltf, godot gltf, godot gltf 2.0, godot gltf 2, blender gltf 2, godot import model, godot import 3d, godot 3d models, godot texture models, godot import material, godot import texture
Id: Q-G8evhxHmc
Channel Id: undefined
Length: 7min 54sec (474 seconds)
Published: Mon May 04 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.