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 7th Sep 2009 at 11:34 PM
Default Brand New Mesh
Is it possible to make a brand new mesh, with it's own uvmap? Or do we absolutely have to clone?
Advertisement
Alchemist
#2 Old 8th Sep 2009 at 1:28 AM
You have to start with an existing object.

However, you can change almost everything except the number of groups. You just import the mesh, delete everything and import a mesh from a .obj file, or even make one from scratch.

You can change the materials now, use different shaders, and yes, make your own UV map. UV mapping has always been possible, it is just that not so many people know how to make a good UV map. Of course, once you have a good UV map layout, you need to make your textures match it, as well as the pattern map.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Lab Assistant
Original Poster
#3 Old 8th Sep 2009 at 1:36 AM
o.k. that's great, because I used the cd tower to import a locker mesh I made in maya, but the thing is, I would like most of the details on the locker to be from the textures and not from the mesh itself, and I can't seem to make the color show up in game.

So, say I have a locker mesh, and I worked out it's uv's, I can just rename it's uv map, delete the 9 other img files in the cd tower package and just import my texture map in dds format? Also, how would I go about making the locker color recolorable in game?
Alchemist
#4 Old 8th Sep 2009 at 3:23 AM
Renaming the UV map is sort of the wrong idea.

The UV map and the mesh are intertwined in the same file. When you export the mesh, each vertex (point) has a UV coordinate (two values, U and V). These are values between 0.0 and 1.0 that specify how far from the corner, as a fraction of the texture map size to draw the texture from.

The effect is to act as if the texture image is to be cut up into little triangles and pasted onto the mesh. There is no requirement that all of these little parts be contiguous, in fact the only way to get a good UV map is to unfold your mesh so that all the parts lay flat, and that requires "seams" to be added. Except perhaps where you want the backside to be the reverse of the front side, like maybe a stained glass window, in which case you would just map one side.

So, for starting from scratch like you are discussing, you make your mesh, and in that mesh you perform the UV mapping so that it is all unfolded. That's not easy, but it can be done by following the steps (something I am not very good at myself).

Then you can export the UV map as a set of lines to a image file. You use the lines like a coloring book, filling in the parts with your colors. You can go back and forth between adding some color and mapping the texture in MilkShape until it looks right.

Then you use a DDS of your newly made texture together with the new mesh. In these TS3 objects, there are several textures to replace, the specular and the patterns and such. But all of them will follow this new UV mapping, so you use the same guide multiple times.

I just posted a picture of the UV map from the Venus statue from the game here .

The left half is the UV map, the right half is the perspective view of the mesh. So if you make a new texture by coloring a copy of the left half, it will map onto the mesh that is on the right. You can see where the arm stumps are, the breasts, the box parts and so on. So the UV map shows the game how to place the colors on the mesh, the UV map and the texture map have to be designed in tandem.

When you are using the mapping from a cloned object, you have to match your UV mapping to the original textures. But you have an alternative, and that is to replace BOTH the UV mapping and the textures, you just have more than one texture to replace. Items you have seen from places like Stylist Sims are made as complete replacements, where the mesh, the UV mapping and all of the textures are all replacements, rather than modifications of the original game items, leaving mostly just a shell of the materials and group count from the original object.

There are parts of objects you clone from that are not as easily modifiable, like the game script and the slots and footprints. It is much easier to make a chair from another chair than to make a chair from a painting or a statue. There are people here that know how to make these kinds of changes, but you are better off starting with a similar object... in the chair example you need to make the chair the right height, or the sim will sit too high or too low in it, because all of the animations were designed for a standard chair height, rather than a different animation for each different chair. Otherwise, the game might not fit on a dozen DVDs, instead of one.

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Forum Resident
#5 Old 8th Sep 2009 at 11:59 AM
I have a question about mapping.

I always use the cloned objects' DDS files to make my new texture, because I'm afraid that if I just add my own file into the package then the object will just ignore it. And it's easy to just export with that long numbery filename and import it back again after editing, it will go right in its place.

