Sponsored Adverts

Author Topic: [MD3] EXPORT script for Blender 2.5+/2.6+  (Read 38690 times)

0 Members and 1 Guest are viewing this topic.

Offline dmc2143

  • Defunct
  • Newbie
  • Posts: 9
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #15 on: November 19, 2011, 07:29:09 PM »
Do you know if MD3 exporter can export shape keys animation (flapping flag) ?
Yes it can!! At least in 2.6 for sure.


Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #16 on: November 19, 2011, 08:00:13 PM »
Sweet! Anything particular I need to do to set it up right?

Offline dmc2143

  • Defunct
  • Newbie
  • Posts: 9
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #17 on: November 19, 2011, 11:01:45 PM »
Huh, where to start.
I will assume you know quite a bit already, you've been around blender longer than I.
You will need to set up your shape keys, properties>objectdata>shape keys
click + to add your basis (basically your starting point)
click + again to add key 1
go into edit mode change key one to what you want it to be.

Now animating your shape key
This is where I got hung up at first, open the dope sheet and change it to shape keys. Here is where all shape key animation starts, just select your frame and make your key adjustments (slider), blender will auto-majicaly insert a key frame wherever in the timeline you adjust shape keys. No baking necessary just export the finished object(s) like normal. Some good tuts out there. All I know came from a few you tube videos last night. Look into f curves and object drivers too.

Now here's is where the excitement begins. Baking physics based animations to key frames. I won't get into yet, cause I don't enough myself, but it does work, I've tried it.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2186
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #18 on: November 20, 2011, 01:41:51 AM »
Adding to what dmc2143 mentioned. You'll need to be mindful that, iirc, MD3 originally limited the number of effectors that could/would influence a particular vertex to just two or three. That means if you have a number of Shape Keys, say five or six (and this isn't unlikely/unusual due to the way they work), effecting individual vertices it may cause problems at run time (dropped, broken or ineffectual motion) - if you're doing a cyclical animation for example you might want to try and limit yourself to just three keys - the "Basis" (start point), "Key1" (midpoint) and "Key2" (end point/duplication of 'Basis'). This might be/is probably different for other engines using the format though.

Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #19 on: November 20, 2011, 01:46:58 AM »
@dmc2143: So are you saying I can simulate cloth for a flag and export it straight into MD3 ? (or rigid body sim)

Offline dmc2143

  • Defunct
  • Newbie
  • Posts: 9
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #20 on: November 20, 2011, 01:18:44 PM »
I am saying it's worth a try now. You will need to bake the physics to the timeline. properties>physics
I've done one simple physics test, a multi subdivided plane cloth falling onto a sphere and draping itself around the sphere. It exported to md3 just fine.

ADDED: Yes, I have exported a md3 flag with wind physics applied to a cloth / soft body plane.

About shape keys, I just did a test with 6 different keys and got errors, so Kat has the right of it. It appears to be a limitation in the md3 format itself. Untill blender can bake shape key animation data (if ever) we may be stuck on that one. Trust that I will be looking into it, there may be more treats to 2.6 yet.

Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #21 on: December 09, 2011, 04:36:05 AM »
I am using this exporter with 2.59 and I get no error. However, I am getting shader error upon loading my MD3 to the game:

models/flag/flag_joint.md3: could not load texture "NULL"

Here is export log: http://pastebin.com/ffsGQ0Yk

The model is simple box, no bones, no anims.

P.S. I don't have MD3 viewer for Linux and JavaMD3 viewer doesn't work / nor it wants to compile. Thus I can't check the model any other way, but loading it into the game.

Thank you.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2186
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #22 on: December 09, 2011, 05:44:44 PM »
Two things to try, see what they do;
  • switching the "/" to "\"
  • remove the *.tga extension
In the same boat as you though, JavaView doesn't work on Windows 7 :o(

Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #23 on: December 09, 2011, 07:09:42 PM »
same result - not working. Getting same error on model load and because of that model is not being rendered in-game.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2186
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #24 on: December 09, 2011, 08:25:35 PM »
Hmm.. looking at that data you posted again, a couple of other things stick out to take a look at. Try exporting a much smaller number of frames (less than 100, 99 or below); I can't remember off the top of my head but I recall there being a frame limit by which MD3 went a bit wonky afterwards. If you're using the same engine as before (Dark Places?) again check to make sure there are no frame limits in place.

Also try exporting the mesh without the "_" in the name, "flagjoint" or "flag-joint" at a push; underscores ("_") are another caveat with MD3. Again check any limits with the engine your using though. I know these aren't obviously related to 'shader' errors, but as we know problems and messages don't always tally up.

Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #25 on: December 09, 2011, 09:07:36 PM »
no no.. That's not it.

I made a skin file where I assigned a shader to the mesh: mesh_name,shader_name and I can see the model in-game now. But UV's are wrong. I exported using scale in the exporter's GUI.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2186
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #26 on: December 09, 2011, 09:42:48 PM »
How are the UV's screwed up? Are they inverted, flipped, totally scrunched up and all over the place? Each 'symptom' has potentially different fixes - might be as simply as flipping a texture upside-down or left-to-right, or more likely, modelling actual size and not using the script to scale on export (that never really been a good way to model and export content for games as you know).

Offline motorsep

  • Jr. Member
  • *
  • Posts: 75
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #27 on: December 09, 2011, 10:25:07 PM »
On the left - MD3, on the right - IQM :

http://farm8.staticflickr.com/7154/6483822233_859c80be09_b.jpg

MD3 should look like IQM. It's the same scene in Blender, just exported into 2 different formats.

Offline dmc2143

  • Defunct
  • Newbie
  • Posts: 9
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #28 on: December 09, 2011, 11:31:00 PM »
Do you have md3shader defined as a custom property for the object? Somehow the UV coordinates aren't getting exported. Unless you've named your shader "NULL" it is a sign that UV texture is being ignored by the script for some reason.

Offline kat

  • Administrator
  • Hero Member
  • *
  • Posts: 2186
Re: [MD3] EXPORT script for Blender 2.5+/2.6+
« Reply #29 on: December 10, 2011, 01:00:06 AM »
Are you creating (and assigning) full a Material to the mesh rather than skipping that and applying the texture directly to the unwrapped UVWs?

Tags: md3 md3 export 
 

Sponsored Adverts
RSS Content is copyright © KatsBits™ 2017 unless otherwise stated. All Rights Reserved.
No part of this web site may be reproduced (except for personal use, or otherwise stated) without prior written permission from KatsBits.com. For more infomation on copyright click here.
Web design cpdtAdvertisePrivacy PolicyDMCA (about DMCA) Home Store Workshops Blog Jobs Support About Katsbits Contact Site Search KatsBits Help Site Map RSS feed Forum YouTube FaceBook LinkedIn Twitter IMVU