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!
Theorist
#26 Old 2nd Dec 2009 at 5:26 AM
Quote: Originally posted by WesHowe
I know I have seen 4 weights in EA-made files, although they are not used extensively. Unlike Sims 2, the 4th weight isn't implied, it's explicit in the TS3 file format.

That doesn't mean the engine uses them correctly (and I never really tested that detail), but the EA artists that made the meshes used them.


Oh, so 4th bones are supported by the game? I guess I'm just doing it wrong. What's the proper way to assign 4th bones to a Sims 3 mesh? I had been using the Sims 2 Unimesh Bone Tool, but that didn't work as when I reimported the mesh, it automatically assigned the difference to the 3rd bone. It works fine for the first 3 bones though.

Resident wet blanket.
Advertisement
Sockpuppet
#27 Old 2nd Dec 2009 at 12:21 PM
I know one thing when assigning the 4th bone, you can not exceed the 20% as faces can become transparant then.
Ms. Byte (Deceased)
Original Poster
#28 Old 2nd Dec 2009 at 1:18 PM Last edited by CmarNYC : 2nd Dec 2009 at 2:19 PM.
Base, how did you copy bone assignments? They're part of the vertex data - did you go through each vertex?

I see that the GEOM files have four values for the bone assignments and four for the weights, but - in the couple of meshes I've quickly looked at, the fourth bone weight is always zero or a ridiculously low number that would obviously have no effect. I wonder if that's the problem, or part of it? That we've been using that fourth bone assignment but the game ignores it? Or rather - maybe the game ONLY uses the fourth bone in very high Sim detail?
Ms. Byte (Deceased)
Original Poster
#29 Old 2nd Dec 2009 at 2:18 PM
I did a very quick adjustment on the vertices below the breasts, using only 3 bone assignments: results below. The first is low Sim detail, the second high, the third very high. They all look alike! Woo-hoo!!! (so to speak)
Screenshots
Alchemist
#30 Old 2nd Dec 2009 at 3:00 PM
That is an interesting finding.

If the fourth weight is ignored by the engine on low detail, then the weighting for the other three assignments will be less than 1.0, which we know creates problems.

I don't know if that is a bug or a misguided feature, but either way, we have to work around it. A 4th weight was very useful for the chest... that is where we added weighting in Sims 2 to get some "physics" on the breasts once we had some custom animation working... which is even more interesting to do now that there are two separate breast bones to work with.

If you like to say what you think, be sure you know which to do first.
Sockpuppet
#31 Old 2nd Dec 2009 at 4:44 PM
Quote: Originally posted by CmarNYC
Base, how did you copy bone assignments? They're part of the vertex data - did you go through each vertex?

Or rather - maybe the game ONLY uses the fourth bone in very high Sim detail?


yup, i did vertex by vertex
but when i can i use Wes his data tool on stuff like this

I did notice that some of the bones are no longer used between the lod meshes, especially the breast and hand bones.(watch the fingers.)
One reason i do not like those breast sliders is that the moment you zoom out the breasts turn to default again, bit silly to see.
But i didn't expect it would happen within the lod1 mesh....

Another mesh facing the same problem is the afTopTornTshirt, you might want to enable it for everyday clothing first as it is set to career only.
Ms. Byte (Deceased)
Original Poster
#32 Old 2nd Dec 2009 at 5:56 PM
Quote: Originally posted by WesHowe
That is an interesting finding.

If the fourth weight is ignored by the engine on low detail, then the weighting for the other three assignments will be less than 1.0, which we know creates problems.

I don't know if that is a bug or a misguided feature, but either way, we have to work around it. A 4th weight was very useful for the chest... that is where we added weighting in Sims 2 to get some "physics" on the breasts once we had some custom animation working... which is even more interesting to do now that there are two separate breast bones to work with.


Yes, it's a shame if the game really works like that. My guess would be that it's intended to save processing power at any but the highest setting. Some natural movement in the chest area really would be a realistic touch and would be nice to do in all the detail settings.
Theorist
#33 Old 2nd Dec 2009 at 5:58 PM
Quote: Originally posted by Base1980
I know one thing when assigning the 4th bone, you can not exceed the 20% as faces can become transparant then.


But how do you assign a 4th bone at all? I never exceeded 20% on the 4th bone.

Take my vertex, I tried to assign this with the Unimesh Bone Tool:

58% spine1
12% spine0
15% r_breast
l_breast
85% total

Assuming l_breast will take the 15% difference. Everything looks fine, but when I re-import into Milkshape, I get:

58% spine1
12% spine0
30% r_breast
-1
100% total

I tried to edit in Manual Extended Edit and it seems to do the same thing.

