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!
Quick Reply
Search this Thread
Test Subject
Original Poster
#1 Old 4th May 2024 at 6:22 PM
Default Vertex count multiplied
I've been recently trying to edit some objects, particularly editing the mesh to remove a part that I don't like or something like that, for my own use. I don't have much experience meshing at all but I am learning. However I have encountered a situation I don't understand and I wonder if someone does.

Let's say I open on TSRW the object and look at the Mesh. It says something like (+ or -) 200 vertices and whatever faces. I export the mesh (obj). I import the mesh on Blender and edit it. I reimport the mesh on TSRW... but now it says (+ or -) something like 700 vertices and some faces (the count of faces seems to be consistent: if I remove a part of the mesh then the new count is a bit less than the old count, reasonable numbers). But the vertices being 3 times more???

Nevertheless I tried something else. I exported the mesh from TSRW. I did NOTHING. I reimport the mesh back to TSRW... and the number of vertices were again multiplied. I don't understand why this happens. Is it normal?
Advertisement
Instructor
#2 Old 5th May 2024 at 9:09 AM
Short answer, there are different ways to count vertices.

For example, the ToiletExpensive mesh freshly cloned in TSRW states 1132 vertices, 966 faces.
Exported to .obj and imported back in, now states 2896 vertices, 966 faces.
S3PE's MLOD preview on the same mesh states 2904 vertices, 968 faces.
Same mesh in Blender states 1125 vertices, 968 faces.

The mesh is not being altered in any of these processes.
I would say the latter 3 are all correct, because mathematically I don't know where the hell TSRW got the number 1132 in the first one.

TSRW's recalculation is counting the verts every time they're used in a polygon- in an object with triangular faces, that's always going to be faces x 3.
S3PE's preview the same + a couple extras from the shadow mesh being included.
Blender's is the standard primitive and vert count, which only counts each vertex once. It's a lot lower because all of the parts that share the same verts.
Test Subject
Original Poster
#3 Old 5th May 2024 at 8:12 PM Last edited by alohomoraplease : 5th May 2024 at 8:27 PM.
Quote: Originally posted by CardinalSims
Short answer, there are different ways to count vertices.

For example, the ToiletExpensive mesh freshly cloned in TSRW states 1132 vertices, 966 faces.
Exported to .obj and imported back in, now states 2896 vertices, 966 faces.
S3PE's MLOD preview on the same mesh states 2904 vertices, 968 faces.
Same mesh in Blender states 1125 vertices, 968 faces.

The mesh is not being altered in any of these processes.
I would say the latter 3 are all correct, because mathematically I don't know where the hell TSRW got the number 1132 in the first one.

TSRW's recalculation is counting the verts every time they're used in a polygon- in an object with triangular faces, that's always going to be faces x 3.
S3PE's preview the same + a couple extras from the shadow mesh being included.
Blender's is the standard primitive and vert count, which only counts each vertex once. It's a lot lower because all of the parts that share the same verts.


Thank you for your reply! It made sense to me when I read it, but doing another experiment I got confused again.

I opened a lamp in TSRW (the package was 341 KB). On TSRW said 1131 vertices and 1557 faces and on S3PE said 1139 vertices and 1561 faces.
I exported the mesh (.obj) and reimported that mesh without editing it or anything. Now on TSRW said 4664 vertices and 1557 faces but on S3PE also said 4675 vertices and 1561 faces. I mean, the increasing of vertices happened not only on TSRW but also on S3PE. And if it was only a matter of different ways to count vertices I wouldn't mind, but the thing is that the original lamp was 341 KB, and the "reimported-mesh" lamp was 811 KB. I wouldn't like to think that everytime I edit a mesh I make it 3 times heavier as a file.

PS: I've just checked the Mesh-orginal.obj on Blender and it was 1131, but when I check the Mesh-reimported.obj on Blender it is 4675 vertices what the stats says. I don't understand. I feel something changes in the mesh just by reimporten on TSRW.
Screenshots
Instructor
#4 Old 6th May 2024 at 1:35 AM
I think this is a natural side effect of converting between different mesh formats- reinterpreting their data, storing it in a new way- if not slightly bad programming, and I would only be alarmed if it happened in infinitum.

I was able to find where the 1132 number was coming from through my own object method, which doesn't use TSRW.
An MLOD converted to .obj with Milkshape has certain edges marked sharp in Blender- not all of them, which suggests that EA's model format had an existing way to store sharp edges and the Milkshape plugin preserves them. This creates a ToiletExpensive with 1132 vertices, because the vertices that are marked sharp (blue) are separated.


What must be happening is that TSRW doesn't preserve these edges and exports out a plain .obj with those verts unmarked- which is why it has slightly less in Blender.
Then their .obj import for some reason just recalculates it entirely, resulting in the verts-per-face count.

As it doesn't keep multiplying and only reports a maximum of faces x 3, the little bit of bloat isn't too concerning.
Potentially losing the original edges does sound like a rare point in favour of using Milkshape for import/export though- either for converting to .wso or for doing it with S3PE instead of TSRW.
Screenshots
Test Subject
Original Poster
#5 Old 6th May 2024 at 8:48 AM
Quote: Originally posted by CardinalSims
I think this is a natural side effect of converting between different mesh formats- reinterpreting their data, storing it in a new way- if not slightly bad programming, and I would only be alarmed if it happened in infinitum.

I was able to find where the 1132 number was coming from through my own object method, which doesn't use TSRW.
An MLOD converted to .obj with Milkshape has certain edges marked sharp in Blender- not all of them, which suggests that EA's model format had an existing way to store sharp edges and the Milkshape plugin preserves them. This creates a ToiletExpensive with 1132 vertices, because the vertices that are marked sharp (blue) are separated.


