Blender Exports to Allegiance MDL
-
Your_Persona
- Posts: 773
- Joined: Sat Dec 04, 2004 8:00 am
- Contact:
Video Example
http://youtu.be/vD6q68exNm8
The project. Get the code here, and then help!
https://code.google.com/p/blender-to-al ... -text-mdl/
Why?
I believe an Exporter for Blender (http://www.blender.org/) is the best possible content pipeline for getting art assets into Allegiance.
Allegiance has a file format called MDL. It has a very similar syntax to JavaScript. It has a text representation and a binary representation. Both types have the same capabilities. The tool MDLC can load a MDL file and write out the binary format of that file to reduce file size.
Exporting to the Text-MDL format is the best thing we can do because it allows the export plugin to utilize all of the Allegiance engines features. The text MDL format can also be extended, as it has been to load .X files. It supports animated images, multiple Levels of detail. It can be used to load textures, I believe it support animated models (I have not tested it). Its very functional, and did I mention it looks like JavaScript?
Why blender? It’s free, open source! It can import, or has importers for tons of other file types. It’s also feature rich.
So take a look at the video example I posted, and then help with the export script. It’s Python and I don't know Python. So the script is ugly and needs someone who loves Python to give it some.
Video Example
http://youtu.be/vD6q68exNm8
The project. Get the code here, and then help!
https://code.google.com/p/blender-to-al ... -text-mdl/
http://youtu.be/vD6q68exNm8
The project. Get the code here, and then help!
https://code.google.com/p/blender-to-al ... -text-mdl/
Why?
I believe an Exporter for Blender (http://www.blender.org/) is the best possible content pipeline for getting art assets into Allegiance.
Allegiance has a file format called MDL. It has a very similar syntax to JavaScript. It has a text representation and a binary representation. Both types have the same capabilities. The tool MDLC can load a MDL file and write out the binary format of that file to reduce file size.
Exporting to the Text-MDL format is the best thing we can do because it allows the export plugin to utilize all of the Allegiance engines features. The text MDL format can also be extended, as it has been to load .X files. It supports animated images, multiple Levels of detail. It can be used to load textures, I believe it support animated models (I have not tested it). Its very functional, and did I mention it looks like JavaScript?
Why blender? It’s free, open source! It can import, or has importers for tons of other file types. It’s also feature rich.
So take a look at the video example I posted, and then help with the export script. It’s Python and I don't know Python. So the script is ugly and needs someone who loves Python to give it some.
Video Example
http://youtu.be/vD6q68exNm8
The project. Get the code here, and then help!
https://code.google.com/p/blender-to-al ... -text-mdl/
-->>Elitism<<--
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
If I understand you correctly, this would write directly to a text mdl file? So as far as this might interact with the original MS tool chain, we could still take your text mdl and feed it into MDLC to get optimized and compiled objects?
[img]http://www.freeallegiance.org/forums/st ... erator.gif" alt="IPB Image">
<img src="http://adaven6x7.googlepages.com/PKBanner3copy.png[/img]
<img src="http://adaven6x7.googlepages.com/PKBanner3copy.png[/img]
-
Your_Persona
- Posts: 773
- Joined: Sat Dec 04, 2004 8:00 am
- Contact:
Yes you could.Adaven wrote:QUOTE (Adaven @ Mar 18 2012, 10:13 PM) If I understand you correctly, this would write directly to a text mdl file? So as far as this might interact with the original MS tool chain, we could still take your text mdl and feed it into MDLC to get optimized and compiled objects?
You also have the option of skipping MDLC, say for testing. Let you maybe manually tweak some stuff before you run it through MDLC.
-->>Elitism<<--
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
-
Your_Persona
- Posts: 773
- Joined: Sat Dec 04, 2004 8:00 am
- Contact:
Here is a patch file to fix a few bugs in the text-mdl loading code for Allegiance/MDLC/MDLEdit
Code: Select all
Index: src/effect/efapp.cpp
===================================================================
--- src/effect/efapp.cpp (revision 1033)
+++ src/effect/efapp.cpp (working copy)
@@ -292,7 +292,8 @@
TRef<IObjectList> plist; CastTo(plist, (IObject*)stack.Pop());
- while (plist->GetCurrent() != NULL) {
+ plist->GetFirst();
+ while (plist->GetCurrent() != NULL) {
IObjectPair* ppair; CastTo(ppair, plist->GetCurrent());
Color color = GetColor(ppair->GetNth(0));
@@ -339,7 +340,8 @@
TRef<FrameDataListValue> plistValue = new FrameDataListValue();
TRef<IObjectList> plist; CastTo(plist, (IObject*)stack.Pop());
-
+
+ plist->GetFirst();
while (plist->GetCurrent()) {
IObjectPair* ppair; CastTo(ppair, plist->GetCurrent());-->>Elitism<<--
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
indeed mdledit is a good place to start testing your exporter and adapting the engine to use it. but remember xmunge? we dont have the src code to that (part of the artwork toolchain used in orig) so....i forget anyways the dejavu is mind numbing and a true test of patience and will. 

These bugs haven't been fixed yet because don't have any developers interested in fixing them up. --Tigereye
Imago's stupid-sensor is supersensitive. --RealPandemonium
The art is managing the flow of the drama to achieve the desired results. --Big_Beta_Tester
joeld wrote:But we’ve been amazed at the level to which some of the Allegiance fans have remained hard-core.
I was about to start a thread on this while I was getting info on the original tool chain for the wiki. I can see it in R4 and earlier: http://svn.alleg.net/svn/Allegiance/tag/FA...unge/xmunge.cpp. Why did xmunge go away in R5 and beyond?Imago wrote:QUOTE (Imago @ Mar 19 2012, 10:46 PM) But remember xmunge? we dont have the src code to that (part of the artwork toolchain used in orig) so....i forget anyways the dejavu is mind numbing and a true test of patience and will.![]()
Last edited by Adaven on Wed Mar 21, 2012 12:46 am, edited 1 time in total.
[img]http://www.freeallegiance.org/forums/st ... erator.gif" alt="IPB Image">
<img src="http://adaven6x7.googlepages.com/PKBanner3copy.png[/img]
<img src="http://adaven6x7.googlepages.com/PKBanner3copy.png[/img]
orig used Direct X Retained mode which is no longer supported in the latest DX SDK
http://support.microsoft.com/kb/969150
http://support.microsoft.com/kb/969150

These bugs haven't been fixed yet because don't have any developers interested in fixing them up. --Tigereye
Imago's stupid-sensor is supersensitive. --RealPandemonium
The art is managing the flow of the drama to achieve the desired results. --Big_Beta_Tester
joeld wrote:But we’ve been amazed at the level to which some of the Allegiance fans have remained hard-core.
That's the one - the name I couldn't remember.Imago wrote:QUOTE (Imago @ Mar 21 2012, 04:26 AM) Direct X Retained mode
Did a quick google found this: http://www.mvps.org/directx/faq/direct3d_rm.htm
QUOTE Some high-end 3D modeling/animation packages come with a DirectX exporter, for example, SoftImage3D. You can directly export your animation work to a .X file by using these exporters. However, if the software you are using do not have a DirectX exporter, you will need to output your work to 3DS format, then use a program called "conv3ds" (comes with DirectX SDK) to convert the 3DS file to .X file. When using "conv3ds" to convert the animation, you should choose the "-A" option. (Note: it's a UPPER case 'A'[/quote]
Pretty old stuff, but may be a solution for people with 3ds max (or software that exports .3ds - [maybe just old .3ds I don't know if the format has changed]) assuming we can get hold of a conv3ds.exe from an old dx SDK - I seem to have a copy of the march 2008 installer, that might be old enough to have a copy in given the date on that support page is march 2009.
edit: ooh a direct x retained mode format document http://paulbourke.net/dataformats/directx/
edit2: found a conv3ds.exe in http://www.microsoft.com/download/en/detai...=en&id=8963
Last edited by madpeople on Mon Apr 02, 2012 11:03 pm, edited 1 time in total.
-
Your_Persona
- Posts: 773
- Joined: Sat Dec 04, 2004 8:00 am
- Contact:
Upgraded for blender 2.6.3
Added addon support.
Currently Supports
Multiple Meshes per modelSingle texture per Mesh.Export as text-mdl
Todo:
CVH ExportHardpoints Export
Looking for someone who knows more about blender then I do to give me an example of making bones and labeling them so I can write the HardPoints export.
Also if anyone knows how to create a convex hull in blender, would be a huge help.
I'm thinking that if the CVH was done it a way that is its visibility is a simple toggle, that would be nicer for the modeler than "just another mesh".
Anyways.. links to help/download are in the first post.
Added addon support.
Currently Supports
Multiple Meshes per modelSingle texture per Mesh.Export as text-mdl
Todo:
CVH ExportHardpoints Export
Looking for someone who knows more about blender then I do to give me an example of making bones and labeling them so I can write the HardPoints export.
Also if anyone knows how to create a convex hull in blender, would be a huge help.
I'm thinking that if the CVH was done it a way that is its visibility is a simple toggle, that would be nicer for the modeler than "just another mesh".
Anyways.. links to help/download are in the first post.
-->>Elitism<<--
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
I'm not Hamlet. I don't take part any more. My words have nothing to tell me anymore.
-
TheAlaskan
- Posts: 2256
- Joined: Tue Apr 03, 2007 2:15 am
- Location: Denver, CO

