From BlenderWiki

Jump to: navigation, search
MD3 Import/Export
MD3 Import/Export (.md3)
UI location File > Import/Export > Quake 3 Model
Version 0.2.0 Author(s) Vitaly Verhovodov
Blender 2.6.9 License GPL
Category Import-Export Distribution Extern


Executable information
File name io_import_md3.py,io_export_md3.py
Current version download https://github.com/neumond/blender-md3/releases/download/0.2/blender_md3.zip


Links https://github.com/neumond/blender-md3



Introduction

Allows you to import and export Quake 3 models.

Importing uses ShapeKey objects for vertex animation data. Sharp edges are made of separate triangle groups.

Exporting calculates positions for every frame usign any animation method supported by Blender, it's not constrained with ShapeKeys.

Texture names must be set explicitly before export, they usually mean shader path inside .pk3 file and cannot be determined by script automatically.

Installation

Put this Script in Blender 2.6 addons folder, it will need to be enabled in Blender's Add-Ons panel.

Instructions

Export

Script uses Frame start and Frame end to determine the count of frames to export. For example, to export single frame .md3 use:

Md3expframe.png

Every mesh object of current scene will be exported. Names of meshes go into resulting file as is, so you can refer them in your code.

Sharp edges will be automatically split to make separate pairs of vertex/normal. Md3 supports only triangles, script makes triangulation on its own. Any material parameter will be ignored, except texture.

Textures, UVMaps

You need to add single material with single texture for every mesh object. Name of texture node would be written as is into md3 data (suffixes like .001, .002 ignored, feel free to use one texture for many meshes).

Md3exp.png

Texture must be of Image type, mapping type UV and have UV map assigned, else resulting data block will be filled with zeroes.

Tags

MD3 supports tags. Tags are just named positions+orientations for different effect stuff, like shot flares, lightnings, etc.

Tags can be done using Empty/Arrows objects. Name of the object is written to result file along with its position and rotations.

Import

Script tries to guess texture file location on import. If it founds you can see it in Texture Viewport Shading mode.