What must be happening is that TSRW doesn't preserve these edges and exports out a plain .obj with those verts unmarked- which is why it has slightly less in Blender.
Then their .obj import for some reason just recalculates it entirely, resulting in the verts-per-face count.

As it doesn't keep multiplying and only reports a maximum of faces x 3, the little bit of bloat isn't too concerning.
Potentially losing the original edges does sound like a rare point in favour of using Milkshape for import/export though- either for converting to .wso or for doing it with S3PE instead of TSRW.



Wow!!! How interesting! I loved your input, it really helped me to understand a lot and learn new things.

Sorry for bothering you with my ignorance, but how can I export the mesh that way (S3PE/Milkshape)? I don't have a computer in front of me right now but I would love to try later. I extract the MLOD as file with S3PE and then how do I get that into Milkshape?

Thank you!
Instructor
#6 Old 6th May 2024 at 10:08 AM
Quote: Originally posted by alohomoraplease
Wow!!! How interesting! I loved your input, it really helped me to understand a lot and learn new things.

Sorry for bothering you with my ignorance, but how can I export the mesh that way (S3PE/Milkshape)? I don't have a computer in front of me right now but I would love to try later. I extract the MLOD as file with S3PE and then how do I get that into Milkshape?

Thank you!


No worries!
It's not a well-known method outside of some oooold tutorials.

There's a S3PE plugin here that can export MLOD and MODL to WesHowe's .s3asc format, which have a Milkshape plugin in the second attachment on this thread.
With these installed, 'Export/Import to s3asc' will appear in the right-click menu for MLOD/MODL and Milkshape will have 'Sims3 Object Import/Export by Wesley Howe' in the File > Import/Export menu.

To use these as a conversion tool to Blender and back:
  • Right click on the mesh you want to edit and 'Export to s3asc'. This will create multiple files, for each mesh group.
  • In Milkshape, Import > Sims3 Object Import and open the file that ends with _filebase. All groups will be imported.
  • Export > Wavefront .obj
  • In Blender, Import > Wavefront .obj and make sure that 'Split by group' is ticked in the options. It's in the Geometry dropdown in 2.93, may be elsewhere in other versions.
  • Make whatever changes you want. If you want to replace a mesh outright you can even just use it for size/position reference and delete when you're done.
  • Export back out as .obj. If you changed multiple groups, either export individually or select them all and make sure 'Objects as Obj Groups' is ticked in the options.
  • Now the unique/important part- with the original s3asc from the first step open in Milkshape, import the .obj
  • Delete the old mesh groups and rename the new ones to have exact old names (group00, group01, so on), and move the groups up and down into the correct order if they got mixed up.
  • In the Joints tab, reassign the bone(s). For simple / decor objects, there's usually only one so it's simple enough to just press SelUnAssigned and then Assign to apply the bone to the entire object. More complex bones will have to be done manually- a limitation shared by using TSRW and .wso, as far as I know. I haven't been able to find a format that can retain bone weights that both Blender and MS support
  • Export > Sims3 Object Export and select the same file and overwrite it.
  • Back in S3PE, right click the original resource and Import from s3asc

One day, all of this could be condensed to one step if an updated Blender plugin ever gets written for s3asc. If only programming came as naturally to me as meshing and S3PE do
Test Subject
Original Poster
#7 Old 16th May 2024 at 3:35 PM
Quote: Originally posted by CardinalSims
No worries!
It's not a well-known method outside of some oooold tutorials.

There's a S3PE plugin here that can export MLOD and MODL to WesHowe's .s3asc format, which have a Milkshape plugin in the second attachment on this thread.
With these installed, 'Export/Import to s3asc' will appear in the right-click menu for MLOD/MODL and Milkshape will have 'Sims3 Object Import/Export by Wesley Howe' in the File > Import/Export menu.

To use these as a conversion tool to Blender and back:
  • Right click on the mesh you want to edit and 'Export to s3asc'. This will create multiple files, for each mesh group.
  • In Milkshape, Import > Sims3 Object Import and open the file that ends with _filebase. All groups will be imported.
  • Export > Wavefront .obj
  • In Blender, Import > Wavefront .obj and make sure that 'Split by group' is ticked in the options. It's in the Geometry dropdown in 2.93, may be elsewhere in other versions.
  • Make whatever changes you want. If you want to replace a mesh outright you can even just use it for size/position reference and delete when you're done.
  • Export back out as .obj. If you changed multiple groups, either export individually or select them all and make sure 'Objects as Obj Groups' is ticked in the options.
  • Now the unique/important part- with the original s3asc from the first step open in Milkshape, import the .obj
  • Delete the old mesh groups and rename the new ones to have exact old names (group00, group01, so on), and move the groups up and down into the correct order if they got mixed up.
  • In the Joints tab, reassign the bone(s). For simple / decor objects, there's usually only one so it's simple enough to just press SelUnAssigned and then Assign to apply the bone to the entire object. More complex bones will have to be done manually- a limitation shared by using TSRW and .wso, as far as I know. I haven't been able to find a format that can retain bone weights that both Blender and MS support
  • Export > Sims3 Object Export and select the same file and overwrite it.
  • Back in S3PE, right click the original resource and Import from s3asc

One day, all of this could be condensed to one step if an updated Blender plugin ever gets written for s3asc. If only programming came as naturally to me as meshing and S3PE do


Hello. I am very sorry for the delay. I have been very busy but in the last week I have tried to do this three times and I must be silly because I am not passing the first step.

When you say: With these installed, 'Export/Import to s3asc' will appear in the right-click menu for MLOD/MODL.

That is not happening. I read carefully the how-to-install on the webpage but I am not having any success with S3PE getting this option available.
Back to top