From OpenSCAD to Godot

There was a question on Bluesky how the import works, so here’s a bit of an explanation. But if you’re going to do this, have Claude Code or the like set it up for you. It will save you a good portion of your life.


So far, every vehicle in the tool starts life as a parametric OpenSCAD model.

– Droopy
– Cargo mover
– Landing Barge
– Utility Vehicle
– “A Really Big Tank”

The CAD file is the master. I scripted-reimport the openSCAD when I change things Getting there takes one command per vehicle and Claude Code does a whole bunch of checking if turrets clear and whatnot.

  • Each vehicle has a JSON manifest in the game’s pack. It names the source file and its includes, the units (the CAD is in millimetres or centimetres, the game in metres) and which way is up and forward. Then it lists the parts: the hull, the ramp, turrets, wheels, etc.A part is a SCAD expression the source’s own modules draw, rearramp() or turret(), plus a colour group and, for anything that moves, a joint: the pivot, the axis, the range, and named states like down and stowed. Where a number is needed, a pivot or an angle, it’s written as an expression in the source’s own variables.
  • The importer pulls the source over the network from the manuscript’s mirror.
  • Export part by part. OpenSCAD’s CGAL unions are slow: a whole model takes close to a minute, its individual parts seconds. So the tool generates a driver per part that uses the source, repeats its top-level assignments so expressions can name them, and exports each part on its own. A part placed by a transform (the turrets’ translate/rotate/mirror) has that transform measured off four marker cubes exported through it, so pivots and axes can be given in the module’s own frame.
  • Proof. This is the step where Claude Code earns its keep. Every joint state that has its own SCAD, e.g. the ramp drawn “down”, is checked against the rest mesh turned about the pivot by the state’s angle. A wrong pivot or a wrong sign fails the import. Then the parts, posed as the composition poses them, are compared against the model exported whole.
  • Clean up in Blender. The same script runs headless in Blender: the CGAL facets are welded into a mesh with its normals checked outward, the frame turned to glTF’s conventions, the scale set to metres, smooth shading split at 30 degrees. UVs are a box projection in metres across the whole vehicle at rest, so a texture, or a camouflage pattern, lands at true scale and continues across parts. Each colour group becomes a material; each part becomes a named node, a moving part’s origin on its pivot.
  • Write the asset and its sidecar. Out comes a .glb and a sidecar JSON: every node, its joint in the glTF frame, the named states, the materials and their roles, markers such as where the EM drives sit, the gun mounts with their limits, the proofs’ numbers and the source’s hash. Plus a provenance entry in the pack, so a check can later tell whether the asset still matches its source. The whole thing is deterministic: the same source and manifest write the same bytes, and a –check mode rebuilds to scratch and compares.
  • Godot reads the sidecar. On the engine side there is one class for every imported vehicle. It never names the barge or the Droopy; what a model has, what moves, about what and how far, is all its sidecar’s. Each part becomes a mesh at its place; a joint becomes a node on its pivot that hinges, steers or spins. A material whose role is “paint” gets the hull shader, which paints camouflage in the asset’s own frame at true scale, and a moving part carries its paint with it. Each part’s own triangles become collision, on a body that moves with the joint, so a lowered ramp can be walked up and a hold stood in. Gun mounts become turrets that traverse and elevate within the set limits that were computed from the CAD so a gun never passes through its own hull and its bullets can’t hit itself.
  • A physics stand-in takes the parts as convex hulls, with the mass, centre of mass and inertia the vehicle’s record gives. That way a laden truck settles on its springs and the barge flies like a dead elephant.
The v1 Utility Vehicle model
The v1 Utility Vehicle model

Obviously, this one hasn’t had much detail work done on the OpenSCAD, but you get the idea.

Worldbuilding Total War #1

This is a general update on the efforts to make a system that I can easily create visual material to promote the Total War Setting with. For anyone who has missed the past few weeks, I’ve always wanted to bring as much of the world as I can into a 3D game engine. If it’s only ever good for screenshots, that’s fine, but obviously I have fever dreams of a game one day when I grow up.

RFS, New Shawbury, loading landing barges
Autotrucks loading at New Shawbury on Athena

