new blender mdl7 exporter beta

Posted By: ventilator

new blender mdl7 exporter beta - 03/07/06 19:21



export_3dgs_mdl7.py ~45kb

finally the beta version with support for exporting animations as bone animation!

read the instructions at the beginning of the script. i think it's important that the armature and its mesh have the same origin and transformation (see the mesh&armature part of the tutorial in my signature). please report any problems!

the script still isn't in a good shape but it seems to work for my models so i decided to release it.



...
one thing i thought about recently... once the upcoming blender material nodes have a python api, i will experiment with compiling blender shader networks to hlsl code. at least for shader model 3 this should be possible. maybe it's out of my scope as a programmer though. in case this doesn't work out, some predefined customizeable (in blender) shader templates would be quite easy to add i guess.
Posted By: fogman

Re: new blender mdl7 exporter beta - 03/07/06 20:33

Uhhh - a lifesaver!!! Thanks!
Posted By: Ambassador

Re: new blender mdl7 exporter beta - 03/07/06 21:09

Dam di dam... *adds to his python script library*
Posted By: Blattsalat

Re: new blender mdl7 exporter beta - 03/07/06 22:06

sounds like a very good plugin! I will have to check this out.

thanks for sharing!

cheers
Posted By: ventilator

Re: new blender mdl7 exporter beta - 03/08/06 00:00

please download again!

i fixed a small bug. the skeleton very likely didn't display right in med when using the [world space] option (the bone animation itself should have worked correctly though even with the wrong looking skeleton).

i also added two small optimizations. bone animation matrices get only added if they are no identity matrices, animation vertices only get added if they are different to the main frame. this can make the model file a bit smaller.
Posted By: Anonymous

Re: new blender mdl7 exporter beta - 03/08/06 07:30

Great job ventilator, you're awesome!
Posted By: FeiHongJr

Re: new blender mdl7 exporter beta - 03/08/06 17:09

Awesome, Ive been working with blender alot latley. So im sure this will eventually come in handy once I work thru your animation tut.

I just figured out the uv mapping which is totally awesome compared to md2/six side mapping in med. Still havent figured it out entirely... Need help with understanding the use of pins more properly when doing lscm unwrap feature... Anyhow enough rambling.

I really appreciate all the work youve done...
Posted By: ulf

Re: new blender mdl7 exporter beta - 03/08/06 19:21

very nice! i was asking myself wich 3rd party modelling program does support bones and exports it right in gamestudio format. now i know that at least blender does.

great work ventilator, as always from your side. keep it up!

wich other modelling programs export bones right?
Posted By: Sinthoras

Re: new blender mdl7 exporter beta - 03/09/06 12:59

Yeah, thank you a lot!
I have waited for a mail for betatests, and didn't search for the post here.. I'm sorry
Some bug reports will come in future (if there are bugs), but please don't expect them very soon. We first have to come into the new blender armature system here..
Posted By: ventilator

Re: new blender mdl7 exporter beta - 04/12/06 23:55

please download the script again. omitting identity bone matrices didn't seem to be a good idea. it could lead to problems in some cases. i have to think about this feature again but it isn't really necessary anyway.
Posted By: FeiHongJr

Re: new blender mdl7 exporter beta - 04/13/06 15:54

Thanks Again Finally figured out how to export the animations too.

Think it had something to do with me trying to export the animations i set up in the nla editor. When i set up an animation in the actions and set it to play just the action and not the entire time line in the nla editor and it worked fine.

Or something like that still a lil confused on what i did exactally just know its working now So thank you very much
Posted By: ventilator

Re: new blender mdl7 exporter beta - 04/13/06 16:01

the nla editor has to be switched from "action mode" to "nla mode" by clicking on the icon next to the armature name. then all strips will be evaluated and not only the active one. i have covered this in my updated tutorial.
Posted By: JibbSmart

Re: new blender mdl7 exporter beta - 09/25/06 06:59

