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
exporter updated to 0.5, added normalization of bone weights.
exporter updated to 0.4, added more error handlers and the ability to convert to triangles if the mesh has quads.
updated the exporter to 0.3, fixed a bug with not catching vertex groups without matching bones and crashing it.
updated the importer to 0.3, fixed bugs with normals and merging vertices's with different normals.
updated exporter to 0.2(fixed a bug with exporting a mesh with no skeleton, eg for non animated things like statues)
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.