MTS has all free content, all the time. Find out how YOU can help to keep it running. Tell me how...

Picked upload! SMD importer/exporter for blender, Updated Oct 27th

by Bobcatben Posted 28th Aug 2007 at 2:05 PM - Updated 27th Nov 2013 at 9:09 PM by Nysha
105 Comments / replies (Who?) - 3 Feedback Posts, 3 Thanks Posts
Picked Upload! This is a picked upload! It showcases some of the best talent and creativity available on MTS and in the community.
these plugin scripts for blender will allow you to import and export smd's tailored for the sims 2 for use in simpe.

(i will be updating these every so often as i find bugs/other people tell me about bugs so check the updates at the bottom if you use it)

smd is much more flexible for sims 2 modeling then .obj's

my desire to make this started when i tried to make speakers that could sit on the floor, or on a counter instead of hanging on the wall, and SimPE started misreading the vertex/face count of my .obj's and refusing to import them, then when i found out if i wanted to make a body mesh i couldn't make new/delete vertices's, only move them.

so over the past few days i wrote these 2 scripts for blender, 1 which imports a skeleton/mesh from a smd, and 1 that exports.

ive been testing it since last night and new vertices's work, as do bone weights.

the 2 .py files go in the .blender/scripts/ folder of your blender folder(default is c:/program files/blender/.blender/scripts/), the scripts work in linux too(tested) and most likely on Mac's as well.

the importer is simple enough to use, to export, you need the mesh to be parented to the skeleton(the meshes import this way with the importer to see what i mean), it uses vertex group bone weights for the bone weighting(also imports this way), if no set of bones with a mesh is found, it exports the first mesh it fines, with a dummy bone in the finished smd.

Some common things that might trip you up when exporting..
1, if you have to scale/rotate your mesh from object mode, hit ctrl+A
afterward to apply the scaling/rotation to the actual mesh.

2, dark edges at the ends of shirt sleeves and pants legs is caused by 2 differing angled faces sharing a edge, just apply a edge split modifier to the mesh, and tweak the angle setting till it looks good.

3, if you change bone weights/add new vertices, make sure the total bone weighting for a given vertex is always equal to 1.0(this can cause problems once in game) i may add the option to the exporter to balance any slightly under/overweighted vertices in the future.

4, also, never have more then 4 bones weighting to a single vertex(sims 2 only supports up to 4 bones per vertex)

5, if your mesh has a skeleton(ie, its a body mesh) always have the mesh parented to the skeleton(which can be added to blender by importing a default body mesh and deleting the mesh itself), if it is a static mesh, no bones are needed.

please let me know if theres any improvements i could make/bugs i need to fix

Version updates:
Oct 27th: exporter updated to 0.5, added normalization of bone weights.

Sept 22nd: exporter updated to 0.4, added more error handlers and the ability to convert to triangles if the mesh has quads.

Sept 20th: updated the exporter to 0.3, fixed a bug with not catching vertex groups without matching bones and crashing it.

Sept 12th: updated the importer to 0.3, fixed bugs with normals and merging vertices's with different normals.

Aug 29th: updated exporter to 0.2(fixed a bug with exporting a mesh with no skeleton, eg for non animated things like statues)


Additional Credits:
many other exporter/importer scripts in blender that i looked to for reference/how todo stuff, and the half life smd exporter(doesn't work with sims smd's) that i learned how get the bone rotations from.
Tags: #blender, #mesh, #export, #import, #smd

Operating System: Windows Linux Mac OS X
Utility Type: Meshing Tools
Plugin Type: Blender

You must have the expansion or stuff packs listed below installed to use this custom content. Please see the post text for any exceptions.

Sims 2
Key: - File was updated after upload was posted
Filename - Tip: You can click the magnifying glass to see the archive contents Size Downloads Date
export_smd.zip

Size: 2.1 KB · Downloads: 7,117 · 29th Aug 2007
2.1 KB 7,117 29th Aug 2007
import_smd.zip

Size: 2.1 KB · Downloads: 8,307 · 29th Aug 2007
2.1 KB 8,307 29th Aug 2007
Don't forget to Thank the creator after downloading! Use the Thanks button located above the screenshots above.
Basic Download and Install Instructions:

1. Download: Click the download link to save the .rar or .zip file(s) to your computer.

2. Extract the zip, rar, or 7z file.

3. Place in Downloads Folder: Cut and paste the .package file(s) into your Downloads folder:
  • Origin (Ultimate Collection): Users\(Current User Account)\Documents\EA Games\The Sims™ 2 Ultimate Collection\Downloads\
  • Non-Origin, Windows Vista/7/8/10: Users\(Current User Account)\Documents\EA Games\The Sims 2\Downloads\
  • Non-Origin, Windows XP: Documents and Settings\(Current User Account)\My Documents\EA Games\The Sims 2\Downloads\
  • Mac: Users\(Current User Account)\Documents\EA Games\The Sims 2\Downloads
  • Mac x64: /Library/Containers/com.aspyr.sims2.appstore/Data/Library/Application Support/Aspyr/The Sims 2/Downloads
Need more information?
 
