Design 3D Game Levels From Scratch - Godot 4 Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome back to the channel today we'll be doing a Godot level design tutorial and building this map from the ground up for a game that I'm working on that's similar to Call of Duty zombies we'll be starting off with only a character controller that I made for a different video and I hope to have something here for everyone I'll try to make it as beginner friendly as possible so tag along for the ride so we're starting off with a simple scene with just a player and a CSG box for the ground as the first step let's increase the map size to a hundred by a hundred and then find a ground texture for our game after some Googling I found this nice cartoon texture and plugging it in is only a matter of creating a new material for our ground CSG box and dragging it to the texture setting and the Albedo section right now the texture is stretched to fit the entire box so let's turn on the triplanar setting in uv1 so it's repeating instead that's our ground done and it's time to start weighing the map out with some models for this map would be using the graveyard kit from Kenny assets that he's kind enough to provide for free for everyone to use this pack comes with all of the models in a variety of formats but gotf is by far the easiest to use with Godot let's create a folder for our models in the project and one for the first model we're going to put in the crypt after that we can start dragging the models that we want to use into the project to import them our Crypt is going to be made out of three models from the asset pack and we're going to need to do some setup to combine them into one scene and add a collision shape right click on the Crypt file and choose new inherited scene from the drop down Godot will open up a new 3D scene for us to edit with the model as the root the first thing we're going to do is change the type of the root node to static body 3D so we can add a collision shape later next let's change up the scaling and increase the size of the model and the transform subsection well because by default this thing is Tiny is baby crypt after that save it as a good no scene added to the level and test out how it looks like then we can add a collision shape by selecting the mesh and choosing create single convex Collision sibling from the mesh drop down then add the doorway model to the Crypt flip it scale it position it and oops can't really see anything because the sun angle is weird so let's change it by clicking on these three dots to change the default lighting settings and editing the sun azima we can finish positioning the doorway and let's go through the process of adding the door as well again drag it flip it scale it and then position it with the rest of the models now we can edit the colors of the materials on the models to make them a bit more spooky for this go into the surface material over red subsection on the mesh and add a new material to the material override and the Albedo section will set the color of the mesh to this dark gray we're going to want to go through the same process for the door but to have access to the mesh inside of the scene make sure to right click on it and the scene tree and select the make local option this ensures that we have access to all of the children of the node that we dragged into the bigger scene on the door itself you'll notice that we have two materials that we can override because there's door frame component and a glass component to it and with more complex models that you may like to import the artists will often have even more materials that you can customize on the door glass material we're not only going to change the color but also add some light emission to the material this way it will look like there's a spooky green white coming from inside the crypt after that we'll set the color obedo as well and our Crypt is done let's check it out inside the level I want this crib to be the centerpiece of the level so we'll make a pavement going around it that leads to other parts of the graveyard the asset pack has a road model and will make a Godot scene for it as well not because we want to add a collision shape or anything but because I want to change up the scaling and the color of it when we're happy with how it looks we can start weighing the Road out in this case is going to be a lot of copy pasting and probably more than 100 models of the road inside the level so it's probably a good idea to keep it organized by creating a container node 3D to parent them to after finishing the road do a quick Victory lap around it and let's work on adding some walls around the Crypt here the process is mostly the same except we have a couple of models that we are going to use the same materials for so after we're done creating those materials we can save them in the project folder and then just drag and drop them when we need to use them for a different model and the case with these walls rotating them unfortunately messes up the alignment with the rest of the models so some position fine tuning by hand is necessary now that the wall is complete I think it's time to focus on the other parts of the map for a bit for the purposes of the tutorial a lot of the work I'll be doing here like adding Collision shapes and materials is going to be redundant so I'll be skipping over Parts where I don't have anything new to add the Collision shapes on these graves are interesting though because we usually want a simple shape to improve performance and we just use a single convex Collision sibling created from the mesh or even better just use a shape primitive like I did in the case of these fences if we do that for this grave though we run into a problem where the tiny rocks on the outside completely mess up our Collision shape so it's probably wise to create a full tri-mash Collision sibling and sacrifice a little bit of performance so that our character is not walking on air another problem we run into with this Collision shape is that our character can't really walk up the side of the Grave because the angle is too steep now if you don't let the player abuse this in other places the solution is pretty simple just go to the player's character body settings and in the force up section raise the angle setting to 60. this will increase how steep of an incline our character can climb so I'm sure you can see the potential for breaking some games here but since there are no Hills on this map it shouldn't be an issue Next Step was to get a small fence around these Graves and like I said I opted to use just a plain old rectangle for these Collision shapes since an auto-generated Collision shape would be unnecessarily complex I was still a little bit on the fence about adding a fence in the first way since this map is for a cod zombie style game and I didn't want to restrict the player movement too much but eventually I figured adding a bunch of gaps would solve the movement problem and keep the intent to design and tact now that the right side of the map is done I'm about to import some level design wisdom on you don't do something twice when you can do it once we're going to skip the next little bit of weighing out the map since the process is mostly the same but after that it's time to work on the lighting for the map we start off by adding some light posts and on the material where the white should be we again add some white emission next we're going to add the moon if you add a directional white in the scene delete it so you have full access to this menu and and we're going to approximately align the light source to where we want our moon to be then create a new CSG sphere and make it huge maybe not that huge align it so it's blocking the light source from the perspective of the map so it kind of looks like that's what's emitting the white A good rule of thumb here is to just have its shadow be right in the middle of the map and don't worry about it we're not keeping it there turn on the white emission on the material of the Moon and then in the geometry subsection turn off the cast Shadow property for the moon CSG sphere now add back the world environment and directional white nodes and go into the environment settings here we're going to add volumetric fog and set its Albedo to this nice soft red color then turn on the image into a similar color to fix some of the dark areas that the fog creates this might be a little bit too much so we're going to make the fog density lower and also make it a little bit darker this is looking good but I don't like how the reflected white on the ground as plain white so we're going to change it to have a white blue tint which will complement the red fog nicely when that's done let's add a wall around the graveyard we can use the same models we used for the Crypt to cover up the fact that this is not a big procedurally generated world with trillions of planets we are also going to add a wall of trees around that I'm going to save you from the 12 years of footage of me copy pasting trees but here's the final result there are only two models of trees in the acid pack but I think varying the size of the tree objects sells the idea that there is a bit more variety there after that let's finish up wasting decorations around the level with a couple of benches here and there the obligatory carved pumpkins and some rocks we are also going to add trees inside the fence these are actually different objects from the outside trees because they also get Collision shapes and the outside ones don't like I said there's only two tree models and one way to add variety and to make it seem like there is more is to vary the rotations and scales of these trees so that's what we did the last thing I want to do for this while level is to add some grass although Godot four addons are pretty scarce at the moment thankfully there's one for it so we're going to go into the asset Library download it install it and then go into the plugins section and project settings and make sure that it's turned on then when we go to create a new node in the level there is an option for simple grass textured we're going to plop down a bit of grass and then mess around with its Albedo and with the materials of our trees to make sure that they match each other nicely and let's take a look at the tools that come with this add Dawn from left to right first we have our brush size setting the second one is how many grass objects are spawned with each click of the brush and finally we have the scale of the grass objects respawning let's start weighing it out just like with the trees we want to vary the scale of grass in different places so naturally our grass will be taller around decorations an issue that I ran into was that the big Collision shapes on the lampposts were messing with the grass terrain snapping so I made nature to turn off the Collision on them before I place the grass around after that I lowered the scale of the grass and went around with the brush adding it in general areas one thing to keep in mind here is that it doesn't have to be uniform and it doesn't even have to cover all of the map real grass doesn't grow the same everywhere I went around the big objects that I missed with taller grass again and then lowered the scale even more than before and went around with a smaller brush to add some detail around tighter areas and with that our level is done if the video was useful please consider leaving a like because it helps a lot and if you're interested in having a character controller like the one I have in this game check out my tutorial on it the next step here is adding some enemies for the zombie game so if I'd already finished that by the time you're watching it's going to be here as well link to the GitHub project for this is in the description thank you for watching and I'll see you next time
Info
Channel: LegionGames
Views: 101,542
Rating: undefined out of 5
Keywords: Godot, Godot 4, First-Person, Godot tutorial, Godot 3d Tutorial, Legion Games, adventure game, first person game, platforming game, Godot FPS, FPS, game development, godot engine, survival game, horror game, Godot 3d, zombie game, materials, terrain, collision shape, map design, level design, Godot lighting, Godot Fog, grass, outside level, level editing, environment, gamedev, world building, Godot 4.1.3
Id: dV6S_11pyzo
Channel Id: undefined
Length: 11min 3sec (663 seconds)
Published: Sun Jun 04 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.