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
Lab Assistant
Original Poster
#1 Old 11th Jan 2006 at 3:18 PM
Default UV Mapping & Texturemapping - Some help needed
Hey all! I could really need some pointers and tips on this subject, if anyone are willing to share =)

I've never been into modelling whatsoever before now, but a bit of "mapping" experience and texture/graphics work - all transfering nicely into modelling for the Sims2 now with all the help and information on these forums. Modellingwise, this is how "far" I am, using wes_h's plugins (3.02 atm) with Milkshape 1.7.6. I can cut out portions of a model, and then rebuild them completely adding faces. Making both the "fat" and secondary joints coincide again with the "main" group for correct exporting. I'm guessing I could attempt to build a new (body full, bottom or top) model from the bottom up in milkshape by now, albeit a bit shaky, and make the joints and fatmorph. Sorry for ranting, but just to give an idea "where I'm at" when answering so I can understand =)

The first wall I really banged my head on though, was mapping/stretching/placing the texture on the modified model. Neither did I find much info on this around here, or Sims2 specific anywhere else.

When you build outside the model, or move parts outside of the texturemap (from the bodyshop texture), how and where does the new faces apply to the texture? I've seen how verteces are tied to certain points on the texture, and how when I delete faces from the model, the parts dissapear from the texture too. Or how stretching a face in the model will also stretch that area out in the texture, not simply paint over the same general area.

As you can see, I'm totally green here. Simply, how do I "UV Map" (as I understand it's called =) a S2 Texture onto a S2 model? Especially how do I modify the texture to fit my new model? Any pointers welcomed.
Advertisement
Admin of Randomness
retired moderator
#2 Old 11th Jan 2006 at 4:21 PM
The short answer, you need to adjust the uv map in milkshape itself, using the uv mapping tools there. I'm working on an article here that includes how to adjust body uv maps.

Basically, I'd say it would be a bad idea to delete large parts of the body with bodychop and rebuild them by hand. Much wiser is to actually modify the existing body (in milkshape I think someone determined that the split in half messes up the uv map, but split in 3 does not, I'll need to verify that)

Then you can stretch/shrink parts of the sims uv map -- but most of the time you want to stay as close to the 'standard' uvmapping as possible, depending on the outfit, so if people modify the alpha they'll get the right part of the sim's skin showing through.

Now, if you want to create a totally new piece and add it on, I've heard (not done it myself) that you could uv map it as an obj to the same size uv map 1024x1024 and make sure to uv map it to an unused spot (using any standard uv map tools). Then when you read that obj in, it will retain it's uv map as you then attach it to your bodyshape (Dr. Pixel adds someone's new shoes to a mesh that way, although they came uv mapped, he didn't do that part - it's in a tutorial on his site).
Lab Assistant
Original Poster
#3 Old 11th Jan 2006 at 4:52 PM
Thanks tiggerypum, getting me closer to what I want to do =)

Yes, deleting larger parts was definately a bad idea, and I try to move instead of rebuild as much as possible. But with moving also comes the most problems related to texturemapping as the faces stretch out. Sometimes you just have to recreate a part though, as the vertexes are all connected "wrong".

What about the alphamap and bumpmap - they probably need their own "map" too, right? Or do they follow the texture map?

Also read - and tried - Dr.Pixels tutorial on adding in the shoes. That's what tuned me in to the "UV Map" in the first place =)

I have seen a brief tutorial on UV Mapping in Milkshape, I will explore that further and see what comes of it - while waiting for your article on the subject =) Still very green at this, so thanks again!
Admin of Randomness
retired moderator
#4 Old 11th Jan 2006 at 5:07 PM
alphamap and bumpmap all use the same mapping as the texture map.
Btw, bodychop doesn't support bumpmaps, and so far Wes hasn't cracked it on the new plugin (yet)
Modtool (with only moving vertices) keeps everything, including bumpmaps.