My problem is that most maxis objects have a tiny texturemap, so small that I can't manage to fit my own into it. Doesn't matter that my image fits well in the DDS file, when I recompile, I often get the error from the Object Tool that the UV map "overflows" and then my new object will look all screwy in the game. If I edit the UVscale value, that gets rid of the error message in the recompile process, but the object will still be all wrong. So I go back and adjust the image a bit, re-do the mapping, test again, etc, until I get tired. Then I clone another object that looks like it has a larger texture, and do the whole process again, just to find that I overflow again. And again.
(With my plants I managed to overcome this by shrinking the images and pulling the parts of the map closer together. But what about things that require bigger textures than 10x10 pixels, lol)

Is there any way to solve this overflow problem? Which clonable object has a large enough texturemap? Or am I doing something wrong completely?
Lab Assistant
Original Poster
#6 Old 8th Sep 2009 at 2:00 PM
Yeah, I figured out the UV's but for some reason not only did the color not show up right int he gae, but I couldn't recolor it either, how would I go about editing the new locker so that it is recolorable in game.
Forum Resident
#7 Old 8th Sep 2009 at 2:32 PM
Quote: Originally posted by tammy_trauma
Yeah, I figured out the UV's but for some reason not only did the color not show up right int he gae, but I couldn't recolor it either, how would I go about editing the new locker so that it is recolorable in game.

I admittedly don't know much about the subject but I should think that to keep the object recolorable you will certainly need that image file in your package that has the masks. (Looks all red and green.)
Lab Assistant
Original Poster
#8 Old 8th Sep 2009 at 5:03 PM
I looked for the image mask and it seems the cd tower does not have one, there are two tiny 32X32 dds files in all red, another image in black and white with the outline of the cd tower in white, a specular map and the main texture map file which just contains the cds (with color) on a black background.
Alchemist
#9 Old 8th Sep 2009 at 5:10 PM
Quote: Originally posted by lemoncandy
when I recompile, I often get the error from the Object Tool that the UV map "overflows" and then my new object will look all screwy in the game. If I edit the UVscale value, that gets rid of the error message in the recompile process, but the object will still be all wrong.


I need a better example of what is wrong to give you an answer. What you described doing is supposed to work.

The UV Scaling issue is different from the 10x10 texturemap issue. A UV Map is a size-independent item... A UV coordinate of 0.5,0.5 is exactly in the center of a texture map, regardless of whether that texture map is 10x10, 128x128 or 1024x1024. The center of each of those will be a different pixel, 5,5; 64,64 or 512,512; but the same UV value works for any of them.

Have you tried just making a bigger texture map DDS file?

<* Wes *>

If you like to say what you think, be sure you know which to do first.
Forum Resident
#10 Old 8th Sep 2009 at 6:41 PM Last edited by lemoncandy : 10th Sep 2009 at 11:46 AM.
Quote: Originally posted by WesHowe
What you described doing is supposed to work.

Okay, I will do some more testing tonight!
Quote:
The UV Scaling issue is different from the 10x10 texturemap issue. A UV Map is a size-independent item... A UV coordinate of 0.5,0.5 is exactly in the center of a texture map, regardless of whether that texture map is 10x10, 128x128 or 1024x1024. The center of each of those will be a different pixel, 5,5; 64,64 or 512,512; but the same UV value works for any of them.

Ah thanks, I didn't know that, sorry. This is the typical case where my n00bness shines through
Quote:
Have you tried just making a bigger texture map DDS file?

Not yet, I was worried that would be an even worse idea
I was aiming to make it as small as I could. I'll try it.
Forum Resident
#11 Old 8th Sep 2009 at 6:52 PM
Quote: Originally posted by tammy_trauma
I looked for the image mask and it seems the cd tower does not have one, there are two tiny 32X32 dds files in all red, another image in black and white with the outline of the cd tower in white, a specular map and the main texture map file which just contains the cds (with color) on a black background.