Oh, and just fixing the shape of the shirt isn't the only problem. Try applying a shirt with any graphic to a sim with enlarged breasts and you'll see it distorts.
Losing the breasts on zooming out is because lod2 has no breast bones. You have to rebone the lod2 mesh as well.

Resident wet blanket.
Ms. Byte (Deceased)
Original Poster
#34 Old 2nd Dec 2009 at 6:01 PM
Quote: Originally posted by Base1980
yup, i did vertex by vertex
but when i can i use Wes his data tool on stuff like this

I did notice that some of the bones are no longer used between the lod meshes, especially the breast and hand bones.(watch the fingers.)
One reason i do not like those breast sliders is that the moment you zoom out the breasts turn to default again, bit silly to see.
But i didn't expect it would happen within the lod1 mesh....

Another mesh facing the same problem is the afTopTornTshirt, you might want to enable it for everyday clothing first as it is set to career only.


That's a lot of work!

Yeah, I noticed that about the hands, and saw that there are no breast bone assignments at all in lod2 of the tee-shirt mesh. Haven't looked at the other meshes but sounds like it's the same. I did create bone assignments for lod2 for that mesh to take care of the zooming out problem, but don't know if anyone would want to take on fixing all the lod2 meshes in the game.
Ms. Byte (Deceased)
Original Poster
#35 Old 2nd Dec 2009 at 6:05 PM
Quote: Originally posted by GnatGoSplat
But how do you assign a 4th bone at all? I never exceeded 20% on the 4th bone.


I used the Milkshape bone assignments in the 'Joints' tab. Sounds like what was happening for you was that the 4th bone weight was being shifted to the 3rd bone. I had a fair amount of trouble too; seemed like often Milkshape didn't save the adjusted weights or redistributed them on its own.
Theorist
#36 Old 2nd Dec 2009 at 7:03 PM Last edited by GnatGoSplat : 2nd Dec 2009 at 8:03 PM.
Quote: Originally posted by CmarNYC
That's a lot of work!

Yeah, I noticed that about the hands, and saw that there are no breast bone assignments at all in lod2 of the tee-shirt mesh. Haven't looked at the other meshes but sounds like it's the same. I did create bone assignments for lod2 for that mesh to take care of the zooming out problem, but don't know if anyone would want to take on fixing all the lod2 meshes in the game.


I completely reboned mine too, for all ages. It was necessary or else graphics and patterns on the T-shirt will distort in a very unrealistic way.

For LOD2, the adult is the only one lacking breast bones. The teen and elder have breast bones so no need to modify those LOD2's. EA was very inconsistent with these meshes. Also, there is a separate mesh for the WA elder female T-shirt, while teen and adult WA shirts use the same mesh from the base game. Sims 3 Store sponge and Fanta shirts also have their own meshes for whatever reason.

Thanks for the tip on the Joints tab, I'll give that a try.

EDIT: I tried the Joints tab, it seems to do the same thing. Bone 4 is dropped off while its value got added to bone 3. Are you seeing all 4 bones and their values preserved when you re-import with Q-Mesh Sims 3 GEOM Importer? I'm using v0.15 which I think is current.

Resident wet blanket.
Alchemist
#37 Old 2nd Dec 2009 at 8:31 PM
While the possibility of a bug in Q-Mesh is always present, MilkShape has four assignments but only three weights. The 4th weight is calculated by summing the other three weights and subtracting that from 1.0 (or 100% as shown in the BoneTool). This mimics the way TS2 worked for the 4th weight.

Q-Mesh knows all about this, and (when used) calculates the 4th weight (TS3 has 4 weights per-vertex) and passes it to the output explicitly. On import, the process is reversed, and the four weights are collapsed to three, leaving the joint apparently "underweighted". The underweighted selector plugin knows they are underweighted because of a 4th assignment, and does not flag them.

Of note is the way that the game stores assignments and weights. Assignments are 8-bit unsigned integers, weights are four floats. Any weight of 0.0 means the corresponding assignment is unused, and unused assignments may be any value.

I know the "BoneTool" plugin for TS2 works the way I described, I have never been very adept at using the assignment tool in MilkShape (the BoneTool preceded that addition by a year or so). All my TS3 experimentation has been done with the BoneTool.

I am busy on something else at the moment, which is a poor excuse, but it is my story and I am sticking with it. However, I have some various stuffs here, including a template for hex editing GEOMs, that would enable me to make a determination easily of whether there are 4 weights or 3 weights in a file at the GEOM level. Just attach it to a post and indicate where the area of focus is (I know we are talking daboobs here, but the top side or the bottom side or what would help).

