Close

Exporting from Freecad to Blender to Godot

A project log for Silly software wishlist

Motivation to do some software projects by writing them down.

lion-mclionheadlion mclionhead 07/21/2018 at 07:310 Comments

Using the old python scripts to export meshes from Freecad, found a way to manually fix the normals in Blender instead of rebuilding the entire model.

Smoothing normals in blender



Smooth is the magic button. There are many uses of the word smooth in Blender.  The one that applies to normals is only in edit mode & only applies to selected edges.  The other magic button is Auto smooth.  The trick is some edges shouldn't be smooth, so you hit sharp for those & blendy colors them cyan to indicate the normals are split.

Also important to note how awful the tesselation from Freecad was, but whatever.  It was hoped libcoin's somewhat neater tesselation could have been sniffed, but manual mesh drawing is the best option for a game. The libcoin sniffer still needed to get the coordinates in SoShape::invokeTriangleCallbacks & translate the coordinates to a global reference frame. 

For the GLTF exporting, you need to select "selected only" every time.  All the objects have to be meshes.  The "save settings" button doesn't work & there's no confirmation of overwrite.

Godot is another nest of bugs in the chain.  The mane problems are most commands are only available through keyboard commands, like undo.   There's no way to center the 3D view on an object, which makes assigning materials difficult.  Your only recourse is creating cameras just to edit the materials.

Not bothering with heat shields until the next Elon update, since the dragon 2 heat shield is a new material.

Making a different scene for every object that moves was a disaster.  It does provide separate transformations for every mesh in a scene, so this will be redone a few more times. 

Discussions