• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Blender 2.6 Import/Export Plugin

Status
Not open for further replies.
Level 5
Joined
Dec 1, 2008
Messages
32
Hi, i just wanted to drop a note here that I'm currently working on a Blender 2.6 Import/Export plugin for Warcraft MDL files. It's gonna be open source (zlib/libpng License).
Since there are Blender Import/Export plugins for the most common model formats, this plugin will not only enable you to model in Blender, but also to get models from other formats into Warcraft or to get Warcraft models into other formats.

I'm however not completely sure yet how exactly the MDL format works, so I'm gonna ask in this thread whenever I need to know something.

UPDATE: I created a git repository on github
 
Last edited:
Level 5
Joined
Dec 1, 2008
Messages
32
Okay, time for a little update:
I'm currently a bit short on free time as I am also involved into other open source projects, but I was able to do some work on this plugin lately. You can now basicly run the script from within Blender (although it does not use the loaded data yet but instead just prints it to the terminal).

I use blender and this would be fantastic xD
Thanks, glad you like the idea. Actually I was about to cancel the project until I read your comment ;-)

Please use warblender (which supports MDX) and finish unsupported stuff. I have a revised version which should support version 2.4.

The problem is that I want to create a plugin for Blender 2.5+. Since both the Python version and the complete Blender Python API have changed in Blender 2.5, I figured out it might be easier to write the script from scratch than to port warblender.
 
Level 5
Joined
Dec 1, 2008
Messages
32
Okay, these are the news:

The addon now is version 0.1.1. You can download it here.
Importing the mesh should already work, but if you encounter any problems, just drop me a note. Other features are not supported yet.

That's good... but when an export plugin?

My plan is to import UV coords and vertex normals in v0.2 (in fact, the data is already loaded, but not used yet). A simple exporter for static models might be possible in v0.3 or v0.4.
 
Level 1
Joined
Feb 20, 2010
Messages
7
This is great! I tried your script and it works excactly as it should so far. :)

Thank you for doing this, I really hope you continue your work.
I'm new to blender and really like(<3) the 2.5+ version, below that looks just scary...

Very hyped about the static models in v0.3/0.4 i will spent months FINNALY creating my own doodads, without all the fuss of gmax, milkshape, warblender and nowhere-to-be-found 3dsmax 5 and whatever else i forgot.

Out of curiosity i looked at the code, but i can't understand a thing. No wonders there, all i did in python is a pretty basic audio visualitation so far... with the help from a tutorial. :/

Anyway, hope all goes well with the UV's and normals.

Schöne Grüße und einen grünen Rutsch ins neue Jahr! :)
 
Level 5
Joined
Dec 1, 2008
Messages
32
Okay, importing the uv layout and the vertex normals should work now, so I tagged this v0.2. You can download it here. Feedback is welcome (as always).

For version 0.3 i've planned further improving the user experience by importing material data.

An exporter for static models will be featured in v0.4.
 
Level 2
Joined
Aug 23, 2011
Messages
16
Dude fucking awesome been waiting forever for a blender plugin :D

... to bad I have no idea how to install it, I read the "read me" and it tells me to add a file to the addons folder but nothing happens, I still cant export/import xD... any suggestions for a poor newb?
 
Level 25
Joined
Feb 2, 2006
Messages
1,669
Okay, time for a little update:
I'm currently a bit short on free time as I am also involved into other open source projects, but I was able to do some work on this plugin lately. You can now basicly run the script from within Blender (although it does not use the loaded data yet but instead just prints it to the terminal).


Thanks, glad you like the idea. Actually I was about to cancel the project until I read your comment ;-)



The problem is that I want to create a plugin for Blender 2.5+. Since both the Python version and the complete Blender Python API have changed in Blender 2.5, I figured out it might be easier to write the script from scratch than to port warblender.
Have they really changed that much about the basic API for vertices, armatures etc.? For porting warblender to 2.4 I didn't have to do that much.
Anyway, you could checkout my version here but I didn't update or continue anything for a long time.
The last time I worked on it, I tried to get lights and particle emitters working but it seemed to be hard to get some equal properties for those used in MDX.
 
Level 5
Joined
Dec 1, 2008
Messages
32
Shead:
After dropping it into your addons folder, you should be able to activate it via File > User Preferences > Addons > Import/Export > Import WarCraft MDL.

Barade:
The API has pretty much changed completely, without any backwards compatibility in mind. Nevertheless thanks for the link to your repo, I'll take a look at it. I might be able to reuse some of your code, or maybe even port the whole warblender.
 
Level 5
Joined
Dec 1, 2008
Messages
32
@kalipou134: That's because you can only load .blend files via File > Open. To load a custom model format you need to choose File > Import > [name of the importer].

General Information for everyone interested
I haven't worked much on this the last months, and I won't be able to work much on it the coming month because my exams are approaching. However, after that I'll have a good bunch of free time which I'll be able to put into this project.
I'd also like you to know that my focus has slightly changed. My new aim is to merge this with Barade's warblender (and to update warblender to Blender 2.5+, of course).
 
A couple of issues that stop me in my tracks:

Traceback (most recent call last):
File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.63\s
cripts\addons\WarMDLImport.py", line 345, in execute
return di.run(self.filepath, context)
File "C:\Users\Administrator\AppData\Roaming\Blender Foundation\Blender\2.63\s
cripts\addons\WarMDLImport.py", line 311, in run
texface.uv1 = (self.mgr.tvertices[face[0]][0], 1 - self.mgr.tvertices[
face[0]][1])
AttributeError: 'MeshTexturePoly' object has no attribute 'uv1'

The textures also show up in all triangle faces... (Same texture for all triangle faces)
 
Level 1
Joined
Jan 4, 2013
Messages
1
Hey, are you still developping this plugin or is this thread dead ?:goblin_cry:
Cause i was really interested !
 
Status
Not open for further replies.
Top