(Originally posted on Mastodon)

Here is the first mechanical part I’m modelling to use as a building block to make machines in the game. Not a simple example, it’s a vehicle wheel, with double A-arm suspension, and direction. I used FreeCAD for modelling, because it’s made exactly for the purpose of modelling mechanical parts, and also, let’s admit it, because I’m not experienced at all with Blender. My goal is to not lose too much time in 3D modelling, but even for prototyping I need something that players can understand when they look at it.

A wheel suspension system, modelled in FreeCAD. The wheel is a simple dark grey cylinder, with a cylindrical hole in the middle. We see it from the inner side. A light grey articulated mechanism can attach the wheel to some vehicle frame (not visible on the image), while allowing vertical movement for suspension, as well as rotation around a vertical axis for direction. Two pistons act as springs for the suspension. The system is animated, showing how the wheel can go up and down, as well as rotate around the vertical axis to adjust direction.

My constraint was mostly to make a modular system, with a single point of attachment (that’s the rectangular hollow plate visible at the foreground in the video), and also as compact as possible, since players will be placing wheels on their own designs, more compact means more freedom. But still have enough vertical suspension amplitude, to accommodate rough terrain.

Next step is to integrate this in the game. For this I need a skeleton, skin the parts on the skeleton, and add textures. None of this can be made with FreeCAD, so this is where I switch to Blender. I’ve exported the FreeCAD model as a mesh, and imported it in Blender. This step is really not ideal, up until now the process was non-linear (if I wanted to modify any dimension for example, I could change it in FreeCAD and it would update the final result). But from this point if I have to change something in FreeCAD, I’ll have to restart all the work in Blender from scratch with the new model.

Here is the result after adding the skeleton in Blender:

Screen capture of Blender where the suspensions system is displayed as a mesh, along with a skeleton (sorry... "armature"). We see the mouse select each "bone" and change its rotation, and each part of the mesh follows the movement of the corresponding bone (Each arm, spring guide, etc.)

Next I’ve added constraints so that the two piston parts remain aligned with each other, the top A-arm follows the bottom A-arm movement, and the spindle vertical axis remains vertical. This allowed to easily create two animations: one for the up/down suspension movement, and one for the direction wheel rotation.

The idea is that, in the game, the physics (Jolt engine) will simulate a vertical spring, so that the wheel can move up and down along a vertical axis. This is a simplified movement compared to the actual suspension mechanism. But it won’t be directly visible. Instead, it will drive the animation, which will rotate the suspension arms so that the wheel ends up at the correct relative height.

Here is the final result: the suspension system, modelled in FreeCAD, rigged, animated and textured in Blender, is now an interactive thing with the physics simulation in Godot:

In first person view, the player builds a 4 wheeled vehicle, by placing metal beams that automatically weld together, and then adding wheels with suspensions. Then the player jumps on the frame, which shows that the suspensions react to the weight change as they should.

However, I’m surprised how small it looks in the game 🫣 I should have known better, it’s not the first time I get surprised after spending time working on modelling in very close view.

Anyway, next step will be to make the wheels actually roll. More on that in the next post!