If you like to say what you think, be sure you know which to do first.
Sockpuppet
#38 Old 2nd Dec 2009 at 11:05 PM
I always use unimesh bonetool and checking wether the 4th bone is used shouldn't be that hard....assigne the residual 15% to the right toe :D
Theorist
#39 Old 2nd Dec 2009 at 11:54 PM Last edited by GnatGoSplat : 3rd Dec 2009 at 6:43 AM.
Quote: Originally posted by WesHowe
I am busy on something else at the moment, which is a poor excuse, but it is my story and I am sticking with it. However, I have some various stuffs here, including a template for hex editing GEOMs, that would enable me to make a determination easily of whether there are 4 weights or 3 weights in a file at the GEOM level. Just attach it to a post and indicate where the area of focus is (I know we are talking daboobs here, but the top side or the bottom side or what would help).


I've attached the GEOM and a couple images, before.png is what I tried to assign it and after.png is what it looks like after re-importing. It does preserve the 4th bone when saved as .ms3d, but not when exported as a .simgeom.

Resident wet blanket.
Alchemist
#40 Old 3rd Dec 2009 at 2:15 AM
OK, with the excellent troubleshooting I ran this problem down pretty quickly. The 4th assignment gets written to disk, but the 4th weight overwrites the 3rd weight, and the 4 weight is set by default to zero. Meaning when it is read back in the 4th assignment gets thrown out, and the weighting is automatically adjusted by the importer to be 100%, which bumps the 3rd weight by the value of the (now missing) 4th weight (assuming the original was weighted properly). Usually the adjuster is compensating maybe 1% for some rounding that happens when the weights are compressed to tiny ints to be squeezed into MilkShape.

It was caused by a typo in my source, where I used weight[2] twice, instead of weight[3] for the 4th weight.

I have to go through and renumber the versions and repackage and update the docs before I can release this, but it won't be long, probably later tonight.

If you like to say what you think, be sure you know which to do first.
Alchemist
#41 Old 3rd Dec 2009 at 3:25 AM
I am talking to myself because editing a post does not set the new message flag. I posted a fix for this in the regular place (the Q-Mesh thread in Meshing).

As is my custom, I updated the version number for all of the plugins, but only the exporter had any change to fix this. When I tested, I had no trouble exporting and reimporting a 4th weight in Gnat's file.

Thanks to all for the help locating this. I only changed one teeny character from a 2 to a 3. It is so easy for bugs to creep into your code.

Unless you program in ancient languages, of course.

If you like to say what you think, be sure you know which to do first.
Theorist
#42 Old 3rd Dec 2009 at 4:02 AM
Thanks for taking a look and fixing this, Wes! Also good to know I wasn't crazy or just doing it wrong.
I program for a living so I can definitely relate.

Resident wet blanket.
Alchemist
#43 Old 3rd Dec 2009 at 6:22 AM
Then you know that having a reproducible example helps tremendously in running down a problem like this quickly. The source of the problem came was copy+pasting code, and then failing to change a single array subscript in the pasted code.

If you like to say what you think, be sure you know which to do first.
Theorist
#44 Old 3rd Dec 2009 at 7:13 AM
Absolutely, I'm glad my explanation was good enough for you to track it down quickly. In my workplace, my coworkers and I often code using copy & paste so we come across little bugs like that all the time.

The new version works great and your talent and effort are much appreciated! Having a working 4th bone did fix a few of the problem areas where the 4th bone was lost. When the breasts are adjusted larger, it does still look chunkier in lower sim detail and not as smooth, the texture also still distorts on the mesh, but it does exactly the same with the original T-shirt so I think my bone assignments are fine now.

Resident wet blanket.
Ms. Byte (Deceased)
Original Poster
#45 Old 3rd Dec 2009 at 1:01 PM
Quote: Originally posted by WesHowe
I am talking to myself because editing a post does not set the new message flag. I posted a fix for this in the regular place (the Q-Mesh thread in Meshing).

As is my custom, I updated the version number for all of the plugins, but only the exporter had any change to fix this. When I tested, I had no trouble exporting and reimporting a 4th weight in Gnat's file.

Thanks to all for the help locating this. I only changed one teeny character from a 2 to a 3. It is so easy for bugs to creep into your code.

Unless you program in ancient languages, of course.


Ancient languages are no exception. I think it's a law of nature of programming that any modification or addition, no matter how small, will cause at least three bugs to pop up.

But I thought OOP was supposed to fix all that...?

Thanks for the fast fix, Wes! Leaves me again wondering why the same mesh showed up differently in very high Sim detail as opposed to lower settings. I still think it's something to do with how and whether it uses the fourth weight but more testing is needed.
Sockpuppet
#46 Old 3rd Dec 2009 at 2:33 PM
Quote: Originally posted by CmarNYC
Leaves me again wondering why the same mesh showed up differently in very high Sim detail as opposed to lower settings. I still think it's something to do with how and whether it uses the fourth weight but more testing is needed.


the mesh has incorrect boneassignements, you already discovered that.
Page 2 of 2
Back to top