- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Modding Discussion >
- Working on a GMDC Importer/Exporter for Blender 2.7x
- Site Map >
- Modding and Creation >
- Sims 2 Creation >
- Modding Discussion >
- Working on a GMDC Importer/Exporter for Blender 2.7x
Posts: 231
Thanks: 1026 in 5 Posts
So far I've managed to import the actual geometry and uv coordinates, but I'm not sure how to go about importing the skeleton and bone weights.
My problem is that the GMDC doesn't actually contain any info on the bone hierarchy and names, it only contains index values for them.
One option could be to save some skeletons in the addon folder and allow one to be imported along with the file through a dropdown menu,
this would not support a custom skeleton for an object though
Another option could be to also read the CRES file and extract the necessary bone information from that, but I'm not sure if that would be worth the effort over the above method.
This would however allow the importer to name all bones properly, even for custom object skeletons.
Perhaps some of you have some ideas on the matter.
Posts: 7,361
Thanks: 2940 in 27 Posts
Posts: 12,936
Thanks: 3 in 1 Posts
Maybe have a look at the old plugins to see how they did it?
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,055
(I'm kinda getting used to Blender now - it's not too bad, I just struggle with finding menus and remembering all the weird shortcuts that don't make sense) |
The trouble is once I've used Blender for a while and got used to it's obscurity it's difficult to go back to any 'normal' program.
Posts: 231
Thanks: 1026 in 5 Posts
The current smd import/export plugins for SimPE work just fine (the exporter does use the CRES for bones). It's the smd plugins for Blender that need updating/re-writing for the newer versions. The trouble is once I've used Blender for a while and got used to it's obscurity it's difficult to go back to any 'normal' program. |
Yes, I did mean the blender part. It would need a complete rewrite at this point since the orignal one was made for blender 2.4 and the source SMD tools don't support the sims 2 format, that's why I figured I may as well go for importing a GMDC file directly. I'm currently trying to decipher the CRES file structure to extract the bone information, it will probably take a me a couple of hours to get anywhere with this recursive nightmare of a file.
Posts: 448
Thanks: 4266 in 42 Posts
Since I learned with Blender, it seems to me the most natural and easiest mesh manipulator. I've made a couple attempts at using Milkshape to clone/reshape some recliner meshes, but failed abyssmally since I get so lost in the strange controls.
Posts: 231
Thanks: 1026 in 5 Posts
It will be another while until I can import morphs and the actual skeleton with bone weigths, but the worst part (of importing) should be over now.
Posts: 231
Thanks: 1026 in 5 Posts
It turns out the skeleton data is actually stored inside the GMDC as well, the documentation on The sims wiki just didn't state it as such.
After lots of frustration and being bullied by Quaternions I've finally managed to import the skeleton.
Next up are bone weights, morphs and redoing the vertex groups. All of those shouldn't be too difficult, but who knows...
Posts: 7,361
Thanks: 2940 in 27 Posts
Posts: 1,073
Thanks: 134 in 4 Posts
Oh cool! I do not use Blender, but I am glad for everyone who does! This is great. |
I have Blender but I don't use it because I don't know how to work it. Maybe I should start watching more tutorials so that I would know it better.
Posts: 231
Thanks: 1026 in 5 Posts
The next step would be making the exporter so it can actually be used for making Sims 2 meshes.
Right now it should be possible to leave the exporting step to Milkshape though(In case people want to try it I'll leave the github link here).
Posts: 231
Thanks: 1026 in 5 Posts
As you can see there's still some things to fix, mostly related to vertex normals. (And refactoring some messy code)
I should probably start a thread looking for testers soon.
Posts: 12,936
Thanks: 3 in 1 Posts
Maybe it can help?
I'm wondering if it will be possible to edit comments, because those are very important for meshing projects. They're also important for making animations, because some of the hair bones need to be deactivated (or they make the hair fly everywhere).
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
I stumbled upon this plugin while looking for something else: http://modthesims.info/download.php?t=572430 (It's for 2.49, can't remember which Blender version the older one was for) Maybe it can help? I'm wondering if it will be possible to edit comments, because those are very important for meshing projects. They're also important for making animations, because some of the hair bones need to be deactivated (or they make the hair fly everywhere). |
Thanks but I think that I prefer the newer versions of Blender over the older ones because the newer ones have newer and better features that the old ones don't have but I must say that the old ones look a lot simpler with the simple layout. I don't know i'm just used to the new one. Which one do you prefer?
Posts: 12,936
Thanks: 3 in 1 Posts
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 231
Thanks: 1026 in 5 Posts
I stumbled upon this plugin while looking for something else: http://modthesims.info/download.php?t=572430 (It's for 2.49, can't remember which Blender version the older one was for) Maybe it can help? I'm wondering if it will be possible to edit comments, because those are very important for meshing projects. They're also important for making animations, because some of the hair bones need to be deactivated (or they make the hair fly everywhere). |
Sadly the old plugin wouldn't have been of much use, The blender python api has changed a lot in the years since 2.49.
As for the comments, you can add custom properties containing strings or numbers to meshes and other objects in blender, I'm actually already using these to make things work
Posts: 1,073
Thanks: 134 in 4 Posts
Sadly the old plugin wouldn't have been of much use, The blender python api has changed a lot in the years since 2.49. As for the comments, you can add custom properties containing strings or numbers to meshes and other objects in blender, I'm actually already using these to make things work |
How do you do that? I would love to know because I would like to get into making meshes for Sims.
Posts: 231
Thanks: 1026 in 5 Posts
It doesn't appear to be the normal direction causing it, as the lighting comes from proper angles. The face direction also seems to be correct across the model.
Yet somehow other parts of the mesh are showing through it.
Posts: 12,936
Thanks: 3 in 1 Posts
Mesh pieces poking through or looking like they're see-through tend to either be a bug in the recolor file, such as the wrong setting (Blend?) in the TXMT, or something in the comments (Numsknweight less than 3). Can also be joint weights less than 100%.
Are you planning to make exporters for animations, too? That would've been awesome! I've got so many plans for poseboxes, but don't have access to Milkshape (My laptop refuses to install it, and my stationary where it is installed has a weird Bios problem I can't figure out, so I'm stuck with Blender...)
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 1,073
Thanks: 134 in 4 Posts
Posts: 231
Thanks: 1026 in 5 Posts
The UVmap and texture, maybe? If you look at the UVmap there's a line that doesn't match up right where the "tails" are. Mesh pieces poking through or looking like they're see-through tend to either be a bug in the recolor file, such as the wrong setting (Blend?) in the TXMT, or something in the comments (Numsknweight less than 3). Can also be joint weights less than 100%. Are you planning to make exporters for animations, too? That would've been awesome! I've got so many plans for poseboxes, but don't have access to Milkshape (My laptop refuses to install it, and my stationary where it is installed has a weird Bios problem I can't figure out, so I'm stuck with Blender...) |
The joint weight seems like a likely issue, I forgot to normalize all weights before exporting.
As for animations, I'd first have to know how they work. I've never worked with them in the sims 2 so I'd have no idea how to test it. I'd probably prioritize making a sims 3 geom import/export at some point after this.
Posts: 231
Thanks: 1026 in 5 Posts
I'm trying to test it out but Blender wouldn't read or recognize the files. I guess I would have edit the object file for the time being. |
You'll have to make sure to install the gmdc_blender folder inside the one you download as an add-on. It should be the first one with an __init__.py file.
You'll probably run into lots of issues in it's current state though, as it is still in a pre-alpha state.
Posts: 12,936
Thanks: 3 in 1 Posts
As for animations, I'd first have to know how they work. I've never worked with them in the sims 2 so I'd have no idea how to test it. I'd probably prioritize making a sims 3 geom import/export at some point after this. |
I honestly have no idea, but there's a chance it works similar to exporting TS3/TS4 animations. There was a tutorial by Jasumi (at the now dead SimOasis site) that explained how to make poses, possibly with Blender - but it's very likely I'm confusing it with a Blender/clothes tutorial by Tenshii Akari on the same site.
My stories: Anna's diary - Memories are forever - Little Fire Burning
Posts: 231
Thanks: 1026 in 5 Posts
The UVmap and texture, maybe? If you look at the UVmap there's a line that doesn't match up right where the "tails" are. Mesh pieces poking through or looking like they're see-through tend to either be a bug in the recolor file, such as the wrong setting (Blend?) in the TXMT, or something in the comments (Numsknweight less than 3). Can also be joint weights less than 100%. Are you planning to make exporters for animations, too? That would've been awesome! I've got so many plans for poseboxes, but don't have access to Milkshape (My laptop refuses to install it, and my stationary where it is installed has a weird Bios problem I can't figure out, so I'm stuck with Blender...) |
It were indeed the bone weights, I'm glad it wasn't something wrong with my exporter.
Posts: 231
Thanks: 1026 in 5 Posts
I've started a thread looking for testers here.
Who Posted
|