Blender AC3D import and export

From FlightGear wiki
Jump to: navigation, search

Many FlightGear aircraft modelers prefer Blender as their 3D-modelling editor. FlightGear primarily uses the AC3D file format (.ac) to model aircraft, scenery models, and many other things. For recent versions of Blender import/export support for the AC3D file format is implemented as an addon. This page gives a few more details about this addon.

Blender versions 2.80 and later

Majic79 addon

Current maintainer: User:Necolatis

Tested with Blender version 2.63 to 2.78a

For more information you can follow the topic Blender 2.6 AC3D Importer & Exporter topic on the forum This is a link to the FlightGear forum..

Download Link (GitHub). Probably: User:Necolatis due to lack of credits unsure.
Repository (ZIP file download for Blender <= 2.79).

Notice that the above link is to Necolatis (Nikolai) latest version, as the Majic79 GitHub has not kept up with the updates and seems dead.

Notes

  • Before you export a model with this addon, make sure that you set the UV map and texture inside the material, not just inside the UV editor. See the video tutorial here.
  • Before you export make sure to exit Edit Mode or some of your last changes won't be exported.
  • Inside Blender when you want to see the textures, be sure to set the shader to GLSL (or for 2.7+ just set view mode to materials). Alternatively set textured solid in solid view.
  • To see textured surfaces as they will be shown in FlightGear, go into the material texture and set the blend type to Multiply instead of the default Mix (the importer will also do this automatically). An example plane that will look very different if this is not done is the FGAddon aircraft ASK-13, notice the wingtips.
  • The final model might display color mismatches (Texture color vs Material color) when viewed in Flightgear. Hand editing the materials section of the exported AC3D file might fix this.
  • If you wonder where to put the scripts you could open blender's user preferences (Ctrl+Alt+U, or File > User Preferences) tick for example Import/Export and extent the information concerning an existing script. Usually this throws the path. For for example Ubuntu 14.04LTS/Blender 2.79b it is: /usr/share/blender/scripts/addons/.
  • Be aware that Blender only has greyscale for emission and ambient colors. If you want to export/import a color for those, import/export options gives you capability to choose to use Blenders mirror color for that.
  • The importer will not fail if it does not locate a texture, instead it will issue warnings. Pull down the top bar to see if there was any, they will be orange lines.
  • The exporter will not fail if it tries to save a texture without data, instead it will issue warnings. Pull down the top bar to see if there was any, they will be orange lines. Notice that since AC3D only support 1 texture per object, if multiple textures are attached to an object in Blender the last of the textures that has any data, if any, will be the one that get exported, but it will still warn about the missing data in the others, so take care.
  • Orientation: The default settings in the plugin correspond to the FlightGear coordinate system (-X forward and Z up, also see: Howto:3D_Aircraft_Models). The default settings are: Forward -Z and Up Y.

You can report bugs with the addon here, but please include problematic .ac/.blend files and their textures.

Linux (kubuntu 19.10, DeBIAN 10 "buster")

Use: download.zip (or really make sure to grep the right tree (see above!))
  1. Unpack .zip file.
  2. Read README.MD.
  3. Install for example into /home/<User>/.... Do not install into /usr/... since you will be lacking writing rights.
  4. Copy io_scene_ac3d into blender-<version>-<OS architecture>/<version>/scripts/addons (for example blender-2.82a-linux64/2.82/scripts/addons)
  5. Installation via Edit > Preferences > Addons > Install and select: __init__.py

Blender versions 2.63 and later

For version 2.63 and later you have a choice of several scripts.

Mr. No addon

Notes

  • When exporting with this addon, make sure you set the texture inside the UV editor.
  • When using this script, it is very important that everything is textured. The addon will silently fail if this is not the case.
  • This script does not work reliable when nested groups are being used in the imported AC3D model (for example here).
  • The importer cannot handle the token subdiv, its just ignored.
  • The exporter does not always export the rotations/location matrix of objects correctly.
Download link (MediaFire)

FG2blender (PAF Team)

Authors: f-jjth, run

The PAF team (Patrouille de France), a French group of FlightGear enthusiasts have also made an AC3D Blender script. Their last commit dates back to 11 December 2013 and it feels like their FG2Blender project is abandoned. The PAF team is essentially active on their own French speaking forum. There is no trace or documentation available, so the notes below are speculative and incomplete. It would be interesting to test these scripts and check if the work of the PAF team can be merged with the work of User:Necolatis as this is actually the only AC3D script that is still maintained.

Notes

  • According to the source code, the script seems to be able to export animation.

Repository (Zip file download[dead link])

Blender versions 2.5 to 2.62

For these versions you can use one of these scripts by Majic79:

Blender versions 2.4 and older

For these versions, Blender supports both the import and export of AC3D files out of the box. Just go into user preferences and enable the addon scripts.

External links