gday guys!

i feel stupid asking this but how do i use the exporter?

i downloaded it, put it in blender's plugin folder and that didnt work so i put it in the include folder in the plugin folder. i went to user preferences and pointed it to that folder, i hit "re-evaluate script registration in menus", and it still didnt work. i went to scripts->update menus and it still didnt work. can someone please point me in the right direction?

thanks guys

julz
Posted By: FeiHongJr

Re: new blender mdl7 exporter beta - 09/25/06 07:38

You should just have to place it in the plugins folder thats all that I did anyways... Then go to the scripts window click scripts>export and choose 3dgamestudio mdl7 (.mdl)

Do you have python installed on your computer? you may have to have that inorder for it to work. it can be found here
Posted By: ventilator

Re: new blender mdl7 exporter beta - 09/25/06 07:42

you have to copy it to .blender/scripts/ where all the other .py files are! a full python installation isn't necessary...
Posted By: FeiHongJr

Re: new blender mdl7 exporter beta - 09/25/06 07:48

ooops yea thats what I meant to say..

heres the directory where mine is

C:\Program Files\Blender Foundation\Blender\.blender\scripts

Its late forgive me
Posted By: JibbSmart

Re: new blender mdl7 exporter beta - 09/25/06 08:18

thanks guys will try that!

julz
Posted By: JibbSmart

Re: new blender mdl7 exporter beta - 09/28/06 07:19

works beautifully!!

just a thought: it would be really nice to be able to save baked soft-body animations in the vertex animation

this is wonderful. i love using blender and this exporter makes it SO easy to use with gstudio. thanks ventilator

julz
Posted By: ventilator

Re: blender mdl7 exporter - 09/28/06 09:19

actually i thought exporting soft body animation should work but i have never tested it.

since it doesn't work automatically i guess it would require converting soft body animation to shape keys or something like that. maybe there already is some script for that? i will look into it if i find some time...
Posted By: TheExpert

Re: blender mdl7 exporter - 09/28/06 09:38

Thanks a lot Ventilator

Blender is really in my opinion the best 3D oepn source and free modeler.
It's the main tool i use , more fast to use than 3DSMAX for me and
really powerfull and complete.

Thanks again , i'll try it soon.
Posted By: JibbSmart

Re: blender mdl7 exporter - 09/28/06 12:30

yeh i thought soft body export would work too in the vertex animation. even when it was exporting and it went through all the frames it showed the soft body, but i opened it in MED and all the frames were the same as the first (i made sure i exported a decent amount of frames).

ur plugin is a life-saver tho

julz
Posted By: Anonymous

Re: blender mdl7 exporter - 09/30/06 21:22

Excellent, thanks a lot! Now, to get a version of 3DGS that actually supports bones...
Posted By: ttphilipp

Re: new blender mdl7 exporter beta - 11/19/06 12:59

Hi,
is the exporter from the first reply up-to-date?
Or is there a newer one?

I'm asking because with the exporter from the first reply I can't export more than one texture from blender to MED.

Thanks
Posted By: Abrahim

Re: new blender mdl7 exporter beta - 11/22/06 20:50

Hi I jusr bought 3DGS Commercial Edition and tried the bone animation export but it didnīt work.
Obviously Iīm doing something wrong, because the first time I tried The animation went fine to MED but there were no bones (the bones get exported right?).
And now I can only export vertex animations if I press the little "b" for bones animations no frame is exported.
So what am I doing wrong? I bet is something really stupid.
Posted By: ventilator

Re: new blender mdl7 exporter beta - 11/22/06 20:59

follow the link in my signature or look on the wiki to find the latest version of the exporter (but if i remember correctly the first post of this thread links to the latest version too).

you can look at my animation tutorial to check if you do everything right (it also shows how to apply textures). one reason for missing animations could be that you have no 3d-viewport with your model visible during exporting.
Posted By: Abrahim

