Extensions:2.6/Py/Scripts/Import-Export/MD3

提供: wiki
移動先: 案内検索
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 MIT
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 using any animation method supported by Blender, it's not constrained with ShapeKeys.

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

Installation

Use Install Add-on from file button in User Preferences/Add-ons.

Instructions

Export

Script uses Frame Start and Frame End to determine the range 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 (suffixes like .001, .002 are ignored).

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 have to add single material with single texture for every mesh object. Name of texture node will be written as is into md3 data (suffixes like .001, .002 are ignored, feel free to use one texture for many meshes).

Md3exp.png

Texture must:

  • be of Image type
  • mapping type UV
  • have UV map assigned

otherwise resulting data block will be filled with zeroes.

Md3 textures.png

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 (same with .001 suffixes).

Import

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