In this README you will learn how to create tactical maps in Blender and how to import them into Godot Engine. This project include a simple autodetection system which will allow you into create maps as fast as posible, but make sure to follow each step of this guide.
- Blender
- Little bit of Blender Experience
- Godot Blender Exporter
First of all let's create a new blender project an remove all the objects with "A", then "X".
Now, lets create a new cube with "Shift+A" and select Mesh > Cube.
From edit mode (hit "Tab key") use "S" to activate scale mode. Click anywhere to cancel and manually set the size from the menu.
In my case will go for a simple 5x5 grid
Lets switch to "Face select" from the menu above
And lets move to the bottom view by clicking the -Z axis at the top right corner
Select the bottom face and then "X" to remove it
You will now have an empy mesh
Create a grid by adding some cuts with "Ctrl+R".
As I crated a 5x5 map I must add 4 cuts on each side of the mesh in order to mantain the ratio
Now you will be able to modify your map and even add some textures to it
Go to the top view by using the Z axis in the top right corner
And select all "visible" faces from the top view
As you can see those are the surface and walkeable tiles for the in game characters
Hit "Shift+D" in order to duplicate, you should be able to move the surface of the mesh but don't do it, this is just an example of what you should see.
Now use "P" and select Selection to separate the "walkeable tiles" from the mesh
As you can se we now have two objects "Cube" and "Cube.001"
Lets rename them as "Terrain" and "Tile"
I will also hide Terrain cause I will not be using it for a while
Select Tile and switch into Edit mode
Go to Mesh > Split > Face by edges
By doing this each tile will be isolated from the rest
Use "P" again to separete by "Loose parts"
Now each tile will be an independent object
From object mode, select all tiles. Then go to Object > Set Origin > Origin to geometry
Now each tile is independent and has its own origin
Select all tiles, hit "Ctrl+A" and select Scale the enter to confirm. This will do nothing apparently, but will reset each tile into a 1x1 size insted the 5x5 that we set in first place.
You can check those values in the expanding the right menu
Go to the UV editing map and select all tiles, then "U" to unwrap.
Make sure all the tiles are visible into the left side viewport
Go to UV > Reset in order to reset their UV projections
Make sure every tile is using the full size of the UV space
Save the blender escene into the root of your project
Duplicate the "test_arena" template
Start moving all the tiles inside the "Tiles" spatial node. First I suggest to remove old tiles
And then copy and paste from the exported scene into the new one
Do the same with the terrain mesh
Make sure to move down the terrain mesh (but just a little)
Lets now duplicate the "test_level" template
And replace the Arena node for the new one that we already configured
Make sure to add and adjust as many characters as you need
Now you are able to delete the exported .escn from your project and close its viewport tab