Re: new blender mdl7 exporter beta - 11/22/06 21:05

Yeah I know that once, but I have a 3d viewport visible during the export.
Iīll keep looking into it.
Do I need to select the bones?
What about the NLA editor, is there something specific I must do there?
Posted By: ventilator

Re: new blender mdl7 exporter beta - 11/22/06 21:07

if you can't find the reason you could also upload or send me the model so i can have a look.

yes, the nla editor has to be switched to the mode where all strips get evaluated. i forgot the name of this mode but my tutorial shows it.
Posted By: Abrahim

Re: new blender mdl7 exporter beta - 11/22/06 23:25

Dear Ventilator here is a link to my model (hope it works).
godinho.zip

I tried switching to Action and NLA in the NLA editorbut nothing has changed, maybe itīs the bones names, or the orientation (wich I also changed to match your tutorialīs).

Thanks man!
Posted By: ventilator

Re: new blender mdl7 exporter beta - 11/22/06 23:47

nice model! the reason is that your armature isn't the parent of the model. my exporter requires that. it's explained in the rigging & constraints section of my tutorial.

to fix it do the following:

- select your model
- then additionally select the armature
- press [ctrl-p] and choose "armature" and "don't make groups"
- in your model's modifier tab remove the armature modifier and click "make real" on the armature parent deform

there also seem to be some weight painting issues on the hands but they should be easy to fix.
Posted By: Abrahim

Re: new blender mdl7 exporter beta - 11/23/06 00:20

Great man,

sorry I only watched your blender to mdl7 tutorial.
That solved it all. I just couldnīt find that weight painting on the hand. In Blender the hands are fine, I think Iīll have to fix it in MED.

Thanks again. Great plugin.
Posted By: ventilator

Re: new blender mdl7 exporter beta - 11/23/06 00:43

blender supports multiple bones per vertex and a6 still only one bone per vertex. so it could be a problem with that!

my exporter always takes the strongest bone influence and usually this works ok but try to make sure that the problematic vertices at the hands only use one bone.

also disable envelopes in the armature tab since they could have some influence in blender too and my exporter doesn't care about them.
Posted By: eleroux

Re: new blender mdl7 exporter beta - 05/05/08 15:51


After very little struggle, and following this thread carefully, got the exporter to work right away! Very nicely done. And saving export settings per-blender file is a lifesaving!

Is the exporter up to date? Some people recommend using FBX but I think it's a bit harder. Thank you for this nice tool.
Posted By: Quad

Re: new blender mdl7 exporter beta - 05/05/08 15:56

errm, since the last post of the topic is 1.5 years old, i dont think it is up to date.
Posted By: ventilator

Re: new blender mdl7 exporter beta - 05/05/08 16:35

 Quote:
Some people recommend using FBX but I think it's a bit harder.
in in my experience directly going to the format you need usually is the least hassle (especially with animation). \:\)

the exporter isn't really outdated but the mdl7 format features some new things like bone weights and soon a second uv-set which could be supported in the future.
Posted By: eleroux

Re: new blender mdl7 exporter beta - 05/08/08 05:49

It would be great to have it updated but i don't think it's a rush. I think the bone weights are only for the PRO version of the engine, right? Not that it isn't worth supported by the exporter, of course, but not necessarily a popular request...

Side by side, I'd say the FBX exporter is more 'sophisticated'. It allows to export whole scenes into WED as well as models into MED. But it is a little less documented on the 3dgs side, since is a generic-purpose. It doesn't have the useful 'Save Settings' feature, among other things. And it's a bit harder to have models correctly oriented. A tute about FBX and 3dgs could be a great idea, if anyone feels like making one.

By the way, a small annoyance is that orientation in 3dgs is non standard. It would be enough that most applications have their own coordinates, but... despite any conversion, 3dgs models have always faced to the side! That makes things harder when importing and transforming models.. unless you are used to use the side view as front view in blender and other apps... or you start coding from scratch in Lite-C in a different way (better of course) that with the orientation used in all the old templates. Or it's me who is outdated?



