September 21, 2020Shade, Godot : update, Blender stuff, other devs
Roughing out the inside of the castle.
Note : Godot 3.2.1, Blender 2.83, Gimp 2.10.18.
It's been a month since the last blog post. Time for another update, me thinks.
Let's start by saying that my productivity has been low.
I blame The World.
It has gone Utterly Mad.
But. This is supposed to be about gamedev.
Let's start with some fun stuff.
I've been watching Twitch from time to time, and more specifically 2 Godot streamers
(that I found through other channels ; I find it simply impossible to find -anything- on Twitch) :
They both obviously know a lot more about game development than I do, so I watch them
in the hope of picking up something here and there.
Just a couple of days ago, I also found Rob Lang on YouTube. He's developing a game called
'Clomper' in Unity. I just can't wrap my head around how good he is and how fast his game is coming along ...
Some people might think it a waste of time, to watch other people work on their game while you could be working on your own
game. But I have found that if you're not part of a gamedev community, it's sometimes hard to see things in
perspective. Let me give you an example.
I often berate myself for being so slow (read : being stupid trying to do this at my age with
no proper training or support). But then, I watched ValiantCheese spend 8 hours doing some simple animations
(they looked great, by the way) for his (already rigged) Queen Bee ... because he didn't have much experience with
animations in Blender. And he seemed perfectly fine with that. 🙂
As for my own work ... I have just finished fase 0.2 (sort of), which
was loosely defined as creating a very rough version of the castle's inside, based on my initial mockup of the outside.
And when I say 'rough, I mean 'rough'. The castle has no rooms or stairs, but it has the general
layout on the inside set up.
The next step is now to gradually refine everything as I think about the
story behind the game and the puzzles.
... which feels a bit daunting, to be honest.
Since I've always known how the game will start, I guess that's what I'll give my attention to next.
Wish me luck.
A while ago, I wanted to make a door with custom panels. Since I had plans to reuse the
basic door model, I was thinking about using 'decals'.
Or, as it turned out, I was thinking about 'floating geometries' (which is something
totally different 🤔).
A 'decal' is a technique used with scorch marks, footprints,
damage like bullet holes, etc. It is basically a diffuse detail that gets painted over/ projected on the main mesh.
Like a 'decorative sticker'.
You prepare this in your modeling software by duplicating the part of the mesh geometry that you want the detail
to be applied to. This duplicated geometry is then moved to just above the original mesh surface and given the decal texture.
I read that Godot 3.2 doesn't have decal functionality, but that there is an
addon called 'screen-space-decals' (created by Mr-Slurpy) that can be used until Godot 4.0 arrives,
which will come with it's own decal system.
I'm still a bit confused though as to why there needs to be a 'decal system'. What's the difference with just
giving the decal a 'regular' texture ? (Maybe it has something to do with the blending of the regular surface material
with the one from the decal ???)
'Floating geometry (with normal mapping)', on the other hand, is where you fake complexity
in a 3d model by baking normal maps using extra geometry 'floating above' your main model. So, the
detail geometry is not attached to the model surface, but floats, and conforms as closely as possible
to the plane or curvature of the surface directly below.
explanation can be found in this YouTube tutorial by Eat 3D : "Floating Geometry Overview".
Sometimes, the workflow inside Blender is a bit unusual (or maybe it's just me ?).
For instance, you have a large number of objects (say : walls) that you want to assign the
(bricks) to. My brain expects me to be able to select all wall objects, select a material in the dropdown, et voila :
all wall objects now have the correct material. But ... that doesn't work.
It took me way too long to find the solution for something that seems so simple.
Rather than adjusting the objects one by one, you can set the correct material(s) on 1 object, and
then quickly update all other objects by selecting -all- wall objects (the one with the correct material(s)
last so it is the 'active object'), and clicking ctrl + l > 'link material'.
In the same manner, it is also possible to link uv map information
for -identical- objects (same number of verts etc.).
I recently discovered another nice trick in Blender : replacing
one or more objects with another object.
Select all objects you want to replace, shift select the object you want to take their
place (active object) > press ctrl + l > 'link object data'.
Note that the
data is now -shared- among all objects ! In other words, changing the geometry of one objects
changes the geometry of all objects. The same goes for materials.
Also note that if the object that you want to replace has been scaled (eg. to 0.5) and you have
-not- 'applied' (ctrl+a) the scale, that scale will also be used after you have replaced the object (it will be half size).
But, if you applied the scale (it is now set to 1 again), all scaling information will be lost. This
may be what you want ... or not. Scaling the original (or any of the replaced objects) afterwards is fine.
If you want to destroy the link between the objects, you need to use the 'object' menu 'relations'
option > 'make single user' and pick the appropriate option.
More Blender tricks : if you want to remove the suffix in the name
of a number of objects in the
outliner, you can use the 'edit' menu 'batch rename' option. But rather than using 'find/replace',
select 'strip character' > 'digits', followed by 'punctuation'. Alternatively, I think you should
be able to use 'strip characters' in combination with 'end', but that doesn't work for me.
And another useful tip : aligning a bunch of objects, say on the Z-axis.
Select all objects > 'objects' menu > 'transform' > 'align objects'. Use the popup menu to specify
your action : align using the center of the individual objects, align using the bottom of the objects,
align relative to the active object/ world origin/ selection. etc. It's also possible to select
2 axes (or even 3) by using 'shift' click in the popup menu.
When you need to align verts, lines, or faces in edit mode however,
you need to use a different
approach. The 'transform pivot point' needs to be set to 'active element' for this to work.
Select the eg. verts you want to align with another vert, shift select the 'another vert'
(the active object), press 's' to scale eg. 'z' for the Z-axis, and finally, press '0'.
And finally : moving a bunch of objects closer together in the scene.
Select the objects, click the 'tool' menu on the right side of the viewport and check
'locations' in the 'affect only' list. Use the 'transform pivot point' menu to set the location
you want to move the objects to or from, and use 's' to scale on X, Y, Z, or a combination of axes.