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!
Alchemist
Original Poster
#1 Old 28th Jul 2009 at 5:08 PM Last edited by WesHowe : 9th Aug 2009 at 12:32 AM. Reason: update
Default Experimental Sims 3 Object Mesh Toolset (deprecated)
I am closing out this phase of the tool development cycle. See the new thread ObjectTool V2 (Experimental) for the later version.

This is a EXPERIMENTAL, very much alpha test version of some Sims 3 object meshing tools. It includes MilkShape 3D import and export plugins, and two commandline style utility programs.

This will require you have the Visual Studio 2008 Runtime package (from Microsoft) to run. This is not the Visual Studio program itself, just the update MS requires to run programs produced with it... you may already have this installed, if they refuse to load, that is probably what is missing.

If you do not already know how to make meshes, and how to use the shell or associate a program with a file extension, don't bother trying to start with this. Wait for the new, improved version (it may be a few weeks, though).

You must also know how to read the directions in the package. I spent a lot of time typing them, and I don't think it is reasonable to ask me to type them over again for you.

These tools are released under a license (included in the download) that prohibits commercial use or to produce packages with distribution restrictions. No Pay, No Diva.

While it is experimental, it is not useless, I made some items with them, albeit more as a technology challenge than an artistic endeavor. Below is a screencap of a clone of the cheap stereo with a sphere added to it, shown in game. Thanks to Peter and Inge for the object cloner that allowed me to make this as a new object.

Please make any reports here. The documentation is sparse, this will develop. Please do not complain about stuff that doesn't work, instead make careful
notes about the problems so I can fix them. Example files and screenshots are a bonus... if I have to start from scratch to reproduce your problem, then that is time I cannot spend fixing issues.

Remember, No Pay, No Diva.

History:
V0.09: 06-Aug-2009: Changed UV compression scaling.
V0.08: 04-Aug-2009: Increased buffer limits.
V0.07: 03-Aug-2009: Fixed error exporting default 8-byte vertex (0x5003 block).
V0.06: 02-Aug-2009: Fixed assignment import problem. Increased size limits.
V0.05: 01-Aug-2009: Fixed some normals flipping. Added seam (UV)
splitting. Added scan for unassigned bones.
V0.04, 29-Jun-2009: Fixed bug in VPXY field from decompiler for some MODLs.
V0.03, 29-Jun-2009: Fixed problem caused by earlier fix.
V0.02, 29-Jun-2009: Added code to manage welded seams on export
V0.01, 28-Jun-2009: Initial release
Screenshots

If you like to say what you think, be sure you know which to do first.
Advertisement
Forum Resident
#2 Old 28th Jul 2009 at 6:15 PM Last edited by xanathon : 28th Jul 2009 at 6:33 PM.
Hi Wes.

Thanks for the experimental plugins.

First a question: Do I understand it correct, that we need to create multiple mesh-variants with different levels of detail for every object we want to create?

I tried the Venus statue which had four of them.

Does LOD in this case mean number of vertexes/faces?

Okay, now what happened.

I cloned the Venus statue using S3OC and exported the four MLODs and the one MODL from s3pe. After that I ran s3modld on the exported resources which went fine.

Then I imported all of the mcfg files into Milkshape (one after another of course) to have a look at them which also worked fine (two of the meshes were deformed vertically).

I changed just the first one ("00000000") a little, moving the venus a little vertically (leaving the pedestal as it was), exported again and tried to run s3modlc on the exported file, which lead to an error message: "ERR: mcfg file not located"

Screenshot and files attached.

Screenshots
Attached files:
File Type: rar  S3_01D10F34_00000000_0000000000F2B32E_sculptureVenus%%+MLOD.rar (15.2 KB, 64 downloads) - View custom content
Description: RARd files

happy simming,
Xanathon


Xanathon's Laboratory :: WishList

.: Do not harass me with requests via PM, you will only get ignored :.
.: Don't post my objects or objects derived from them on paysites or the exchange! :.
Alchemist
Original Poster
#3 Old 28th Jul 2009 at 6:51 PM
I replicated that here, but only with the shell. The error message is cryptic, as what it means is that I could not get data out of the file using GetPrivateProfileInt(). I will have to research that.

