Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Test Subject
Original Poster
#1 Old 28th Apr 2019 at 4:33 PM
Default Blender Issues
Hello,
I've been using blender and milkshape to do a mesh conversion from another video game for my own use.Probably should have picked a smaller project for my first time doing a complete meshing project for ts2. Everything was going fine until I felt mostly finished with my mesh and decided to export it. Besides issues with my normals from mirroring without checking them, I'm receiving an error message:

Traceback (most recent call last):
File "C:\Users\*username*\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_sims2gmdc\blender_export.py", line 92, in execute
b_models.append( ExportGMDC.build_group(ob, armature, bones) )
File "C:\Users\*username*\AppData\Roaming\Blender Foundation\Blender\2.79\scripts\addons\io_sims2gmdc\blender_export.py", line 267, in build_group
assign[i] = bonemap[assignment.group]
KeyError: 66

location: <unknown location>:-1

I'm wondering if the error with my bones is happening because I had to use join to add my mesh to the ts2 GMDC file? I'm using 2.79 so there shouldn't be compatibility issues with Smug Tomato's plugin. The other problem with the normal maps also doesn't seem to go away when I recalculate or flip the normals but I'm less concerned with that issue. I don't want to be a bother but I'd appreciate any help with the exporting issue. Thank you so much.
Advertisement
Mad Poster
#2 Old 29th Apr 2019 at 6:22 PM
Just to clarify, is it a clothing mesh?
Field Researcher
#3 Old 30th Apr 2019 at 9:10 AM Last edited by SmugTomato : 30th Apr 2019 at 9:31 AM.
I can't say much without being able to look at the blend file but it looks like you have too many bones, Could you upload the blend file so I can check what's going wrong?
Are you sure you're using a sims 2 skeleton and not the skeleton from the original mesh?
Test Subject
Original Poster
#4 Old 5th May 2019 at 1:20 AM
I apologize I thought i'd posted an update already I must've not hit post. I ended up just moving it as an obj to milkshape I think. I had imported a ts2 body base and I'm guessing that might have caused the problem with the bones, because I don't think I imported any with the clothing mesh, at least that's what it seems to suggest when i look at the layers of my blend file. In any case I just switched around my workflow so I'm only editing it as an OBJ in blender and doing the rest of my work in milkshape. There were no bone assignments for the dress in milkshape either, so I had to get those with Cymar's tool. It took a bunch of tutorials but so far so good, though I've not imported it back to SimPE because the mesh is still lumpy and needs some editing. I confess I'm not positive what the vertex weights are supposed to look like so I'll consult serenity fall's 3to2 tutorial again. I can upload one of my older blend files if you still want it. I also figured out how to flip the individual faces in blender so I think I'm all good. Thank you for your help though.
Field Researcher
#5 Old 5th May 2019 at 10:18 PM
I've taken another look at the code and there's only supposed to be 65 bones in a sims 2 mesh, so something definitely went wrong somewhere along the way. Can you please upload your blend file so I can look what's wrong?
Test Subject
Original Poster
#6 Old 4th Jul 2019 at 10:54 PM Last edited by persongirl : 4th Jul 2019 at 10:56 PM. Reason: forgot attachments
Hi Smug Tomato, sorry it took me so long to get back to you I forgot and then life stuff happened. Still, I wanna thank you for replying!! I can't remember if this is version has bones or if they need to be reassigned because i went back and tried to fix some more clipping with my mesh. Also I've switched to just uploading it to milkshape instead because I prefer blender 2.8 however milkshape keeps borking my normals when I import the OBJ into it, I checked the normals and they looked fine while in blender, auto-smooth is already off.
Attached files:
File Type: rar  daodreass.rar (321.7 KB, 8 downloads) - View custom content
Mad Poster
#7 Old 4th Jul 2019 at 11:40 PM
(I'm using an older version of Blender because of TS4, so I can't open the file, but maybe SmugTomato can help)

If you're importing an OBJ file from Blender for use in Milkshape, make sure you have ticked the proper export options, or the normals get borked. OBJ files from Milkshape to Blender usually work (may get seams if the vertices in the seams are separate, possibly an Autosmooth issue).

