Logo 3.5Cats_AndHalfAFish

3.5Cats_AndHalfAFish

Blockout in Blender.

March 12, 2020 Shade, Godot : importing models, Blender : basic modeling
About trying to create something that somewhat resembles a castle ...

Note : Godot 3.2, Blender 2.82.
 

So, as I mentioned in my previous blog post, I have now upped the version of my game to v0.2. In this phase, it's all about blocking out the environment in Blender and getting the models imported into Godot.

I have spent some time watching basic Blender 2.8 tutorials on YouTube (see list at the end of this post), which I found incredibly draining.
I've always had a bit of trouble with 'comprehensive listening', but I've noticed that the older I get, the more energy it seems to require of me. And yes, that also includes face to face interactions with people.
So. There ... A little bit of a peek into my life on the spectrum ... =)

The plan

'Blocking out' a game environment means creating a (in my case : very) rough sketch of the world in 3d. It's a good idea to build everything relative to the size of the player character and have him run around in the blocked out world to see what works and what doesn't.

Player character in mockup scene.
Meet the player character.

Once you're happy with the 'sketch', you can start replacing blocks by more accurate models. This is an iterative process, meaning you will probably need to do this several times.

Sketch of castle on a hill.
Sketch of castle on a hill.

Blender

The header of the 'games' section on my website has never felt more true than now :

Help ! I don't know what I'm doing ...

I really have no clue what I'm doing here ... So, some of you will undoubtedly be in for some serious face-palming ... =)


First question I had is if walls should overlap or not when you place them in your scene.
I remember Unity devs posting (some time ago) about problems with light leaking through in their scenes, and the trouble they had to go through to fix it.
I also know that z-fighting (caused by overlapping faces) is a baaaaad thing.
So. Dilemma !

After watching some Curtis Holt vids (see below) on creating modular pieces, I decided to go for the non-overlapping placement.
His tutorials taught me another important point : always work on the grid !
You cannot believe how much quicker you can place pieces (walls etc) when you set their origin on a grid point and make their geometry a multiple of the grid units. Don't forget to turn on 'snap' as well.

Blender : working on the grid.


Another thing I picked up from him is that you should -always- 'apply rotation and scale' (ctrl + a) to your pieces when you are done modeling them and before you do anything else (texturing, exporting, etc).
This will set the rotation and scale properties of the model to 0 and 1 respectively, and prevent all sorts of weird problems later.

If you get an error message saying something like 'cannot apply - multi user object', it means that the vertex data is used by other objects as well (for instance when you use 'alt + d' to duplicate something).
You can fix this by going to the 'object data properties' button, and press 'users' to make it single-user before applying rotation and scale again.

Blender : resetting scale and rotation. Blender : solving 'multi user' problem.
Applying rotation and scale.

Also, if you want to duplicate a model in your scene (as I did with the plane in the above image), it's better to use 'alt + d' (and not 'shift + d').
'Alt + d' reuses the vertex data, while 'shift + d' makes a copy. The second option will always create a larger blend file size.


Blender : getting to the user preferences. When I'm using Blender nowadays, I almost always have the user preferences key bindings tab open. I find it useful to look up shortcut keys for operations I use a lot.

Two things I do quite often, is trying to get a better look at a piece in the 3d view or in the scene outliner. I have assigned the shortcut '.' to both, which makes it easy to remember.
Just make sure the mouse is over either the viewport or the outliner when you use this shortcut !

Blender : shortcuts.


Another useful thing I discovered, is that the outliner can be used to search for models with a particular material (for instance if you want to replace that material with something else but you can't remember which models are using it).
Just type the name of the material in the search box :

Blender : outliner search box.


The outliner can also be used to rename models in batch :

Blender : batch rename in outliner. Blender : batch rename panel.


I know I already talked about importing models into Godot, but somehow I completely missed this issue ...
If you want to export only some selected models from a large scene, using the eye icon in the scene outliner (hide in viewport) followed by 'select all' ('a' shortcut) will not work ! You need to use the tickbox (exclude from view layer) instead !

Blender : selecting objects to export.


Another thing I mentioned before, but forgot all about again :
if your model is looking grey in Godot, it probably means the material created in Blender isn't using nodes. Remember that the glTF2.0 exporter expects PBR materials !

Godot engine : wrong material !

If your materials are really simple, you can still create them in almost the same way as before. It's enough to pick a base color, and set metallic, specular, and roughness. Just make sure the 'use nodes' button is blue (active).

Blender : creating simple node materials.

And after a reimport :

Godot engine : castle indoors with node materials.

Much better !

Now let's continu blocking out the inside of the castle ...
(Wish me luck !)

List of Blender 2.8 tutorials.

  • Blender :
    The 'Blender Fundamentals 2.8' playlist gives an overview of how to use Blender 2.8. The very basics, but definitely required knowledge.
  • Curtis Holt :
    I watched most of the 'Blender' playlist, and also the 'Building a sci-fi corridor' playlist. Very inspirational + great info on how to build modular pieces.
  • CG Boost :
    Zach's 'Blender 2.8 beginner tutorial' playlist is one of the very best tutorials I've come across so far. Even if apples do not excite you, watch his tutorial series. I guarantee you will not regret it !