With moving then you must adjust the texture map as well as you can. And say, if you're making a large skirt, the usual is to allow the texture to stretch over the skirt, although you might consider other alternatives - definitely do what you can to learn about the details of how to modify uv maps in milkshape - you most of the time don't want to make new ones, but I have moved things to make up for some of the stretching and such I've done to uv maps.
Lab Assistant
Original Poster
#5 Old 11th Jan 2006 at 6:03 PM
Unfamiliar with Modtool, since it doesn't allow for adding or deleting verteces. I tried using the "move only" concept for a good while, but I simply can't in the long run =) How about editing the model from SimPE > Milkshape with Bodychop 3.02 and back into SimPE. Then loading it up in Modtool? Will I be able to change/adjust the UV Map in there? Seems like a lot of extra work though. Maybe Sims2 wasn't the brightest idea to start fresh with learning to model =)

No support for UV Map in the Bodychop plugins you say - meaning, my .obj or .ms3d files, if I do manage to get some UV Mapping done to them in Milkshape, will all be gone when export the full body back to SimPE via Bodychop?

Ie, I make several pieces here and there and save them out as .ms3d files. These parts (a belt, shoes, socks, a skirt etc) I import back into the "bodychop model" state and work it into the main model and fatmorph, reassigning joints etc. What you're saying is, any UV Map changes made to the parts or model in "bodychop" state dissapears when exported back?
Admin of Randomness
retired moderator
#6 Old 11th Jan 2006 at 6:32 PM
Actually meshtool combined with modtool 100% allows for adding and deleting of vertices, and full bone assignments. Go check the tutorial I posted only very recently. I made the girl's long gowns with it (most of the others out there have animation or shadow issues or both)

With meshtool and modtool - I made this mesh http://www.modthesims2.com/showthread.php?t=104078 , a similar one in the midsimmer night's dream project, and this one (started with a nude, did have to add points to make some of the shapes work) http://www.modthesims2.com/showthread.php?t=95973

Btw, the info regarding the '3d' option in meshtool was documented in the thread where we download meshtool, that's where I learned about it. It was an addition, and probably not even available when Brianna first wrote her tutorial. (Besides for a tutorial, one usually sticks with the easiest stuff first)

I said no support for BUMPMAP in bodychop, that's a big difference from UV Map. The bumpmap is that extra texture some body meshes have that can add (if the graphics card allows) even more texture to a mesh.

Support for uv map is there - that is how Dr Pixel could import those shoes. I believe that however the object you bring is is uvmapped (separately before bringing it in) is retained - which is why it has to be uvmapped to the very small unused areas on the body mesh. (not sure what you would do with a skirt, unless you are deleting all of that part of the body from the original and have it mapped to the standard spot on the uv map)

Unfortunately you cannot go from one set of tools to another as a rule, because both modtool and bodychop are (said with the utmost respect) hacks - so they have to *rebuild* the gdmc and once we're done editing - and that rebuilt gdmc is not quite the same as the original. At least my experience was meshtool (advanced) crashed when I tried to read a mesh in that was modified with I think Wes' first plugin, and others have reported similar problems when it came to trying to salvage a mesh they hadn't created using the best tool.

PS - it's the modifying of bodies (and other boned objects in the game, but especially bodies and hair) that is the huge extra complex stuff with several tools with various pros and cons and more limited choices. Editing objects that don't animate, that's a place to start if one wants to learn 3-d modeling Or not. I started here, laugh. I still haven't made an object.
Lab Assistant
Original Poster
#7 Old 11th Jan 2006 at 6:49 PM
I'm sorry, bumpmap no, uv map yes - I'm trying to wrap my mind around quite a few things and it gets a bit garbled up =) There was however a tutorial somewhere on how to "slice in" a bumpmap with SimPE in a mesh without one, maybe that works? Not that I need a bumpmap for exactly what I'm doing now - one problem at a time =)

I might give mesh/modtool a try later, but right now I think I have to learn sticking to what I *somewhat* understand =)

I'm going to let all this sink in for a day while I fiddle around more - hopefully I'll be back shortly and continue soaking up your helpful tips. You seem to have run into many of the same hurdles when you learned to do this, so any further help is much appreciated =)
Lab Assistant
Original Poster
#8 Old 12th Jan 2006 at 3:39 PM
I'm getting aaaaalmost there when figuring this out for myself it feels (and thus learning something=), but one aspect still elludes me.

