Home | Download | Discussion | Help | Site Map | New Posts | Sign in

Latest Site News

Nysha's New Creators for July - posted on 1st Aug 2018 at 9:00 AM
Replies: 24 (Who?), Viewed: 5160 times.
Test Subject
Original Poster
#1 Old 28th Apr 2018 at 11:16 PM
Working on a GMDC Importer/Exporter for Blender 2.7x
I'm currently working on a GMDC importer exporter for Blender versions, since both the SMD and old GMDC importer no longer work for newer blender versions.
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.
Advertisement
Mad Poster
#2 Old 29th Apr 2018 at 1:38 AM
Me no, but I am sure @simmer22 would be interested in this.
By that I meant..I am interested, but I have no ideas. hehe

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS ;)
Mad Poster
#3 Old 29th Apr 2018 at 2:52 AM
I'd be very interested in Blender plugins (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), but I have no idea how to make plugins or addons. Whatever programming knowledge I have is limited to SimPE and package files.

Maybe have a look at the old plugins to see how they did it?
Field Researcher
#4 Old 29th Apr 2018 at 1:42 PM
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.

Quote:
Originally Posted by simmer22
(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.
Test Subject
Original Poster
#5 Old 29th Apr 2018 at 1:54 PM
Quote:
Originally Posted by Chris Hatch
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.
Lab Assistant
#6 Old 30th Apr 2018 at 12:16 AM
This is a great and applaudable idea for a project. To be able to directly import/export GMDC or SMD between SimPE and Blender would be wonderful. I regret I don't know enough programming to be any assistance, but would be glad to test such an addon, or enthusiastically use it to clone articulated objects. Looking forward to seeing this succeed.

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.
Test Subject
Original Poster
#7 Old 1st May 2018 at 10:55 AM
I've managed to extract the bone information from the CRES and I'm using it to create vertex groups now.
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.

Test Subject
Original Poster
#8 Old 3rd May 2018 at 4:49 PM
So it turns out I didn't need to read the CRES file at all, would have liked to know that before I spent 2 days on it but oh well.
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...
Mad Poster
#9 Old 3rd May 2018 at 5:05 PM
Oh cool! I do not use Blender, but I am glad for everyone who does! This is great.

Je mange des girafes et je parle aussi français !...surtout :0)

Find all my old MTS Uploads, on my SFS ;)
Instructor
#10 Old 3rd May 2018 at 9:33 PM
Quote:
Originally Posted by Rosebine
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.
Test Subject
Original Poster
#11 Old 4th May 2018 at 4:54 PM
Another quick update, I've managed to properly import bone assignments and morphs now.
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).

Test Subject
Original Poster
#12 Old 5th May 2018 at 11:42 PM
I've managed to get exporting to work


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.
Mad Poster
#13 Old 6th May 2018 at 8:21 PM
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).
Instructor
#14 Old 6th May 2018 at 8:58 PM
Quote:
Originally Posted by simmer22
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?
Mad Poster
#15 Old 6th May 2018 at 9:30 PM
(I meant as a help for SmugTomato in the creation for the new plugins, in case there's some code or ideas they can use from the old ones )
Test Subject
Original Poster
#16 Old 6th May 2018 at 9:46 PM
Quote:
Originally Posted by simmer22
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
Instructor
#17 Old 6th May 2018 at 10:17 PM Last edited by Squidconqueror : 6th May 2018 at 10:39 PM.
Quote:
Originally Posted by SmugTomato
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.
Test Subject
Original Poster
#18 Old 6th May 2018 at 11:00 PM
I'm currently trying to deal with the following issue:


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.
Mad Poster
#19 Old 7th May 2018 at 12:52 AM
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...)
Instructor
#20 Old 7th May 2018 at 3:48 AM
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.
Test Subject
Original Poster
#21 Old 7th May 2018 at 6:04 AM
Quote:
Originally Posted by simmer22
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.
Test Subject
Original Poster
#22 Old 7th May 2018 at 6:11 AM
Quote:
Originally Posted by Squidconqueror
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.
Mad Poster
#23 Old 7th May 2018 at 1:07 PM
Quote:
Originally Posted by SmugTomato
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.
Test Subject
Original Poster
#24 Old 7th May 2018 at 4:42 PM
Quote:
Originally Posted by simmer22
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.
Test Subject
Original Poster
#25 Old 7th May 2018 at 10:12 PM
I feel like despite some issues, the add-on is ready for it's first release at this point.
I've started a thread looking for testers here.
Back to top