Python programmers: Request for updated .smd imp/exp scripts for Blender

Users who are viewing this thread

FritZ_FretZ

Veteran
Hello,

I'm using a combination of Python v2.5/Blender v2.48a/BRFEdit v0.8.95/M&B v1.011 to create models and manage M&B files. I've had good success using .obj files for static models and using BRFEdit's append function with .obj's to create vertex animations; a suitable substitute for dealing with .MD3 files. However I still lack the ability to deal with rigged meshes, i.e. .smd files. Hellequin created some imp/exp scripts for Blender some time ago but they seem to be obsolete; Calling for the use of a combination of Python v2.4/Blender v2.44/BRFEdit v0.8.2/M&B v0.8xx. My first thought was to contact Hellequin and request and update, but he hasn't been active on the forums since February, so I'm assuming he's moved on to other things.

Since his scripts ( https://www.mbrepository.com/file.php?cid=3&id=411 ) did apparently work at one time, I'd have to think that a competent Python programmer shouldn't have too much trouble updating these.

Please... don't suggest that I use an alternative 3d modelling program. Blender ( http://www.blender.org ) is a very powerful, FREE piece of software available to everyone. I'm only asking for someone with the knowledge and expertise to step up to the plate and advance everyone's ability to add content to the current version of M&B using freely available, up to date programs. I'll even make a deal; If someone is willing to write functional imp/exp scripts for Blender, I'll write a tutorial on the easy way to use them to make your own clothing/armor meshes for M&B with Blender. As most of the information now available is either semi-obsoleted and/or based on programs that cost money, I'd think this would be quite a boon for the M&B modding community and for new members in particular.

Please help :smile:

FritZ
 
I'll add my voice to this. An smd. importer/exporter would be really great to have for Blender, especially as all the features necessary for complete modeling/texturing/rigging are there in program and free.
 
The fact that Blender is as powerful as Maya and Max, I think that it would be crazy not to use it.  I have been wanting a working script for quite a while now.  I am hoping that this request does not fall on deaf ears.  Having a working script would speed up the mod I am working on(Liberty or Death). 
 
Hail to you Blenderer!

First of all, sorry for my bad english, I try to draw summarily. Here is my solution, how to impot/export the rigged meshes, the SMD files in Blender. My combination is Python v2.5/Blender v2.46/BRFEdit v0.8.5/M&B v1.10.

For IMPORT SMD into Blender use this Half-Life 2 SMD importer script:
http://folk.uio.no/jonmd/blender/smdimport/smd_import_blender_v01b.zip

When you import an SMD file, select Static Mesh with Textures... You will get an error message. It's OK, check the console. You will find something like this:

"Expecting image "Textures/costumes5_skin.dds" to be found in same directory as SMD"

To solve this problem, create a Textures folder to the SMD file's directory. Copy the texture file into it. Rename the file as the console say. In my example, the name will be costumes5_skin.dds. That's all we need, now import the textured SMD into Blender.

For EXPORT SMD from Blender Hellequin's export script works fine:
https://www.mbrepository.com/file.php?cid=3&id=411

The only problem is, this script scale down the mesh 40 times. Not eat this little crow! Before exporting, scale up the mesh object (the mesh only, not the skeleton) to 40. Don' t be afraid, after the process it will fit to the bones fine.

Because I'm a Blender tinker, not a programmer, I do not see into the scripts. So, this method I've wrote is simply empirical.
I hope it will works for you too!  :wink:


 
This is an old thread, but I cannot for the life of me figure out how to install the stupid scripts. Anyone know?
 
Your scripts should go into something like this.
C:\Documents and Settings\amade\Application Data\Blender Foundation\Blender\.blender\scripts

There should be several .py files in the folder.

P.S. anyone has a link to an alternative SMD importer? I'm using one which gave me an option to import SMDs without textures as well as with textures but I can't remember where I got it from... I think it works better than the one in this link.
 
According to my computer, such a folder doesn't exist. There's no file nor folder in \Blender Foundation\Blender called '.blender', and I'm getting really irritated. I really wish more programs had smd importers so that I could use them instead of Blender.
 
Try searching for this file: uv_seams_from_islands.py
It's one of the bundled scripts in Blender, so it should lead you to the .blender folder.

Btw, what version are you using? And is it the 32bit or 64 bit?
 
I'm using the latest version that Blender had on its website.

I think I'm just going to give up on the smd's- I was going to try to edit and add in some new battle-type animations and maybe some flavor objects for the map, but this is just too complicated for me, I think.
 
Predak, SMD's are for rigged objects like armors and boots, horses. I don't know any modder, who can create new animations for M&B just with 3D application. Programmers can change them, by transcribe the python codes. To create new map objects, you can use .obj files. Then you can chain them togeather in BRF editor, because map objects are not rigged to skeletons, but they have key frames. 
 
You can't export animation sequence with Hellequin's script but I did find another that can and with openBRF (developed by mtarini) you can make new animations.

Problem is that the export script I found outputs SMDs that openBRF can't read... yet.
 
What is the console message, and the name and extension of the image file you have copied into the Textures folder?
 
You need to put costumes13_skin.dds in the same directory as the SMD you're trying to import. If that doesn't work, put it in a folder called "textures" (or just "texture", I can't remember which) and put that folder in the same directory as your SMD. If that still doesn't work, rename the dds file to costumes13_skin without the extension and try the two methods again. The texture itself can just be a dummy texture file.

There's an alternate SMD import/export script that gives you the option to load SMDs without loading the textures but I can't remember where I downloaded it from.
 
amade said:
You need to put costumes13_skin.dds in the same directory as the SMD you're trying to import. If that doesn't work, put it in a folder called "textures" (or just "texture", I can't remember which) and put that folder in the same directory as your SMD. If that still doesn't work, rename the dds file to costumes13_skin without the extension and try the two methods again. The texture itself can just be a dummy texture file.

There's an alternate SMD import/export script that gives you the option to load SMDs without loading the textures but I can't remember where I downloaded it from.
I tried all of that several times to no avail, is it possible that my version of Blender or the fact that I'm using Windows 7 could be causing the problem?
 
Yes, looks like Blender searching for your image without extension, in the same directory where the SMD is. I don't think that Blender version could be a problem, my combination is Python v6.2/Blender v2.49.2/BRFEdit v0.8.5/M&B v1.10 for now. There were no problem with versions since v2.46 - well, I didn't tested all -, but my system is an old XP, not W7. 

amade said:
There's an alternate SMD import/export script that gives you the option to load SMDs without loading the textures but I can't remember where I downloaded it from.

HalfLife2 SMD importer has that option, it have to work without texture image, but if I remember well all UV data will vanish with it. Not so good if you want to use the original UV layout.
 
DtheHun said:
Yes, looks like Blender searching for your image without extension, in the same directory where the SMD is. I don't think that Blender version could be a problem, my combination is Python v6.2/Blender v2.49.2/BRFEdit v0.8.5/M&B v1.10 for now. There were no problem with versions since v2.46 - well, I didn't tested all -, but my system is an old XP, not W7. 

amade said:
There's an alternate SMD import/export script that gives you the option to load SMDs without loading the textures but I can't remember where I downloaded it from.

HalfLife2 SMD importer has that option, it have to work without texture image, but if I remember well all UV data will vanish with it. Not so good if you want to use the original UV layout.

Actually it also gives you the option to import it with the UV and material (and leads to that console error message telling you to put the DDS file in the proper place). So if I want to preserve the UV I still can.
 
Back
Top Bottom