Posted By: JibbSmart

Re: new blender mdl7 exporter beta - 05/08/08 09:05

just think of it this way: in GS, x-axis is forward, y-axis is to the side, z-axis is vertical. use that in blender, and it should work fine \:\)

julz
Posted By: eleroux

Re: new blender mdl7 exporter beta - 05/08/08 20:56


well... it's a little twisted since all good blender tools for symmetry rely in X-axis mirrors, specially when creating armatures. Not sure if I want to see FRONT written in the view where my character shows me his left...

I guess it wouldnt be a real problem to code everything in GS with X axis pointing to the side.. if I don't use any of the templates? Or do as I have been doing, just globally transforming the character.
Posted By: ventilator

Re: new blender mdl7 exporter beta - 05/08/08 23:36

it shouldn't be a big problem to just rotate your models before export?

...
i just noticed a bug which seems to happen because of a new python version. if you get some warning about something being deprecated you have to replace all 65536 with 65535 in the script. otherwise you could get some wrong bone animations.
Posted By: eleroux

Re: new blender mdl7 exporter beta - 05/09/08 00:13

The MED Transform Model Global tool just does the trick by rotating the character so it faces Right. In Blender, I prefer to keep things right (i mean.. FRONT..)
Posted By: maybenew

Re: new blender mdl7 exporter beta - 05/29/08 11:54

hi, great exporter!
is there a way to export all frames of a blender-file into a MDL file without typing in the frames manually?
Posted By: Rondragor

Re: new blender mdl7 exporter beta - 06/25/08 05:17

Do you have a new link? "Page cannot be found"
Posted By: ventilator

Re: new blender mdl7 exporter beta - 06/25/08 05:24

Quote:
is there a way to export all frames of a blender-file into a MDL file without typing in the frames manually?
no, but it would be easy to hack in such functionality.

...and in future versions i will maybe completely remove the need for manually defined animation sequences and make this based on blender actions.

Quote:
Do you have a new link? "Page cannot be found"

export_3dgs_mdl7.py

...
by the way, if you are a blender user then you also might find this interesting: http://www.coniserver.net/ubb7/ubbthreads.php?ubb=showflat&Number=208440&page=1
Posted By: ratchet

Re: new blender mdl7 exporter beta - 08/26/08 11:02

Thanks Ventilator for having created this plugin.
It's a great thing for the community.

I have a question :
in your video tutorial you say export vertex animations also ? i exported only bones , and the animation is OK in MED.

I encountered a problem (i use Blender 2.47) :
Well i don't know why but in the window all buttons are at bottom , and when i choose more than one animation to add
the export button is no more visible ?

I have a little suggestion :
entering animation frames is very tedious.
why not just asking a frame start and the frame stop ?
It would be really helpfull.


With your plugins (animated/static models, levels and lightmaps) , Blender (extremely powerfull and free) should be the official tool , and why not having a section to it in the forums ?

Posted By: Nowherebrain

Re: new blender mdl7 exporter beta - 08/26/08 12:29

Yes implementing via action keys, or frame range would be much more helpfull...I'm just really lazy.
Posted By: ventilator

Re: new blender mdl7 exporter beta - 08/26/08 13:11

you can scroll the gui of the exporter by dragging it with the middle mouse button. or doesn't this work anymore with 2.47?

i agree that entering animation frames manually is tedious. when i wrote the exporter i wasn't really an expert with blender and did some things in the same way as i did with my old maya exporter. probably it would be better to get the animations from the blender actions automatically. i will try to do it this way once i find some time to overhaul the exporter. i also plan to support bone weights.

Quote:
in your video tutorial you say export vertex animations also ? i exported only bones , and the animation is OK in MED.
you can export both like you want. they don't depend on each other. i exported both at the same time just for the example.
Posted By: ratchet