These are the settings I use for OBJ exports (they also work directly to SimPE without any warnings popping up if you're doing objects without bone assignments)
Screenshots
Test Subject
Original Poster
#8 Old 5th Jul 2019 at 2:05 AM
Thanks! I'll definitely keep those export settings in mind for future stuff! I fixed my normals by going back into 2.79 and flipping the normals. i think they got borked when i exported as obj. now to figure out how to UV map this texture. Milkshape has done pretty good mapping the texture to the mesh and ignoring the skin parts of the dds but there's some bizarre diagonals happening and i'm not sure how to delete coordinates in the texture coordinate viewer. Tried erasing the skin parts of the dds in gimp but it made the texture transparent in large chunks that i hadn't touched. Gonna try using a texture from a similar outfit from the game to see if i can use it's UV maps for the texture I want.
Screenshots
Mad Poster
#9 Old 5th Jul 2019 at 2:34 AM Last edited by simmer22 : 5th Jul 2019 at 2:49 AM.
It's not Milkshape UV-mapping, it's the original mapping being destroyed by Milkshape.

That usually happens if Milkshape doesn't understand how to map vertices that are welded together if they're mapped at the opposite part of the map. Milkshape often deals best with separated vertices for UVs.

For instance, TS2 meshes are usually mapped front and back, with separated vertices at the seams (the seams that show if Autosmooth is being a jerk). If these vertices are welded together and Milkshape doesn't understand it's still supposed to map the vertices where they originally were, it tries to connect them instead, leading to a lot of weirdness in the map.

It's not that easy to fix, but it's possible. Sometimes it works to mark the part you want to fix first as faces (NOT as vertices!), individually move the vertices, and continue marking/fixing until it looks alright. Don't mark everything, because Milkshape often does a dumb and also moves the vertices connected to the one you're moving, and the mess gets bigger. If it's really bad, you have to separate the mesh parts so the vertices in the UV seams are separate before you export, so Milkshape doesn't do any dumb. Most even slightly more advanced programs do understand individually UVmapping two "islands" that have connected/welded vertices, but Milkshape is a definite "maybe sometimes, and only if it's in a good mood" on this one
Test Subject
Original Poster
#10 Old 5th Jul 2019 at 3:11 AM
Okay so it might help if I separate the belt, top, and skirt into separate groups? Or should I separate each part into front and back groups. Thank you so much for your help by the way, I know you don't have to do it and I appreciate you taking the time to reply to my newbie problems.
Mad Poster
#11 Old 5th Jul 2019 at 3:51 AM
If you separate the parts according to the mapped islands on the uvmap, that should work the best. You don't need them as separate groups when you export, so you can combine them together after separating. This is just so Milkshape understands where the seams are.

You may have to do some fixing on the normals, though. This is best done part by part in Milkshape, and having the parts with separate vertices will help against black spots in the mesh that sometimes can happen.
Test Subject
Original Poster
#12 Old 5th Jul 2019 at 11:13 PM
Okay I separated the belt into it's own group, at least from the rest of the mesh since this was the area that was causing me almost all of the problems with the UV map. Now I'm wondering if there's a way to delete a vertex on the texture coordinate plane or what i should do next to sort the stray vert. I've dragged the vertex up to the belt section of the texture but the UV map in the 3D viewer isn't updating. Do i have to export it again to commit those changes? What should my next step be?
Screenshots
Mad Poster
#13 Old 5th Jul 2019 at 11:35 PM
Could you maybe upload the original mesh file (maybe Blender format, because UVmapping and mesh marking is so much easier there) so I can take a look? I can't quite see where that stray vertex is coming from, but it's connected to most of the mesh, which is why you're getting the weird texture in the middle. All the in-between spaces of the lines are really faces, and they'll pick up whatever textures they come across.

I think it may be a problem with the exported file, so it may be a better idea to fix the problem in Blender and then export to Milkshape. Less UVmapping required that way.
Test Subject
Original Poster
#14 Old 6th Jul 2019 at 1:08 AM
Thank you! I imported the obj into a blender 2.79 file
Attached files:
File Type: rar  DA2dress.rar (549.1 KB, 5 downloads) - View custom content
Mad Poster
#15 Old 6th Jul 2019 at 4:42 PM
Looks like the dress has the same UV issues in Blender, and there's a lot of missing faces in the Milkshape file. You don't happen to have the original mesh file you converted?
Test Subject
Original Poster
#16 Old 13th Jul 2019 at 12:50 AM
Hi! Sorry for taking so long to get back to you, thank you so much for your help. I'm attaching the original mesh I converted to an obj after extracting it from dragon age. It was technically part of a mod that converted the dress from dragon age 2 to origins but I didn't notice any mesh issues before I touched it. I know this is probably a bad first meshing project for just personal use and I should've started with an object instead but I always make things harder than they have to be.
Attached files:
File Type: rar  DAdressoriginalmesh.rar (249.3 KB, 4 downloads) - View custom content
Mad Poster
#17 Old 13th Jul 2019 at 6:55 PM Last edited by simmer22 : 17th Jul 2019 at 10:56 PM.
Not sure what went wrong, but I did notice that all the faces were separate on the original, and it can't be smoothed properly in Blender because of that. The original has proper UVs, though.

It's a bit difficult to explain how to fix this, and even more finnicky to do, so I did a little bit of fixing on the original mesh for you, so it's easier to work with. It's now smoothed and all the faces hang together in a way that don't intervene with the UVmap, and all separate parts are selectable if you hover over them and click L (or shift+L for deselect) in Blender. The belt is now a separate layer. Hopefully this will make the project easier for you

There are some lines caused by the smoothing in Blender, but these can be fixed in Milkshape. It's when you try to stick those vertices together in Blender that the UV issues may happen when imported to Milkshape.

If you need to smooth some parts separately to each other, it's much easier to make them separate layers with Blender (mark and click P, then enter), and export as OBJ. That way you can smooth the layers much easier in Milkshape, because it's easier to select by group. I'm thinking of the hems of the skirt and belt in particular. If you smooth everything together, it often creates weird black lines or weird smoothing.

If you need to rotate the mesh, do so in Blender. When rotating in Milkshape, it often creates normal issues that's particularly visible ingame (not always in Milkshape).
Attached files:
File Type: rar  Dress-Fix.rar (591.0 KB, 4 downloads) - View custom content
Test Subject
Original Poster
#18 Old 17th Jul 2019 at 10:32 PM
Oh my goodness that is so incredibly kind of you I don't know what to say. Thank you, so, so much for all your help! I'll get right to work on this! Thank you! You really didn't have to edit the mesh! Thank you so much!!
Mad Poster
#19 Old 17th Jul 2019 at 11:03 PM
I'm just happy to help
(and I like fixing meshes and UVs, particularly for downloaded meshes - I think it's much more fun than making meshes from scratch)

One more thing - a lot of the dress parts are mirrored and layered on top of each other in the UVmap, which may be the reason you got UV issues. This means that if you make patterned recolors they'll be mirrored for about half the dress, and not in a very logical way. You may want to stick to simple colors or very simple patterns that look similar when mirrored so it's not noticeable. I've separated out the mirrored parts in the mesh, which is why it has some extra lines from the normals here and there.
Test Subject
Original Poster
#20 Old 19th Jul 2019 at 5:37 AM
Thanks for the tip! I have another quick question. As far as adapting the arms and legs of the dress, what's the best way to rotate the shoulders without borking them and the armpits? I suspect this is an issue inherent in doing conversions because i know shoulders and elbows are the bane of 3D modeling, but should I be worried about messing up the armpits and causing distortion of the UV? or should I just accept that they're armpits and probably not a big deal because they won't be the most prominently visible part of the mesh. Also, addressing the leg holes: Should I worry about the faces at the bottom of the skirt where the shadows will be? The position of the legs in the original mesh doesn't align exactly with the ts2 and ts3 meshes. I'm inclined to not worry so much about them but I don't wanna accidentally screw up the UV's or something.
Mad Poster
#21 Old 19th Jul 2019 at 12:03 PM Last edited by simmer22 : 19th Jul 2019 at 5:03 PM.
For the arms you could look up a 4t2 tutorial, because those show how to rotate arms and give bone assignments automatically, and the method works much the same with a few adaptions for non-sims meshes, too (in one step you end up with an OBJ, which is what you have, then you give it auto-assignments, fit it over a TS3 mesh to rotate the arms, and continue from there). You just need to make sure the mesh you have is roughly the shape and size of a TS3/TS4 mesh, so you may want to do some resizing first. They also have tips on how to clean up the mesh. I'm on the wrong device atm, but I can post links later.

I'm not too fond of those tutorials because I feel the method used sometimes make a mess out of the bone assignments, occasionally also the armpits, and some fixing is always required, but that's more personal preference.

For leg holes you can either form them after the legs, or snap the vertices for each leg hole together.

EDIT: Tutorials 4t2
https://www.youtube.com/watch?v=-_4J2lBu6Cs
https://www.youtube.com/watch?v=fQuU7NillqA

And this set:
Part 1: https://nintendolover13.tumblr.com/...othing-tutorial
Part 2A: https://nintendolover13.tumblr.com/...othing-tutorial (top/bottom)
Part 2B: https://nintendolover13.tumblr.com/...othing-tutorial (Full body)

You don't have to extract a TS4 mesh, so you can skip those parts since you already have an OBJ and a Milkshape file. You'll need to rename the mesh according to the tutorial, possibly resize a bit (you may want a TS3 mesh for that so you get the proper proportions) and do some smoothing (but you may not want to smooth the entire mesh in a go, or you'll get a lot of black spots). From there I think you can use any of the tutorials above.
Back to top