Godot: Tips to set up AUTOTILE BITMASK for unique subtile sizes

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right welcome back so you want to be able to make your uh tile set have an offset subtile size and unique subtile size so that you can place a tile here and have it show both the bottom and the top of a wall or cliff or something um let's see i made a little uh test scene so that we can work on it together let's go here's the base test base set and it has the normal typical collision shapes a bit mask right not collision shape the bit mask and the biggest key when making a bit mask is to remember that the center is where you want to check to make sure that the tile will be placed in a auto tile or is placeable and choosable when you disable the auto tile otherwise it's not going to be able to be used so in this top corner we know that the outside of these there's not going to be a tile in any of these areas so i'm not going to place a bit mask on the outside part of those but the inner corners is going to have a tile every time so we'll fill in those all the way that's the basis of how it works let's go to uh one that's a little bit easier to see um let's make this 64. the only reason the step has nothing to do with placing the tiles or the bit mask the subtile size is what your size is going to be for fitting your tiles into an irregular shape to make the height basically 64 is the boundaries from the top of the subtile to the bottom of the subtile um and the step that's just for like when you want to make collision shapes if you make a collision shape here and you set the step to 32 by 32 you'll be able to move these and it'll step to the um the boundaries here if you have snap to grid on so let's get rid of that really quick and go back to the bit mask all right so we want to know how do we set up the bit mask remember the key the key is to find the center it's like a tai chi right you got to find your center okay so let's start with this easy one i found the center now i think are there gonna be tiles around it no so i don't have to put any around it let's do this one are there gonna be any tiles around the bottom or left uh right edges no are there gonna be any tiles on the top right or or left corners no but there is going to be one about directly above it okay so that one's done what about this one well if i find the center i know there's going to be one above it and below it that one's done now this one you might be tempted to put it up at the top because that's where you're walking again we want to find the center and then there's only we're only going to be going down from that there's only really tiles below it so we know okay great that one's done all right center center center oh connect great center whoops center center this one's here we get confused again because the top part is where you want to walk you might be like oh perfect it's done but that's wrong because these tiles won't be rendered there won't be used by the auto tile kudos saying i don't see those as tiles because we haven't checked the center we've got to find the center then we can connect here connect here connect here and we know all the rest of this is going to be filled in cool then we can get to these irregular shaped ones and personally i like to set it up this way so i can just do an outside bounding box but i'm not going to do that for this one actually i'll do that really quick i i do it this way and then i know the left side of the inner ones is just going to be two filled in two and then the right side is going to be filled in two and then the top of the top is filled into and the bottom of the bottom is filled in two and that one's done but i don't want to do it that way because your your assets your art might not be set up in the same way and the key is to find the center so i found the center and then i'm going to look at the top of the texture where the walkable part is and if you're looking down here you might yours might have something filled in here but i made my transparent so that when there is overlap if there was something transparent in the tiles in front of it there wouldn't be weird shapes so let's zoom in a little bit in fact i'll make this bigger zoom in one more time there oops there we go all right so find the center it's not going to have anything on the outer edges and it's not going to have anything in the corner the tile directly diagonal from it on the bottom but it is going to have one on the top and the bottom and to the left so that one's done let's look at the top here it's going to go straight across and down and to the left so find the center and then i can go straight across and down into the left find the center straight across down to the right uh down and to the left okay that row is done let's look at let's look at this one okay i'm tempted to do this because that's where it's going to start and then i think oh that one's done but that's going to create some really weird stuff and it's not going to connect to anything so we have to find the center first remember center then i can draw the t all right great there we go center um oh this one's going to have tiles on top of it too and down cool that one's done okay center it's strange because it's on top of the wall part but it's the center of the tile so it's going to connect there we go that one's done let's do these ones down here where do we start in the center then we can find oh that super easy center oh look that one's done that one's done and that one's done cool now i can just connect them all and if you run into issues um you just have to the the best thing to do is have another one set up the exact same way and then this is the biggest tip copy it make sure that they're all of the things are set up the same way and then all you have to do is paste it in but i'm not going to do that because i want to show you the rest of this so these are the zigzag ones and if you look at the top this is the part where the character is going to be walking this is the wall but it's going to be behind another tile that has a wall so let's find the center the corner here is going to be open and this corner up here is going to be open so open open perfect just project the top here to the whole thing there we go open open that one's done these ones are the whoops so yeah i thought that was the center but it wasn't um the cross ones just like this cross one here start in the center and it goes up and sideways and that one's done this one's across it goes up and sideways and then the center is also open up and sideways center up and sideways center up and sideways center cool so that one's done just double check oh i forgot let's do these and i hesitated on this because this one shows that there's a thing there but this subtile here needs to have both of them connected right if it was just this we wouldn't it wouldn't connect to anything there we go there we go and that is done i want to do it for this one because it's a taller one and it's a lot more confusing because it stretches a lot more and so i know the step for this one is 107. i think yes 107. and the texture height is 64. so that when you place when you place this tile down it will uh be 64. it it will make this part the bottom instead of drawing it from the top okay here we go let's zoom in just a tad all right remember the key find the center i know that this one it's going to have tiles all the way around it so i'll just fill that one in find the center this one is going to have tiles to the top bottom diagonals top and bottom and directly to the right so all of those are filled in and if we find the center for all of those for all of these oh right they're only going to be walking on the edges here so i can connect all of these and i know that's solid this one's confusing right because you think i want to walk all the way here again find the center that's all i can say then you know super easy what i did over here is i made these just one and they are mirrors they're the same tile as this except it's filled in here so that when this tile is on top of another one it's there's going to be a space here an empty space here but this one just fills that in and you'll see when i draw them in um okay so let's do let's do the t's because those ones are confusing so this one it's going to be open on all the whole bottom all the tiles below it and to the sides are open so let's draw the center and then only one on the top so the sides are open and all the bottoms are open this one the there's not going to have any tiles below it but it's going to have tiles to the neck to the sides of it and above it okay so above and to the sides that's the t oh let me finish those two and looks like this is done where's that cross one okay let's look at the cross one okay so we're gonna be walking side to side and up and down but not diagonals so we got the cross cool let's go um use them a little bit all right so we have the the base one that's 32 by 32 this is 32 by 64. and then here is the the taller one and here you can see how the texture fades in there and it so that's why i disable it and i have those set up the way that i did so i can just do this fill them in really quickly and yeah notice how see how the orange square at the base of the texture is at the base of the texture if i didn't have that um inspector if i didn't have it set up so that the oh it's here texture was negative 64 for a texture offset it would be zero let's say it's zero right then when i go to draw them see how now the orange square is at the top of it and that's not what we want makes it confusing so that's why if you know how high your uh cliff is like this um mine is 75 but because uh there is a little bit because it's 75 and the well if we go to it you can see in the let me zoom in you can see from from the edge of the cliff to this cell there's extra 12 pixels or whatever here well that creates an issue with the height set that i have set up so uh i'm not doing it that way so i made it 64 instead and um that places them directly at the the base of this let me go inspector tile set change it back to negative 64. oh it is okay cool now now they're back at the bottom now it's at the top see if i undo and redo it it just shows you that the texture gets offset that way um but because i want to draw the platform um things so the areas where the platform will be so it tells the player hey you're at this height at the base of the the shapes i make the texture offset also be whatever the height is so that's how you uh that's how you get to draw your own textures like this and have them have different heights let me know if you have any questions if that makes sense
Info
Channel: sco_otr
Views: 1,676
Rating: undefined out of 5
Keywords:
Id: QBrgrIbjXnE
Channel Id: undefined
Length: 17min 25sec (1045 seconds)
Published: Mon Nov 02 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.