It does work reliably here using the Windows Explorer and file association. Select the file in Windows Explorer, right click on it and select open. Choose "select program from a list" and then "browse" to the s3modlc.exe file. You may choose to make this temporary by unchecking the "Always use the selected program to open this kind of file" checkbox.

This should then recompile the .lod file, renaming the original by adding ".bak00" to the end of the name. Put the new file back in your package.

If you like to say what you think, be sure you know which to do first.
Alchemist
Original Poster
#4 Old 28th Jul 2009 at 6:57 PM
I forgot to answer your other question. I had success in changing just the "00000000" .lod file, but the game does use the "00000001" file when you are zoomed out.

The two with "0001000x" do not seem to be used, but they must have a purpose, or EA would not have paid people to make them. Or so you would think. But I tried some tests with them unedited, and never could figure out what they were used for.

Thanks for trying this. I may have to write a program with some buttons and include the code in it if I cannot get the command shell to work properly. It was merely a convenient starting point.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Forum Resident
#5 Old 28th Jul 2009 at 7:04 PM
Thanks for the answer. The file association method worked.

I have the changed statue in my game (only one LOD but as this was a first try...)

happy simming,
Xanathon


Xanathon's Laboratory :: WishList

.: Do not harass me with requests via PM, you will only get ignored :.
.: Don't post my objects or objects derived from them on paysites or the exchange! :.
Alchemist
Original Poster
#6 Old 28th Jul 2009 at 7:25 PM
Great news.

I think I will start on a windows program to "wrap" the code in the two commandline programs. As you can see from it opening open a Dialog box, instead of printing the error to the console, I wrote it with that capability in mind.

I would not release things that did not at least work somewhat, but it is an experiment; new game, new tools. I am sure there are some things it will not do, or do wrong, but I have made and remade a number of objects for testing (including the same venus statue, only I made her "physical assets" a little pointier).

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Test Subject
#7 Old 28th Jul 2009 at 9:48 PM
The principle is working great. There are just two small things.