- Downloaded both "UVMapper Classic" and "Lithunwrap" and understand the concept.
- Export (MS+BodyChop) the "body" mesh as a "wavefront .obj" and load that up in either of the above.

And here comes the problem. The UV Map I get from importing the .obj into either of the uvmap programs IS my model, but the U&V points are all wrong. Specially where I moved/added/deleted parts of the original model. Obviously =)

It *could* work as an overlay in some cases, although the parts are disjointed and would make for a horrible texture map to work with, but in most cases the UV Map I'm looking at from my edited model overlaps. Now that's just impossible to texture =)

See uvmap1.gif - this is the map generated from an .obj file of the bottom I'm making. However, it's not true to the "finnished" mesh as it is when exported, but rather how it appeared the very first time the parts were brought together in Milkshape.

Working with MS and the texturing tools within, I'm of the impression (from a scant few non-sims2 related tutorials on UV/Texture Mapping in MS) that the whole mesh is regrouped into new groups and then applied materials. This is where it stops for me - adding anything, groups/materials etc to the 2 groups defined by Wes's BodyChop plugins seems a surefire way to ruin any chance of getting this properly exported back to a .simpe file that will replace the original GDC. Or am I wrong?

I've looked everywhere (I hope) in Milkshape looking for where to move - or add new - the U & V points to their proper places on the texture, but I can't seem to figure this out. At exactly what point in the process of creating a new mesh does the UV come in? And how? Where do I change the points and map the verteces correctly to the texture? Is it made in another format, like exporting an .obj, applying the UV, then reimporting to MS? Maybe I'm just not seeing the tree for all the forrest, but having a working mesh in MS, both meshes (body+BODYMOD.1), with the joints all correctly (re)done, so it will properly export with BodyChop...seems essential. Almost all steps I take between importing a .5gd to exporting a .simpe have a tendency to break everything.

Getting a bit weary here, someone please point out the obvious so I can slap my forehead and say "Doh!" - and everything will be bliss thereafter =)
Screenshots
Scholar
#9 Old 13th Jan 2006 at 1:38 AM Last edited by Dr Pixel : 13th Jan 2006 at 1:44 AM.
In my opinion, the UV_mapping of a mesh is the most critical, and most often overlooked, part of the whole operation.

When you create new faces in MilkShape, they are NOT texture-mapped at all - unless you texture map them the new faces will get their texture from the single pixel at the top-left corner of your texture image.

They will not "integrate" themselves into the existing texture map.

What you need to do is to immediately after creating each face - while it is still selected red - go to the "groups" tab, and regroup it - then you can uv_map it right away.

Otherwise you are going to have to try to re_map the whole clothing section, which can quickly become a nightmare. Because the body shapes are all rounded, and it;s very hard to uv_map them so they don't stretch and smear the texture as it goes around the sides.

This is one reason why it's not a good idea to try to add new faces or delete existing faces from in the middle of the mesh.

It is much easier to make things out of the built-in "shapes" like the sphere, cylinder, etc - because those do create a rudimentary but workable texture map for themselves, which you can then stretch or move around as needed.

Forget using outside mapping tools too - that's asking for trouble in most cases, just stick with the built-in uv_mapper in MilkShape or whatever 3d program you are using. Body mesh editing may seem similar to object mesh editing, but there are many more possible complications to be aware of since the body mesh is not "static", it is constantly moving around in the game.

There is also another extra complication with Body meshes - if you start messing with the UVmap you must be aware that the "bare skin" parts can not be moved at all or they won't align with the "skintone" images any more.

So the best way to go is one of these methods:

1} Start with an existing mesh that is as close as possible to what you want to end up with, then simply alter it as needed. Then make corresponding edits to the existing UV_map - for example, if you pulled a skirt down into a slant, pull the same vertices on the UV_map down in the same slant. It's easy enough to add details like bows to a dress, etc - because these are all "whole" new parts and can be uv_mapped on their own into un-used areas of the texture map. You can create these sort of parts by "drawing" and connecting vertices, or by starting with one of the pre-made shapes and stretching and squeezing it into the shape you want. Then UV_map this part while it is still a separate group, before combining it back into the main mesh.