The autotrucks are the EUAF’s do it all cargo movers. Five axles, hub motors, four steered, hydro-pneumatics suspension, emdrives and pressure sealed crew comparments for shelter though they’re mainly intended to be remote driven or slaved to something like a utility vehicle.

Autotrucks into landing barges at New Shawbury
Loading operations on Athena
Loading operations at New Shawbury
Loading operations on Athena
A landing barge climbing to orbit
A landing barge climbing to orbit

A landing barge can carry up to 12,000 tonnes at a pinch. It takes forever to climb to orbit with that load, but fortunately, the plan is that it’s the way down where you’re taking fire. Just hope you never have to evacuate a planet.

A landing barge coming in for touchdown
A landing barge coming in for touchdown
Flight line at New Shawbury
A flight line on Athena
Flight line at New Shawbury
Flight line
Dusk at RFS New Shawbury
Dusk on Athena
Landing barges at New Shawbury
Landing barges on Athena
Landing Barges somewhere on Athena
A small exercise strip on Athena

All sorts of things happen at training fields. Not sure if this Droopy pilot ever got his wings.

An unsanctioned low pass by a training Droopy at New Shawbury
An unsanctioned low pass by a training Droopy at an Athena training strip

These are the first baby steps into the 3D world, but I’m already very happy with it as a means to give a sense of the feel I want. Proper fidelity might be nice, but even with Claude Code’s help I don’t think I have the time budget to bring it where I’d want it. But I will keep developing it and see how far I can get. In any case, this one page has more imagery than I’ve had in total until two weeks ago.

I’ve also made a few animations, including a 20 second announcement video for Dropship Down. Coming soon ™.

EUSS Vittorio Veneto (v1 OpenSCAD)

In my efforts to make efforts I always knew I was going to need at least a few of the spacecraft humanity uses in its voyages from system to system for the Total War setting. It makes sense to start with a ship that plays a substantial part in Dropship Down, the EUSS Vittorio Veneto which is a Littorio Class Star Carrier of the EUN (EU Navy). As usual, I’m using OpenSCAD because I despise mouse drawing.

This is a rather early version that’s still missing a lot of details like several of the bay doors, missile racks and emergency chemical thrusters, but it’s a start. I’ve added a Droopy and a Landing Barge for scale. The two cylinders are for habitation, they counter-rotate at 2.93rpm. I’ll spare everyone the rest of the technical mumbo jumbo about why everything is the way it is.

I’m going to have to go through the text and the stats page since things always become clearer when you draw them. Need some small changes so the text is consistent with the model everywhere. I’m going to add details and then import it into Godot soon(tm).

More RFS

A refinement of the ‘Really Big Tank’, though I don’t think I’m finished with it yet. The ammo box on the rear of the turret is too exposes, which is going to need some work. I think I’ve settled on four or five camo styles for now, and the objective is to get them all working on all the vehicles and also to make the vehicles movable in a rudimentary way so I can make screenshots and animations.

The really big tank with the giun stowed.
‘A Really Big Tank’

Then some shots to show the articulated gun. The idea is that the range of motion for the gun is so large that the vehicle can fullfill AA and Artillery roles to a far greater extent than a more conventional design. Of course, this thing is also 12m long and 5m wide, weights 300 tonnes and can fly (see emdrives SPOILERS).

A Relly Big Tank with elevated gun
Elevation example
A really big tank, gun depressed
Depression example I
A really big tank, depression example II
Depression example II

I think this vehicle only really starts featuring in book III, so I’ll publish the name and specs when that is out. I’m still struggling with the edit of book one, so don’t hold your breath.

For those who missed the last few posts, this is a screenshot taken with the photomode in my Godot tool. The model was drawn in OpenSCAD and then imported into Godot through Blender, using Claude Code for the drudge work.

Richthofen Flight Station (first pass)

I’ve been slowly making some more assets as I envisage them to exist in my science fiction setting, Total War. In that setting there is a dusty hell-hole of planet called Athena, and there is a military town on it called New Shawbury. There, you can find Richthofen Flight Station, a very large training installation. I’ve chosen it to line up all the assets I make. This is the first impression.

