Making of : MODL and MLOD
Updated this text to include new information. 23 october 2009
Could some of you please read this info and comment on it??
Information about how to make the MODL and MLOD meshes in Milkshape
=====================================
The main goal is to explain, how to make the object
mesh parts MODL and MLOD.
It probably is better, if it is rewritten by a native English person, in correct but simple/school English, I am Dutch and am sure to have made several spelling mistakes.
Sorry for the wall of text, I know almost nothing about layout and making those hidden links.
---------------------------------------
What are those MODL and MLOD files
Well, someday I'll find a nice explanation what they are exactly, but for now it is enough to know that, after doing Decompile with S3ObjTool, they contain the meshfiles I want to edit with Milkshape.
Info from WesHowe
-All objects with meshes should have at least one MODL file. A MODL file is essentially the same as an MLOD, but has an extra block at the start that describes how many LODs are in the object, and has a bounding box for the entire object, probably used to help make the object selectable.
So while it is often not the most detailed mesh in a project, it can be, and can be the sole mesh in the project.
Many interior objects do not have SunShadow meshes in them. Since you would normally not be able to get too far from a rug, and a rug would have normally a limited number of faces, there is little practical need for a reduced face count version. I don't know what the exact guidelines are, but someone thought these through, I don't believe the presence or absence of these features in any object is random.
Making the MLOD-00000000
MLOD-00000000 is the main shape of the object, this is the first mesh to make. It is the object mesh that is used in normal view in the game.
There are 4 possibilities to make this mesh in order of difficulty:
1-Change the shape of a TS3 mesh e.g. make a curtain longer.
2-Converting an object mesh from TheSims2 for use in TS3
3-Combine mesh parts from TS3meshes or from TS2 and TS3meshes
4-Make a new mesh from cratch
The easiest introduction into object meshing for TS3 is to alter the shape of a TS3 mesh.
Your new mesh can probibly use the same UVmap, the same DDStextures and making of the reduced polycount and shadow meshes is not to difficult.
--------------
Making the MODL
MODL-00000001 is a lower detail version of the MLOD-00000000 used in zoomed out view. (In the case of a rug (others? low polycount?) this can be the only mesh)
Info from WesHowe:
The way you would go about this is start with building a working "00000000" MLOD file. After you have that UV mapped, tested and are happy you use the mesh from it to make your "00000001" mesh.(=MODL) That mesh is a same-sized but reduced poly count version.
I adopted this piece from the hairtutorial from HP:
If you have a very low-poly mesh (like Maxis conversions from TS2 to TS3 - custom meshes are usually higher) you can just import and use your new MLOD-00000000 to make this mesh too.
Compair polycounts in the TS3mesh and your new mesh, to check if it is nessecairy to reduce the polycount. (Just keep in mind, that less faces/polygons is always better (because of rendering.....)
To see the poly count of an object, select the whole mesh with Model-select, and do Tools>SelPolyCount. Polygon/face count from the TS3 clone can be found with the MODL/MLOD info button, when you're going to decompile each of the MODL and MOLD's from the clone.
You can use Tools>DirectX Mesh Tool in Milkshape to reduce the poly-count.
You will lose the bone-assignment in doing that, so you will have to re-assign that.
------------------------
Making the SunShadow meshes
Info WesHowe:
The MLOD files have everything to do with sunshadows. The MODL is usually group "00000001" (lod1) and it pairs with "00010001" for it's sun shadow. The other lod0 (main) file will be group "00000000" and it pairs with "00010000" for its sunshadow. But the sunshadow mesh is not the shadow, it is the other half of some sort of template the game uses to make a sunshadow by calculation... as the sun moves, the shadow changes, whereas the dropshadow stays the same.
The shadow meshes may also be welded at all seams, to reduce vertex count, as these meshes are never directly rendered, they are used by the game to create the sun shadow.
You would usually make them by copying your visible lods, select all and moving the mesh to a similar displacement as the original, and using the Scale function to flatten and enlarge it like the original shadow mesh.
-----------------------------
Not all objects (interieur) have SunShadow meshes, but if your clone/base object has SunShadow MLODs, you will have to make them for your new mesh too.
(do cars have 3 Sunshadowmeshes?)
Make MLOD-00010000
Use your new MLOD-00000000 to make MLOD-00010000 by scaling and offset/displace them, there are no known set values to do that with (yet?), so you will have to experiment yourself. I think every mesh has differences in that. The TS3mesh that you use as base can be your guide in that.
Make the reduced polycount-version shadow MLOD-00010001
There are two ways to make the reduced polycount-version shadow MLOD-00010001
Use/import your new MODL-00000001 (=reduced polycount-version) and apply the same scaling and displacing to it, as you did to make the shadow MLOD-00010000. This can be used if you just made minor changes like deleting or resizing part of a mesh, or the scale and displacement were easy values.
Or import your new shadow MLOD-00010000 and use Tools>DirectX Mesh Tool to reduce polycount on it, with the same value you made the MODL-00000001 mesh.
Change the Dropshadow texture,
that white _IMG with the grey blobs and the red text "do not use any blobs below this line".
Some more info about dropshadow here
http://www.modthesims.info/showthread.php?t=373422
Info from WesHowe
Some shadows, like a wall shadow behind a painting, aren't generated by the game based on your mesh or anything like that. It is a static shadow
In order to change the shadow you need to replace the texture image on your shadow mesh.
The dropshadow mesh is a seperate group in your MLOD-00000000. To preview what the mapped/textured shadow looks like as it is, export dropShadow_object_a_0x............from your package. In Milkshape, make a new material using the exported dropShadow image, assign it to your shadow mesh, and view it in textured mode. (You'll probably have to do a Smooth All to make it show up)
If you then open the texture coordinate editor, you can see that the shadow mesh is mapped to a small part of the dropShadow image. I expect you'll need to replace that group with one of your own, fiddle with the mapping, etc.
==============================================
Introduction
Some things are still unknown and future development in object meshing, can make some of this information out of date. But untill than, we sure could use more information about it.
We started with the tutorials from
Deluxe Designs: Meshing Objects in TS3
http://www.modthesims.info/showthread.php?t=363856
Xanathon Tutorial: Sims 3:How To Clone A Painting And Change the Texture
http://www.sims2wiki.info/wiki.php?...nge_the_Texture
Flabiliki : Tutorial: A Beginners Guide on How to Mesh for The Sims 3 (inc. pics)
http://www.modthesims.info/showthread.php?t=374503
Some information in those tutorials needs to be updated, especially about the used tools, and they do not include the new information about making the MLOD and MLODs.
Petallotus and Jonesi made very nice step by step tutorials here
http://www.modthesims.info/showthread.php?t=374282
Ellacharm3d made a very detailed object meshing tutorial:
http://www.modthesims.info/showthread.php?t=375349
It is full of very usefull tips, and for example explains in details, with pictures, how to clone with
S3OC and s3pe.
Orangemittens Tutorial: Creating and Coloring Glass Texture in Sims 3
http://www.modthesims.info/showthread.php?t=374473
It would be great to have more tutorials, also with different objects.
Here is a link to a thread with a list of all the program and tools you need to have installed, with links and some tips.
http://www.modthesims.info/showthre...941#post2874941
And if you want to convert objects from TheSims2 for TheSims3, here
http://www.modthesims.info/showthread.php?t=372692 are the parts that contain info about how to extract the Sims2 object files, and a bit further down Lemoncandy explained how to change the Sims2 textures into useable Sims3 DDS textures.
-------------------------------------
Install your programs, make a new work folder to collect your stuff in for every new project, and do a few tutorials.
If you have trouble understanding a tutorial, please first read the comments first to see if your problem was answerred already. If not, post in that tutorials own thread.
If you have trouble with making a completely different object, start a new thread in the meshing forum, and give as much information about your object/question as possible.
============================================
to be included
Tip : "A short guide to good clonable CAS objects (in progress)" from Buggybooz.
http://www.modthesims.info/showthread.php?t=365609
. link or info what you can do with the other files in the package like OBJK and how to replace included pattern textures.
Edit and/or make TS3 DDS textures. See tutorial Lemoncandy and Anouschka about this.
Links WesHowe 3D tutorials-UVmapping Orangemittens- tutorials object meshing TS2.
=================================================================================
Interesting info from Weshowe to be included
As for mapping... in 3D meshes, you get one map per group. Each map can be tied to a different texture map, or the same one. If you are texturing with the same material attributes, i.e. same shininess, same roughness, same transparency, then you can share a texture image.
Since you have just a single group mesh (plus dropshadow) you could take your table and raise it up to be on top of the groundplane in MilkShape, add in a table, move the uv mapping for each so they do not overlap, regroup, and make the dropshadow mesh the right size for the table legs. When you regrouped, you made the separate uv mappings be merged together, and now they will HAVE to be textured with the same texture image.
Mostly, you will find game items that (excepting dropshadows) have one group, or if they have two, one is solid and one is glass, or one is wood and one is metal, and a few that have three groups, like the CarPolice, where one is the body, one is the window glass and the third one is the lights. So each material there has different properties. Once cloned, you can change material properties in the .mtlsrc files. But you cannot make two different shininess or transparency levels for the same material (except using alpha transparency), you need different sets of materials, and each will need a different uv map, and be in a different group.
--------------------------------
Question
-when i imported the sunshadow meshes to use them for reference when scaling my new mesh, they were inverted, so I turned all the faces of my new mesh to match, was this right or do you not bother doing that?
Answer from WesHowe:
They are not inverted, they are all black because they have no normals... they are a stripped down version, because the game just needs the shape to make the shadow from.
If you want to, you can do a "smooth all" and you will see they turn gray like the other meshes.
But when you export them and load them in again, they will still be black. It is OK, they are made that way, because they are not rendered directly.
---------------------------------
==================================================================================