Or, strictly for the brave:

2} Start with a nude body mesh (the swimsuit mesh, etc) and build a whole new piece of clothing on it - be aware before starting that this is definately going to take loads of time, and loads of frustration. Some people will enjoy the challenge of doing it this way, some don't. I personally don't have the patience for this.
Alchemist
#10 Old 13th Jan 2006 at 2:39 AM
Quote: Originally posted by tiggerypum
Unfortunately you cannot go from one set of tools to another as a rule, because both modtool and bodychop are (said with the utmost respect) hacks - so they have to *rebuild* the gdmc and once we're done editing - and that rebuilt gdmc is not quite the same as the original. At least my experience was meshtool (advanced) crashed when I tried to read a mesh in that was modified with I think Wes' first plugin, and others have reported similar problems when it came to trying to salvage a mesh they hadn't created using the best tool.


There are several different ways that some things can be done within the Maxis framework. Miche & I went at it different ways.
And yes, rebuild the GMDC is the right word. You can import a mesh into MilkShape, save it as a .ms3d file, exit, reload it and export. They function like a pair of translators.
Which reminds me of the old story about the computer translator program English<->Russian that someone put in the phrase "The spirit is strong, but the flesh is weak," and when it came back from the russian translation it said "The Vodka is powerful, but the meat is rotten."

If you want to do the bone/skin weight assignments yourself, I can't think of any reason you couldn't make a model in any (well, most) of the program formats that MilkShape can import from and get it into the game, from your favorite 3D program. Of course, you might have to use two 90 degree rotations and the mirror right<>left tool to go from a right-handed editor like trueSpace or the MeshTool (from the Microsoft 3DX SDK) to a lefthanded modeller like MilkShape.
By this, XYZ (coordinates) in right handed models is -XZY in left handed ones.
You would need to get the bone framework, and scale your import correctly. You can take the appropriate sized model from the game, strip off the skin, and save the skeleton (joints) as an .ms3d file. Import your .obj (or .x or whatever) and save that as an .ms3d, then use the MilkShape File/Merge menu function to reassemble the two parts. There is a scale tool in the MS package to take care of getting the mesh to size up or down to fit the skeleton. Comment the body, assign the vertices to the bones and it should work.
<* Wes *>

If you like to say what you think, be sure you know which to do first.
Lab Assistant
Original Poster
#11 Old 13th Jan 2006 at 9:22 AM
Thanks Dr Pixel, that explains it more clearly. Helps knowing what can go wrong and what MS does in the background when you're not looking =)

I did continue, stubborn as I am with this now, and finally discovered the UV Map in Milkshape. The reason I didn't see it and failed to "get" it, was just the smallest little mistake of not selecting the verteces when adding a material so the map showed up on the texture. I was looking at the texture with no UV map and scratching my head.

Once that was overcome, things became a bit easier. The UV Map in MS itself is quite limited though, and as you say, have a tendency to work against you. Feeling bold, I did manage to get a somewhat workable UV Map exported from MS, and then into LithUnwrap - and even managed once or twice to apply the edited UV Map back into MS and still export the mesh with BodyChop (on some occasions, the very UV Map managed to add in a single new vertex of all things, breaking everything). Quite the progress =)

But the massive amounts of steps and instances where something can go horribly wrong in all this is just staggering. As Wes says, once you understand the modelling, it doesn't matter all that much what you use and I feel this is finally getting somewhere for my own part.

The last and real hurdle - when editing a model - is really the joints. This is what I'm struggling with the most, especially when parts loose their joint assignments on the parts edited, and you have to reassign them. It never works out properly on the first...or second...or third...attempt, and going in and out of Sims2 to check how it looks animated in all the different animations is a real chore. Is there a program that could maybe do this outside of Sims2? Ie, load up your new textured mesh and go through animations like lying down, sitting, running etc? Something like the old MS mdl viewer for Quake. Obviously, with the bottom I'm playing with above, the legs stick out of the skirt when sitting, and a million other small things you discover the hard way, heh.
Back to top