neumond / blender-md3

.md3 models support for Blender
MIT License
62 stars 23 forks source link

No animations for tags in Import/Export #2

Closed onny closed 9 years ago

onny commented 9 years ago

Hey, it seems that your plugin doesn't support animations on tags yet? Because after importing a player mdl, I notice that there are no animation key frames in e.g. tag_torso. Export also seems to ignore the positioning of tags.

Would appreciate any hints! Best regards, onny

neumond commented 9 years ago

Currently it reads/writes only one position of tag accoding the docs I've used. Probably the doc is just not complete. Could you give me any .md3 with animated tags?

Luzido commented 9 years ago

Hi Neumond, I'm a good friend of Onny and actually the one who tried to import and export from/to Quake 3.

You can take any model from this List I think: http://ioquake3.org/extras/models/

but this one will do: http://ioquake3.org/files/models2/q3mdl-bunker.zip

The simplest way to improve this imho is to let the plugin create keyframes for the tag_... object too, not just for the meshes.

https://github.com/TTimo/GtkRadiant/blob/master/docs/manual/quake3/Model_Manual/model_manual.htm

This is a good plugin! very easy and clean , I adore it. If you could improve this, I would be very glad and could make a short tutorial on how to use it. If you like.

Keep it up,

Best regards from Germany, Carlo

neumond commented 9 years ago

Hi! Check it out. I've added tag animations.

Import reads matrix basis for every frame and sets rotation mode 'quaternion'. I believe it is close enough to raw matrix value interpolations I found in source: https://github.com/id-Software/Quake-III-Arena/blob/master/code/renderer/tr_model.c#L632

For export you can use any rotation mode. Script just switches the frames and reads matrix basis required by md3 format.

Luzido commented 9 years ago

Wow Vitalik!, many thanks to you, I will try this in the next few days and let you know about it. Exiting! Best regards, Carlo =

edit: the tags are now imported with animations which is super! Thank you!