I usually like shiny things but this is just weird. (The original mesh wasn't shiny). And it's screwed my mapping up, which was nice and uniform before I imported. Could you offer any advice?

But thanks, for the program. It's managed to get the mesh in which is the important part.
Test Subject
#8 Old 28th Jul 2009 at 9:51 PM
I just wanted to report that I tried this tool and everything worked fine! I cloned a sofa and imported a completely new one. It showed in a catalog as a new item, I could change the colours and it looked good.

Thanks for your hard work!
Forum Resident
#9 Old 28th Jul 2009 at 10:09 PM Last edited by xanathon : 28th Jul 2009 at 10:35 PM.
Just some remarks from quick and dirty testing:

I experimented a little and imported an old object of mine, the obelisk I made ages ago for Sims 2 (I used that because it's really simple, geometrically speaking... ).

It did not work quite right yet, I guess I screwed up the UV-mapping and subgroup alignment, but anyway... Two sides are visible and two sides are not. At the moment a copperfield-type of object. :o)



I saw that the old shadow is still there, so probably one of the two meshes you could not figure out is used for the generation of the objects outdoor shadow...

The fact that the shadow starts at the floor at the position of the original mesh seems also to point to that conclusion.

Screenshots

happy simming,
Xanathon


Xanathon's Laboratory :: WishList

.: Do not harass me with requests via PM, you will only get ignored :.
.: Don't post my objects or objects derived from them on paysites or the exchange! :.
Alchemist
Original Poster
#10 Old 28th Jul 2009 at 11:32 PM
Ah, it looks that way to me, too. And it makes sense. The main m,od/lod set are not fully welded, probably to maintain sharp edges, rather than smoothed like body meshes. But the smaller copies are fully welded, simplified models.

I want to point some stuff out that I didn't think to write about before. The two-step process I made is that way because there is more to these .model files than just the meshes... they also have the TS3 equivalent of the MATD (same name, different details) in the files.

The two-step is so that I can retain all the materials and construction information from the originals, and use that to rebuild the object after the mesh parts have been edited. Because of the way this is implemented, the choice of group count, order and material types of the original remain unchanged.

For example, many that I looked at had a groundshadow as the first group. The new mesh needs to be that same way... if you don't want a groundshadow, just shrink that and hide it inside the new mesh.

Ditto for glass and metal. Start with an original mesh with glass or metal, and make glass or metal parts in your new design be in the same group as the glass or metal in the original.

Add some new parts? Regroup them so you have the same group count. Too few groups? Split some part off into a new group.

I guess I should have thought of this before, but I have been working on this for a long time, and especially intensely over the last two weeks. So some of what may have appeared obvious is probably not.

<* Wes *>

More: A lot of seemingly inanimate objects in TS3 have joints in them, this may be to allow them to be rotated for placement. In TS2, there was an automatic "root_rot" and "root_trans" if an object did not have any joints. Many, perhaps most, objects in TS3 have at least a single root joint. Make sure you assign all of the vertices to some joint if the original has any joints; you can look in the joints panel, the names are made from the hashval that is used in the SKIN blocks as the joint ID.

If you like to say what you think, be sure you know which to do first.
Test Subject
#11 Old 29th Jul 2009 at 1:01 AM
Wow this is cool! I'm think I am going to test this out as well. Since I'm making more objects for Sims 3.
Test Subject
#12 Old 29th Jul 2009 at 1:11 AM
I managed to fix the shiny-ness, god only knows how that got there. But whatever I try, I'm still getting distorted textures? I've replaced the MODL and all 3 MLOD files with my own, as well as adding my own multiplier.. but it doesn't want to know :P

Alchemist
Original Poster
#13 Old 29th Jul 2009 at 1:34 AM
Well, it looks like some sort of UV mapping problem. I could tell a lot if I had the files, though.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Firestarter
#14 Old 29th Jul 2009 at 2:16 AM
Thanks so much, Wes. It worked perfectly for me. I made a Pumpkin Candle and it works.
Alchemist
Original Poster
#15 Old 29th Jul 2009 at 4:39 AM
You're welcome, Carrigon. And thank you for the report. It appears to have some problems, and is not so elegant and polished, but it has been a useful lab for me to explore the 'innards' of the object mesh files.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Alchemist
Original Poster
#16 Old 29th Jul 2009 at 5:44 AM
Quote: Originally posted by xanathon
Then I imported all of the mcfg files into Milkshape (one after another of course) to have a look at them which also worked fine (two of the meshes were deformed vertically).


I have seen that, and I think that the location shift and simplified structure are both parts of the game's groundshadow generation method, and that these two LODs are used for making the shadows for the main model LODs.

If you think about the groundshadow, it would appear moved down and offset from the object itself. I don't know the internals of the game engine, but if you traced a set of lines between the two meshes, the set of all points where the lines intersect the ground plane would look like the shadow of the object cast on the ground.

If you like to say what you think, be sure you know which to do first.
Firestarter
#17 Old 29th Jul 2009 at 6:43 AM
I made a drinkable wine bottle if you want to look at the mesh. That worked.
http://www.sims2workshop.com/viewtopic.php?t=3254

I did get an error on exporting an angel mesh I had wanted to make a sculpture of. It said it was too big, I think, too many something, verts maybe.
Lab Assistant
#18 Old 29th Jul 2009 at 10:00 AM Last edited by teko : 29th Jul 2009 at 10:17 AM.
Awesome stuff, Wes.

It worked great for me except for an UV map glitch.



It looks like it's trying to connect the UV parts which are connected mesh-wise.



Feel free to look at the file.
Attached files:
File Type: zip  vintagelivingchair.zip (673.5 KB, 37 downloads) - View custom content
Description: Includes Sims 3 package

Minisite

TSR Workshop
A Custom Content Tool for The Sims 3
Field Researcher
#19 Old 29th Jul 2009 at 10:02 AM
nice chair though.

I'm having no trouble getting the meshes in the game but I'm going a bit insane trying to work out the texturing...

Come have a look at my downloads HERE for Sims 4 downloads.

Feel free to visit my website to check out my list of creations, to get in touch (for a request), or to donate. HERE

(Or here for sims 2 or here for sims 3 downloads.)
Lab Assistant
#20 Old 29th Jul 2009 at 2:45 PM
Thx

I've found a different UV bug.



A small offset caused by the UV map polygons moved to the lower left corner. The yellow is the UV bounding at original state. The blue is the bounding where the UV seems to be in game, it fits the borders.



I wonder if an UV origin is missing and the game just tries to create it itself on the fly and locates the nearest U and V coordinate. The exported UV map of the custom chair is located fine.

Minisite

TSR Workshop
A Custom Content Tool for The Sims 3
Alchemist
Original Poster
#21 Old 29th Jul 2009 at 2:57 PM
Thanks for the example files and pix. That helps a lot.
I will report back when I have located the issue.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Alchemist
Original Poster
#22 Old 29th Jul 2009 at 3:42 PM
Quote: Originally posted by teko
It worked great for me except for an UV map glitch.
Feel free to look at the file.


I am, carefully.

I have an important question that I want clarified, so I am understanding this problem fully.

The original UV map you showed is from something you made previously?
And what you attached is that model, exported by my plugin, recompiled, repackaged and tested?

Because I think I know what is wrong. I think the vertices at the seams in the original are welded. I don't think I included code in the exporter that manages that.

When you weld the seams, you reduce the vertex count because 2 vertices are combines into one. But if there are still two different locations on the UV map, when they are set into the game format they have to be split back into two separate vertices again... it is a difference in the details of how the mesh data is managed between MilkShape/Maya and many others, and DirectX games.

I will work on the exporter... I have this fix in TS2, I just have to recreate it for TS3.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Forum Resident
#23 Old 29th Jul 2009 at 4:06 PM
Observations:

The venus is composed of the statue itself and the pedestal but those are only one group.

The exported model generated by your plugin has two groups: the groundshadow and the statue including pedestal.

In the package there seems to be a texture for the statue and one for the pedestal.

If I import an obelisk into Milkshape and map a texture only to the statue group (not to the shadow) this is mapped correct in the game, but also the pedestal texture shows up on the obelisk (and is recolorable in the game catalog), not only the statue texture. So it seems to be there are still more groups in the object that you did not find yet or you were able to decode.

This is no criticism at all, I just wanted to point that out and hope it helps in the development!

Yes, I know the caps of the obelisks are not showing, the normals are pointing into the wrong direction...

Further I replaced the other lods with modified meshes (I scaled them x2 in x and z and 0.8x in y in Milkshape and moved them down and in -x and +z direction, I got those measurements by importing one of the shadowlods over the original statue to get the offsets) to create a shadow, but the shadow looks... ahem... funny...

I found that not using Milkshape and UVMapper for about two years seemed to leave me a little rusty...

Screenshots

happy simming,
Xanathon


Xanathon's Laboratory :: WishList

.: Do not harass me with requests via PM, you will only get ignored :.
.: Don't post my objects or objects derived from them on paysites or the exchange! :.
Lab Assistant
#24 Old 29th Jul 2009 at 4:34 PM
Quote: Originally posted by WesHowe
The original UV map you showed is from something you made previously?
And what you attached is that model, exported by my plugin, recompiled, repackaged and tested?

Yes for both, the original UV map is the one I made in my 3D application and the way it actually needs to be.

Quote: Originally posted by WesHowe
Because I think I know what is wrong. I think the vertices at the seams in the original are welded. I don't think I included code in the exporter that manages that.

Yes they are welded. But in the UV mesh they are separated and that's where the problem occurs.

Quote: Originally posted by xanathon
So it seems to be there are still more groups in the object that you did not find yet or you were able to decode.

You also looked at the mask image? Because there's not really a reason anymore for more groups for objects like this.

Minisite

TSR Workshop
A Custom Content Tool for The Sims 3
Alchemist
Original Poster
#25 Old 29th Jul 2009 at 4:44 PM
I updated the package, including code to unweld the seams before exporting it. The Sims 2 exporter did this, and it is necessary in Sims 3 for the same technical reasons. Thus you will find when exporting and reimporting your model a larger vertex count, but the same polygon count.

It is not a bug, all locations where the UV map has two coordinates for the same location must have two vertices, one for each UV coordinate. However, with this change we will make the software do the work, not the artist.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Page 1 of 7
Back to top