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

SMD importer/exporter for blender, Updated Oct 27th

by Bobcatben Posted 28th Aug 2007 at 3:05 PM - Updated 27th Nov 2013 at 10:09 PM by Nysha
531 Thanks  Thanks     90 Favourited
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.

Download files

Filename Size Downloads Date

Size: 2.1 KB · Downloads: 7,191 · 29th Aug 2007
2.1 KB 7,191 29th Aug 2007

Size: 2.1 KB · Downloads: 8,379 · 29th Aug 2007
2.1 KB 8,379 29th Aug 2007

Key: - File was updated after upload was posted
Tip: You can click the magnifying glass to see the archive contents

Need help with downloading or installing content? Click here!
99 Comments / Replies (Who?)

Expansion/Stuff packs required:
Sims 2

99 Comments / replies (Who?)



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

Tags: #blender, #mesh, #export, #import, #smd