105 Comments / Replies (Who?) - 91 Feedback Posts, 7 Thanks Posts
Hide Thanks Posts for this thread (Show only feedback)
Page 5 of 5
Test Subject
#101 Old 13th Feb 2013 at 3:35 AM
Quote:
Originally Posted by Effelenn
Well, since Bobcatben hasn't been around MTS since July, I suppose I can offer some help here.

First off, (and no offense to Bobcatben) this mod was first posted in 2007, making it outdated by more than four years. My experience with this script is that one has to have a VERY OLD version of Blender in order for this to work. The good news is that a lot of improvements have been made to Blender and SimPE since then.

"Blender SMD Tool" can be found through the URL below. It is from Oct. 2011 and was made for Blender v2.60. (Latest version is 2.61 at time of post.) Click the URL for more details.
https://developer.valvesoftware.com...ender_SMD_Tools

As for SMD support in SimPE, the Mansion and Garden stuff Patch fixes that. Download and read more here:
http://www.drealm.info/simlogical/S...mpeMGUpdate.htm

I hope that helps!


Thank you SO much! I literally spent hours trying to figure out how to get this to work and the script you mentioned took all of 3 minutes to figure out. What a relief!
Field Researcher
THANKS POST
#102 Old 25th Oct 2013 at 2:45 PM
Thank you, you did a great job.
Test Subject
#103 Old 21st Apr 2014 at 7:15 PM Last edited by TheKeeper81 : 21st Apr 2014 at 9:38 PM.
Quote:
Originally Posted by Effelenn
Well, since Bobcatben hasn't been around MTS since July, I suppose I can offer some help here.

First off, (and no offense to Bobcatben) this mod was first posted in 2007, making it outdated by more than four years. My experience with this script is that one has to have a VERY OLD version of Blender in order for this to work. The good news is that a lot of improvements have been made to Blender and SimPE since then.

"Blender SMD Tool" can be found through the URL below. It is from Oct. 2011 and was made for Blender v2.60. (Latest version is 2.61 at time of post.) Click the URL for more details.
https://developer.valvesoftware.com...ender_SMD_Tools

As for SMD support in SimPE, the Mansion and Garden stuff Patch fixes that. Download and read more here:
http://www.drealm.info/simlogical/S...mpeMGUpdate.htm

I hope that helps!


I downloaded and installed the SMD Tools as per the instructions on their web site, as well as downloaded and installed the SimPE patch, making sure to still do step 8, when using the self-extracting download. I used the instructions from http://www.sim-oasis.com/forums/ind...g70222#msg70222 to extract and export a test mesh, but when I tried to import it into Blender, either nothing seems to happen, or I get an error. So I'm fairly sure I did something wrong along the way, but I'm not sure what. I have Windows Vista 64, and I made sure that both programs are running in administrator mode (the most common issue I have when something isn't working correctly). I'll try another test mesh, though, just in case the problem might have been with what I had originally tried to clone. Oh, and am I supposed to still install the script by Bobcatben and updated by Nysha?

EDIT:
I tried another clothing item, and I still don't see anything when I import it. I even found another tutorial I tried to follow along with, to see if maybe I got the steps wrong. http://modthesims.info/t/248699 But I'm still getting the same result: I click on the smd file I want to import, click the import button, and I'm presented with a scene with nothing in it, save for the camera and lamp object. I am using the latest version of Blender, which is 2.70a, and using version 2.0.3 of the Belnder Source Tools. I'm going to see if I actually get this working by using version 2.66, which is the minimum version of Blender they recommend, just in case there is something with 2.70a that may make this add-on incompatible with it.

EDIT 2: Still no dice. I'm going to simply try downloading the version of Blender that's compatible with the files, here, and see if that works.

EDIT 3: After a bit of experimenting, I was able to get the import/export scripts from Bobcatben working correctly. I have the 64 bit version of Windows Vista, and as such, I naturally downloaded the 2.49b version of Blender for the 64 bit version of Windows. DON'T. For whatever reason, the 64 bit version of Blender 2.49b will not properly run the scripts. Instead, install the blender-2.49b-windows.zip file, dated September 2, 2009, and extract it into your Programs (x86) folder, then install the import/export scripts into the .blend/scripts folder. Now, if you prepared your mesh file correctly (I followed the instructions from here: http://modthesims.info/t/248699), you'll find you can import it into Blender without further issues. I can only confirm that this works with Windows Vista 64 bit OS. I can't confirm whether you'll get similar results with later versions of Windows. I hope this helps others having similar issues with getting Bobcatben's import/export scripts to work!

I still don't know why the Blender SMD Tool didn't work with importing the smd mesh. I even installed the 32 bit version of Blender, to see if it was a similar problem. I'll probably still try to figure it out, later (I actually still have 2.70a installed, as well), but it's good to know that, no matter what, I can at least get them imported into the 2.49b version of Blender, and work from there.
Test Subject
THANKS POST
#104 Old 29th Jul 2014 at 9:15 PM
Thank you ! :)
Test Subject
THANKS POST
#105 Old 9th Oct 2014 at 8:28 PM
This is great I just got back in to Sims 2 after a few years and being a 3D artist this is a great tool for me to practice and to give to the community at the sametime and for that I give you my thanks.
Test Subject
#106 Old 1st Nov 2014 at 6:42 AM
Please what this is for?
Page 5 of 5