Re: new blender mdl7 exporter beta - 08/26/08 14:36

In fact perhaps i should re install pilot mouse !
caus i can scroll others things, why nor in Blender ?
Strange !

For animations export , entering a frame start and a frame stop could do the job already.(Caus i create only one action and make all animations in it).
It will be lot less work to you to modify in that way.

For bones weights , i have commercial version of A7
so only one bone per vertex is supported !!
So your script is perfect (it chooses the closest bone influence).
But ,if you make bones weights, you could keep a button to choose:
- "closest bone per vertex" or
- "multiple bones per vertex"
that way , commercial version owners and pro others
will be each happy smile



Posted By: Ness

Re: new blender mdl7 exporter beta - 08/11/09 18:48

Does this Plugin Supports the newest Blender?
I get a very bad error!
Posted By: djfeeler

Re: new blender mdl7 exporter beta - 08/23/09 16:37

hello,

I tried your script with blender 2.49a and I have an error code has the line 529 syntax error.

Thanks in advance for your help.
Posted By: Pappenheimer

Re: new blender mdl7 exporter beta - 08/23/09 17:13

I can only assure you that it works with blender 2.48a, which is the release coming with the Yo Frankie! project.
Posted By: sadsack

Re: new blender mdl7 exporter beta - 10/22/09 18:33

Is there a plugin to export WED
Posted By: Germanunkol

Re: new blender mdl7 exporter beta - 10/24/09 05:41

you can load the .mdl files into wed using Object->Load Entity, after exporting them from blender. I doubt there'll be an export from .blend to .wmp or wmb, if you mean blocks. So export the models from the .blend to .mdl and then reset lights in WED.
Posted By: penut

Re: new blender mdl7 exporter beta - 10/24/09 06:09

WOOT!!!!
Posted By: Galen

Re: new blender mdl7 exporter beta - 09/27/10 16:57

Originally Posted By: djfeeler
hello,

I tried your script with blender 2.49a and I have an error code has the line 529 syntax error.

Thanks in advance for your help.


I get this exact same problem but with 2.49b. I'm going to try regressing to version 2.48a and see if that solves it.

EDIT: the regression worked and I was able to export the model. Would be great though if the script could be updated to work in the latest Blender version.
Posted By: Pappenheimer

Re: new blender mdl7 exporter beta - 09/27/10 18:44

Further informations -->

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=208440&page=9

http://www.oppl.com/downloads/export_gs_mdl7.py
(Don't know whether this is the version that works with 2.49b)
Posted By: Galen

Re: new blender mdl7 exporter beta - 09/27/10 20:14

Thanks!
Posted By: ratchet

Re: new blender mdl7 exporter beta - 09/27/10 21:31

You can export from Blender 2.49 an animated model in FBX format ! It works perfectly , you have just to import it in MED !
So easy !
Posted By: Galen

Re: new blender mdl7 exporter beta - 09/28/10 20:34

Strangely, when I tried that, the colors on my model were messed up. I wonder if it was because I was using bmp's for the textures?
Posted By: Pappenheimer

Re: new blender mdl7 exporter beta - 09/28/10 20:41

Hm, I don't remember whether I ever used bmp's, but tga's always worked for me.
As ratchet says, for animated models fbx is great. If you want to export multiple (non-animated) objects as models from one blend file, the $$m-exporter from ventilator works great.
Posted By: Dark_Light

Re: new blender mdl7 exporter beta - 09/16/19 15:19

I know this is a really old thread, but I need to ask if there is an updated version of this script. I tried to convert the script with Python's 2to3 script, and that didn't work, and I get syntax errors if I try running it as is. Some of the errors are easy to fix, but I have no idea how to code in Python. I've been searching online for a long time trying to find a way to fix it, but no luck. Much appreciation to anyone who can help. Thanks.
© 2024 lite-C Forums