Aims of this Tutorial
- Create a model for a spaceship.
- Create materials for the spaceship.
- Import the model and materials from Blender into Godot.
Creating a Spaceship Model
This part is very subjective and down to what you want to do. But regardless of your style, I highly recommend finding some inspiration. So, look up some pictures of spaceships, and see what you like and what you don't. Then you can make your own design using these ideas mixed with your own. I decided on a fluid, glassy design with a plastic 'net' holding it together.
Because I wanted it to be smooth, I started with a cube and put a 'Subsurface Division' modifier on the object and cranked up the subdivisions to 3. I could then use loop cuts, extrusions, displacements and insets to design the main body. How you go about doing this is up to you, so just play around and see what works and what doesn't.
Now, to make the net, I started off with another cube with the subsurface division modifier, made it into a long, flat, isosceles trapezium prism. This gives a teardrop look to the modified mesh. Now, we can duplicate the object, scale it down, remove the modifier and scale it up in the z axis. We can then use this new object as a tool. Select the original object and add the 'Boolean' modifier. Make sure it is on difference and select the new object for the tool. You will see that hole in the mesh now. However, the subsurface division is not acting on the hole, so you need to move the boolean up. Now it will look wierd because of the extra edges that the boolean creates. To resolve this, apply the boolean modifier with the apply button, go into edit mode, and select the two faces that are the problem, and then right click and select 'bridge faces'. Do this for both sides. Now you need to duplicate, scale and transform this object multiple times in order to make this 'net' structure.
The final modification I want to do is to give the body some texture. To do this, add a displacement modifier and generate a new texture for it. Open this texture in the texture tab and change it from an image, to a distorted noise texture. Now play around with the parameters for the noise until you get something you like. You will need to turn down the contrast in order to mellow out the spikiness.
Creating the Spaceship's Materials
The materials this time will be much simpler as we will need to render them in real time. For the body, I simply used a 'Glass BSDF'. For the plastic, I stuck with the 'Principled BSDF', picked a nice blue colour and gave it a tad of emission. Make sure to apply these materials to the correct objects. You can link materials using Ctrl-L to apply the same material to a bunch of objects at once.
Importing into Godot
Export the scene as 'glTF 2.0' in order to get the best compatibility. If you are on an old version of Blender, there is a bug where it uses loads of memory and takes ages, but it will complete given enough time and memory (set up a temporary swap file if necessary). There are a few settings we need to change for the export: 'apply modifiers' must be on and 'animation' should be off (this one doesn't matter that much, but there is no need to export an empty animation node).
Place the output into your Godot project directory (or a subdirectory), and Godot will automatically import the assets. Now you will need to go into Godot and open that file. It will give you a warning, just click 'open anyway'. Now, if there were any issues with the export/import process, now is the time to fix them. For me, the glass texture did not translate over correctly, so I manually set that up in Godot (Just like we did for the arrows in EP10). You can't just save the scene due to the recent warning, so you have to choose save scene as instead. Once it is saved, you can replace the temporary mesh with the new spaceship!
Making a Spaceship Engine
To make this, we can start off with a cylinder with the subsurface division modifier. With a couple of loop cuts towards the ends of the engine, insetting the top face twice, and moving the top face down, we get a cup shape. To add some detail to the sides, we can press 'i' twice to inset all the faces independently. Do this and then scale them out a bit so that they cause little ridges along the surface. Repeat this for any surface you like, and when you are done, inset the top face we dragged down almost to a point and pull it up in order to make a cool looking spike.
Now we can use the same export method to get it into Godot. We will need to add a material to it though. I went with a metallic looking material. Then you can put these all around your craft (main thrusters and vernier thrusters). We will fix the lighting in the next episode, so don't worry about it being really dark!