Yes you are right, I just checked it, strange, but the CDtower *is* recolorable...
Hmmm, maybe then the solution is in the alpha channel of those DDS files you mentioned. Usually the alpha of the texturefile has black parts, that's where the recolorable parts of the object are, the white where the static texture is.
Lab Assistant
Original Poster
#12 Old 8th Sep 2009 at 7:15 PM
yes, I found this image, and for some reason I've tried making the recolorable parts black AND white in the alpha (I tried with black, and with black) and still my item shows up red in game and is not recolorable...? Do you have the time to maybe look at the file for me?
Forum Resident
#13 Old 8th Sep 2009 at 8:36 PM
Quote: Originally posted by tammy_trauma
yes, I found this image, and for some reason I've tried making the recolorable parts black AND white in the alpha (I tried with black, and with black) and still my item shows up red in game and is not recolorable...? Do you have the time to maybe look at the file for me?

I just tried making a recolorable part in an object and failed so I'm not much help
Alchemist
#14 Old 9th Sep 2009 at 12:33 AM
Ah, the UV Scales will not have a useful result if you are not changing both the UV Map and the texturing.

Here is the way it is... when an object was made, the exporter EA used set the UV Scales value based on how much of the original map was actually used. If only 85% of it was used, for example, then they set the scale value larger so that the 85% occupied 100% of the space. This is why, if you use any UV space that is larger than the original, you get an overflow (I build a check for this during export).

Your problem comes about because while you changed the UV Scales, the scaling that was imported does not automatically change. So the original needs adjusted in order to use a new UV Scales value.

The cure is either to stay within the "bounds" of the original UV mapping, or to replace the entire UV mapping. The second choice would be for people that are completely replacing something with a new mesh, and was primarily what I was aiming to fix. It is possible to actually adjust the UV Scales value AND to rescale the UV Map, but you would have to struggle with the math to do this... and it wouldn't be pretty.

So for your books, if you want to use the original texture maps, you need to stay within the confines of the original UV map, essentially no lower than the lowest existing point and no further right than the rightmost point.

The UV Scaling is, in my opinion, an over-engineered feature of the game engine EA is using. In a practical sense, it's effects add nothing measurable to the accuracy of the modeling, at the cost of a lot of extra effort for making and loading objects. I base my opinion on a practical measure of the gain. If the 85% map is expanded to 100%, that increases the scaling by (about) 17%. So yes, 17% of a 1024x1024 texture map is 180 pixels. But, in reality, each pixel of the texture map occupies 1/1024 of the UV map. With a fixed scaling, the UV map can position a UV point within 1/32 of each pixel. A 17% increase means we have changed from 1/32 to 1/38 of a pixel. So if a good job of creating the texture map and the UV map was done in the first place, the possibility of being even one pixel off because of rounding error (from fixed point to floating point) is pretty much absent. Thus, it makes no sense to go to great pain for no gain.

But, this is the way it was designed, and we have no choice but to work within the system here. So either live within the existing UV Scales bounds when modifying an object, or replace the whole UV map and change the UV Scales value.

No cake may be eaten... sorry.

If you like to say what you think, be sure you know which to do first.
Forum Resident
#15 Old 9th Sep 2009 at 11:39 AM
Thank you very much for the plenty of information, Wes. Some of my confusion about meshing has just cleared up now!

Quote:
The cure is either to stay within the "bounds" of the original UV mapping, or to replace the entire UV mapping.
So my mistake in the above example was that I left the little thingy on the right alone, it's from an EA bookcase (I just made the books using the 'box' tool in milkshape and created new mapping for them).

Quote:
you need to stay within the confines of the original UV map, essentially no lower than the lowest existing point and no further right than the rightmost point.
Ah that's very useful to know! I couldn't really imagine before, in which way I'm supposed to avoid the overflow, now it's clear! To think of it, I did have more success while fixing my plants when I was aligning the parts to the left...

You guided a lost soul again on the path of frightening computer stuffs. It's a shame that so few of the knowledgeable people are willing to help out the learning. So I present you the Helpfulness Award!
Thank you for your help.
Back to top