The utility vehicle in the foreground is an extremely rudimentary model, I still haven’t decided whether it should have windows (read the book to find out why it doesn’t really need them). The tank actually features in a later book, and we’ll just call it the ‘really big tank’ for now. Behind that is the the Droopy Dropship, which features heavily in the first book and beyond that is a landing barge which may still be too small, and it may still need big fins on the back, making its shape a little more like the experimental NASA lifting bodies.

All these vehicles are drawn in OpenSCAD then imported into Godot 4 through Blender with all of it being sped along by Claude Code. Still have a lot more vehicles to do for some of the scenes I want to make, and also some more props. It’s going to be a while.

Wormhole Layout in Godot 4

Parallelto my project to get Tales of Vatan worldbuilding data into Godot 4, I’ve been doing the same with my Total War setting. Top level here is a map of the wormhole network. Goals are more or less the same as for Vatan, with the addition of Wormholes and a means of working out travel times through wormholes and systems.

Below is the top-level overview, the wormhole network in the Milky Way. Early days, but I’ve wanted this kind of graphical representation for a very long time. I never had the time to teach myself proper Godot, but with Claude Code assistance it’s far less time consuming.

It does not matter…

…how slow you go, as long as you do not stop.

Attributed to Confucius. No idea if he actually said it, but it encapsulates things reasonably well.

I’m busy editing Dropship Down which is taking longer as real life work gets in the way. I’ve also made a little progress expanding the section of The Value of Nobility (Alagariel II) that I wasn’t completely happy with yet. I still have the ambition to get both books out this year and I’ve asked Daria to start thinking about the cover for Alagariel II.

Sales are still slow. There’s the occasional sale around the world, but it’s obviously nothing like what I want to see. I’m discovering that it’s essentially required to have some sort of visual media for a post to catch on and when you’re a writer that’s not something you have a huge supply of. Daria makes me some artwork to use alongside posts, but she deserves to be paid for her work and is doing art school and all, which puts a limit on that. AI is widely reviled, often beyond reason, and it seems many are more than happy to spew hate on any AI use, so I’m a little reticent there, even though it could add some atmosphere in those few cases when what is generated actually aligns with my vision.

What remains is making more of my own artwork, but I’m not much good and things would be more like technical drawings. For the sci-fi setting that’s fine, but it doesn’t work that well for the Tales of Vatan setting.

In any case, I will soft-launch Dropship Down on itch.io very soon now. That release will be updated as I do more editing, but in the unlikely event that there’s someone who can’t wait to get there hands on my first sci-fi book, stay tuned.

The Cover Art for Dropship Down
A Droopy in trouble (Cover Dropship Down)

Dropship Down Cover Art!

The Cover Art for Dropship Down

I’m happy to reveal the cover of my next book, Dropship Down (Book one of the Total War: Clausewitz series). The artwork is once again by the wonderful Daria and you should definitely stop by her website and take a look. The picture depicts the opening scene of the book.

I’m not completely certain when it’s going to be available, so I’m going to call it Soon ™. I’m still editing the text and fixing things. It’ll be ready when it’s ready, but I’m still not finding anything that I’m unhappy with. Beta readers are happy with it too, so it doesn’t look like there are any huge hurdles ahead.

Release of the book will start off on itch.io. That’s still the cheapest place to get the e-book and there it’ll include a pdf of the as-printed version, a high rez version of this cover art and possibly other goodies like the OpenSCAD file that generates the (rough) Droopy model that was used for composition on the cover.

I’m also hoping to have a model of the Droopy in a game engine soon, which should make it possible to make more scenes easily. Eventually, I’d love to have an asset library for this setting that can be used to make screenshots to illustrate things and perhaps more.

Where are the Pressure Tanks?

As could happen to anyone, I was talking to Daria about the cover art for Dropship Down (which is going to be very cool, should have a WIP soon). Obviously, this all involves a crashing Dropship, which naturally leads to fire and smoke. My mind then gets to wondering where the pressure tanks are in the Dropship, so I sat down and drew them into my OpenSCAD model.

About 7000 litres of LH2 and 2000 litres of O2 would fit. Which isn’t as much energy as you’d think. Luckily, Emdrives don’t actually work in the real world, so it should be plenty.