Blender export

This forum is aimed at user contributions, in the form of assets, side projects, code patches and similar.

Moderator: joepal

Blender export

Postby ThomasL » Tue Sep 15, 2009 8:33 am

Hi. After lurking here for some time, I have now written something which may be of interest for somebody: a way to export a weighted character from MakeHuman into Blender. The weighting could be better, but at least the character can open his/her mouth. And unlike the OBJ/BHV export, the mesh and the rig end up at the same place.

The first idea was to write a Blender file directly, but after some experimentation I got discouraged. The blend format is too complicated - basically a core dump plus some DNA code that defines how to interpret the data - and I don't think that a direct Blender export will be maintainable. Instead, I settled for a quick and dirty solution: a custom exchange format which I call MHX (MakeHuman eXchange). So I wrote an MHX exporter for MakeHuman and an MHX importer for Blender. The files can be downloaded from

http://rapidshare.com/files/280207275/m ... e.zip.html

Installation instructions are found in the file Readme.txt.

The same thing and more could certainly be achieved with Collada. But that would presumably take a lot of effort, whereas this code was written in a couple of days (or nights). Besides, Collada import for Blender seems to be somewhat broken
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Blender export

Postby Manuel » Tue Sep 15, 2009 9:43 am

I've replied you by email at your hotmail account ;-)

Best Regards,

Manuel
Manuel
 

Re: Blender export

Postby tjindy » Wed Sep 16, 2009 8:51 am

Great script.

For me working perfectly. Thanks for your work and sharing with others :D

Regards

tjindy
tjindy
 
Posts: 103
Joined: Sun Mar 01, 2009 9:01 pm

Re: Blender export

Postby ThomasL » Wed Sep 16, 2009 1:29 pm

The script has been reuploaded, hopefully in a way that evades the 10 downloads limit. The new link is
http://rapidshare.com/files/280368744/m ... change.zip
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Blender export

Postby Manuel » Thu Sep 17, 2009 7:51 am

An official download place, waiting the full integration :-)

http://www.makehuman.org/download/mhx_m ... change.zip
Manuel
 

Re: Blender export

Postby batteria » Thu Sep 17, 2009 4:15 pm

good job Thomas, thanks for having made life easier! :)
batteria
 
Posts: 3
Joined: Wed May 07, 2008 6:57 am

Re: Blender export

Postby bruno.chansou » Fri Sep 18, 2009 3:24 pm

Thanks very much for this.
bruno.chansou
 
Posts: 25
Joined: Sat May 31, 2008 1:16 pm

Re: Blender export

Postby Jeremy Ray » Sun Sep 20, 2009 5:24 am

Will this work with .9.1?
Jeremy Ray
 
Posts: 17
Joined: Mon Feb 18, 2008 6:41 am

Re: Blender export

Postby ThomasL » Mon Sep 21, 2009 8:39 am

Jeremy Ray wrote:Will this work with .9.1?


No. The Blender side will work, but two things on the MH side must be modified:

1. The exporter file mh2mhx.py needs to be changed. You can probably find out how by studying the other export scripts in the .9.1 distribution.

2. The .9.1 base mesh must be brought into Blender (I would try the Collada import), rigged, and exported back as a new mhxbase.mhx file. This can be quite a bit of work, especially since bone heat weighting failed on this mesh last time I looked.

I don't plan on doing this myself.
/Thomas
ThomasL
 
Posts: 1139
Joined: Tue Sep 15, 2009 2:46 am

Re: Blender export

Postby FishB8 » Fri Sep 25, 2009 3:31 pm

This is working on my linux machine, but I'm having problems with it on windows.

Seems to be issues with parsing the DOS style paths. I tried replacing the usage of the variables with the path strings, and that worked for some but not all.

Not familiar enough with python syntax (I HATE how it's so picky about tab spacing) or File functions to deal with it for now.

It would be really nice if it would register itself as an import script and allow the user to select the file within blender.

Python 2.6.2 and vanilla Blender 2.49b

P.S. There was a GSOC project to include the official Collada lib which greatly improved the import/export for 2.5. You might see if the lib provides an API to make export of Collada from MH less of a mess.
FishB8
 
Posts: 1
Joined: Thu Sep 17, 2009 4:30 am

Next

Return to User contributions

Who is online

Users browsing this forum: No registered users and 1 guest