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!
The ModFather
retired moderator
Original Poster
#1 Old 28th Jul 2005 at 9:15 AM Last edited by leefish : 17th Jan 2014 at 7:44 PM.
Understanding UV-mapping (with UVmapper Classic)
UNDERSTANDING UV-MAPPING
Basic UV-mapping using UV-Mapper Classic


Read the Additional Hint & Tips by Darylmarkloc in Post #42


DISCLAIMERThis is NOT a tutorial; it is intended to help average-experienced object creators performing specific tasks, or to give users a deeper in-sight on specific modding-related subjects. So, don't expect to find step-by-step explanations, to be performed "blindly". Please DO NOT REPOST the following info, or part of them, on other sites.


-------------------------------------------------------------------------------------

SUMMARY
This notes will explain the basics of the UV mapping tecniques. In the following examples, I've used UVmapper Classic, but all these info apply to UVmapper Pro, as well (only the menu layout is different, but all the functions of the Classic version are included in the Pro, too).
This InfoCenter article is also provided in PDF format. To view it, we strongly suggest to download the Foxisoft PFD Viewer: it's free and small, less than 1Mb!

-------------------------------------------------------------------------------------



1 - INTRODUCTION

UV-mapping is used to apply a 2D texture over a 3D mesh. In order to achieve such a result, any UV-mapping program needs to create a "projection" of the 3D mesh over a 2D plane.

Every creator wants to give the maximum level of details to his object. You may think that the best solution is to use large textures. Wrong! The best solution is to make the most efficient use of a medium-size texture.
Even a simple programs like UVmapper Classic allows many different types of "projections", so our first goal is to choose the most suitable UVmapping method, regarding the kind of mesh we want to map.



2 - ALTERNATIVE MAPPING METHODS

The most common - and most (mis)used - mapping method is the Box mapping.
This is the most suitable method if you want to map an object that resemble a cube (examples: counter, dishwasher, boombox radio, dining tables...).
If we map, for instance, a simple cube using the "Box" method, we'll have a map like this:


As you can see, all the faces of the cube are clearly visible (and that's good), but there are large parts of the textures that are empty: what a waste!
In UVmapper Classic, when you select the "Box" entry from the "Edit" / "New UV map" menu, you are presented this option window:

By default, the "Split Front/Back" option is checked. But if we uncheck this option, we'll end up with a map like this:
As you can see, each pair of faces are mapped on the same portion of texture: it's very useful if we need to apply a uniform texture (wood, metal, glass...), so that all the faces are supposed to look similar.
This way, we use a larger part of the texture, and this ensures a higher level of detail.

Now, let's say that we want to map a cylinder. If we use the standard "Box" mapping, this will be the result:
All the faces are visible, but the surface of the cylinder (excluding the top and bottom round faces) is splitted in four: at this point we can't apply to the cylinder a texture that runs all around it.
UVmapper Classic offers an alternative: the Cylinder map:
Now the cylinder surface is not splitted, and moreover it covers most of the texture (= high detail); but where are the top and bottom faces? We can see them inside the red marks: they are barely visible because they show only their side, that is only a thin line.
Nevertheless, this method is perfect for cylindrical objects, whenever the top and bottom faces are not visible in game (for instance, the "Social Climbing" floor and table lamps).

On the other hand, if we need to have a good-looking top and bottom faces, we can choose the Cylinder Cap map:
Now *all* the faces of the cylinder are clearly visible; the drawback is that each part is assigned to a smaller portion of the texture (= less details).
The Cylinder Cap method is suitable for pyramids and cones, too:
Just be sure to select the right projection axis from the option window: you have to choose the radial symmetry axis (in a cone, for instance, it's the axis that passes through the top vertex and the center of the base; if the object stands vertical, choose the "Z" axis). If you are unsure, try the different axis: you'll know that you have chosen the wrong axis if your cone is mapped like this:

A useful option when mapping a cone, or a pyramid, or any other object with one sharp end, it's the "Spread Facets at Pole" option. When selected, the top vertices of the slanted facets are "spread", in order to give a more regular look to the map:
Check this option if your texture is uniform; uncheck it if you want a special decor to run flawlessly all around the object.



3 - MAPPING COMPLEX OBJECT

So far, we have mapped simple meshes, like cubes, cylinders and cones.

Let's say that we have to map a more complex object, like this:

This object contains a cube, a cylinder and a cone: what mapping method can we use for it?
We'll use multiple mapping methods; we only need to split the object into separate parts, and then apply different mapping to the different sections.

Let's start with a simple "Box" mapping (with the "Split Front/Back" option checked):
Notice how many parts overlap each other (red marks): if we'd leave the map as is, part of the cylinder colour would be visible on the cube side, and the base of the cone will have the same colour of the cube face. We definitely need to separate the various parts...
You can select a portion of the map like in this picture:
Notice how the selection box surrounds part of the cylinder face without touching the cube face. When you releas the mouse button, the whole cylinder face will be selected, and not the cube face:
Now you can drag the selected face in an empty part of the screen, and continue selecdting another face:

Go on selecting faces this way, and moving them to empty parts of the screen, until you have ordered and grouped all the faces of each mesh part on a separate part of the screen:

Now we are able to apply to each mesh part a specific mapping method: we can select the cylinder...
...and apply the "CylinderCap" mapping only on the selected part of the mesh :

Then, we can apply a "Box" map on the cube and a "CylinderCap" (with the "Spread Facets" option) to the cone.

We are not done, yet: the texture is still *not* efficiently used. We need to reorganize the faces on the texture in a more regular way; to do so, select single faces and drag them, trying to create a "square", like this:

Last step: select all the faces at ones and enlarge the selection until it covers the whole texture.

As an alternative, if you have a uniform texture and you want a higher level of detail, keep in mind that you can always map multiple faces over the same portion of the map, i.e. you can place multiple faces on top of each other, so that they will overlap. In the following example, I have moved all the cube faces in the upper-left corner, all the round faces (from the cylinder and the cone) in the upper-right corner, and the main surfaces of the cylinder and the cone at the bottom:





-------------------------------------------------------------------------------------

OTHER USEFUL RESOURCES

Modding InfoCenter Index - Comprehensive list of all the InfoCenter threads
Object Creation Workshop and Repair Center - If your object doesn't work, no matter what you try
Colour Options for "EP-ready" packages - About the texture linking tecniques
Sims 2 start to finish Object Creation Tutorial - Learn how to create your own object





-------------------------------------------------------------------------------------
Screenshots
Attached files:
File Type: rar  Modding InfoCenter - PDF - Understanding UV-mapping.rar (1.08 MB, 1032 downloads) - View custom content

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Advertisement
Instructor
#2 Old 28th Jul 2005 at 10:38 AM
Thank you, Numenor!
Another great explanation from you
To understand what you're doing is more important than reading what you have to do next on this one object in a tutorial (as these are a sort of 'basic step' in understanding) and your UV-mapping explanation really helps me a lot in understanding the stuff I do (as if I understand myself... )

Yes, I am serious though I'm not serious at all. I'm serious about this!
Even the joker can be deadly serious...
Wichtig ist, was hinten raus kommt!
Entscheidend daran ist, wie?
Mesh Maestro
#3 Old 6th Aug 2005 at 10:16 PM
Great Job again my friend!!! Only took me a week to find the thread... My bad so busy... I am adding a link to it to the workshop thread
Fluffy
retired moderator
#4 Old 6th Aug 2005 at 10:18 PM Last edited by Lethe_s : 6th Aug 2005 at 10:21 PM.
ah, this was much needed
especially by me :D
thank you
Lab Assistant
#5 Old 6th Aug 2005 at 10:22 PM
Oh thank you thank you!
Once again you share your knowledge with us.
I am so greatful.
Lab Assistant
#6 Old 6th Aug 2005 at 11:20 PM
Thank you so much for putting this down in such a way that I could understand it! I can finally UV map!! Now there's no stopping me.... muh hah hah!

No, really, THANKS!

Lab Assistant
#7 Old 7th Aug 2005 at 9:22 PM
Thank you very much, know I understand much more , it was very helpful !!
Birgit
retired moderator
#8 Old 9th Aug 2005 at 5:48 AM
Darn. I understand much better, but I'm still quite lost when it comes to things like sofas. My textures are always too stretched across every part except for the back of the sofa and the front cushions.

Sniff, sniff. May I have an example of a couch? That would be OH so helpful.
The ModFather
retired moderator
Original Poster
#9 Old 9th Aug 2005 at 9:16 AM
I've run some tests with the Club Distress loveseat: like most of the "seating" objects, it has a complex mesh and a complex UVmapping. If you want to see the original Maxis UVmapping, download these templates made by RGiles.

To map your custom sofa, I suggest the "box" mapping with the following options:

Split front/back: NO
Gaps in map: YES
Scale result: YES

With these settings, I've got the result shown in picture (a test cequered texture was applied, to show that there are no unwanted "stretchings".

The second picture is the actual UV-map template (but don't use it: it's a low-res pic; create you own, instead).
Screenshots

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
retired moderator
#10 Old 9th Aug 2005 at 2:10 PM
Aha! This is exactly what I needed. I thank you! Are RGiles templates for recoloring? I already have those. I just needed to see how the UV mapping should look.

I should have hollered for help ages ago. I've been struggling with one sofa for almost 2 weeks.
The ModFather
retired moderator
Original Poster
#11 Old 9th Aug 2005 at 3:41 PM
Here is how the original UVmapping looks: quite confusing! Compare this map with RGiles' template to understand what portion of the map corresponds to what part of the template
Screenshots

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
Field Researcher
#12 Old 12th Aug 2005 at 2:25 AM
MUCH THANKS!!!!! It's like finding a treasure. so happy.
Forum Resident
#13 Old 14th Aug 2005 at 12:58 AM Last edited by Mutantbunny : 14th Aug 2005 at 1:07 AM.
I made a new mesh--a sign based off the clothing sign.

I haven't found the right UVmap to use. This one is the cylinder cap map--doesn't look right to me....? So I am trying the box first and moving stuff around, per your example above.

Does the map size refer to the orginal txtr size (256x256)?

Does the size in the map size box always need to be the same as the original file?
The ModFather
retired moderator
Original Poster
#14 Old 14th Aug 2005 at 9:57 PM
My suggestion is to use, for a hanging sign like that, a "Planar" mapping along the X axis; if you need to paint differently the two sides of the sign, use the "split" option; otherwise, use the "don't split". You should end with a map depicting the two circles, the two metal support of the circles and the metal bar (viewed from its side). This should be the most suitable mapping for this object, even without moving around the various parts.

As for the size of the texture, the best is to use a 256x256. If you need more detail on the round signs, you can select them using the technique explained above and move/enlarge them, to let them occupy a wider free portion of the texture.

There's no need to use the size of the original TXTR, as long as you use the DDS utilities to import the new texture.

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
retired moderator
#15 Old 15th Aug 2005 at 3:26 AM
I have a question, Numenor. This is for an armchair I'm now working on. I finally got the mesh to look right in the game, but my mapping is still off.

I cloned a chair from the game to use as a base (forget what the object is called). Anyway, my new armchair has the fabric, the wood legs and a pillow. I can map them okay, but the problem comes when putting it all back together in SimPe.

The original chair's fabric texture is 128x256, and the wood part is 256x512.

How do I map these? Do I have to map twice, with only the fabric in one and the wood and pillow in the other?

Using UVmapper Classic, I'm not sure how to do this.

Should I export from MilkShape only the cushion and wood and map that? And then export again just the fabric part and map that?

Me is SO confused!
Mesh Maestro
#16 Old 15th Aug 2005 at 5:37 AM
I am guessing that Numenor is most likely sleeping so I will try and help you out here...

Quote:
Should I export from MilkShape only the cushion and wood and map that? And then export again just the fabric part and map that?


Yes that is exactly what you should do... Remember your textures can be any size as long as they are divisible by 2. I recommend being as sufficient as possible, 99 times out of 100 I do not make maps bigger then 512x*

Reading is the key to all knowledge, math is the key to everything.
retired moderator
#17 Old 15th Aug 2005 at 6:30 AM Last edited by Grapholina : 15th Aug 2005 at 6:32 AM.
Thank you! I'll try that and see how it goes. I tried applying a flowered material as fabric, but when I view in game, all it shows is the basic color of the fabric, not the flowers. I.e., solid green, as in the background of the material.

Why is that, do you know?

I didn't have that problem when I made the sofa.

And thank you (Numenor and JWoods) for being so patient with me. I'm really trying hard to learn as much and as quickly as possible.
Mesh Maestro
#18 Old 15th Aug 2005 at 6:35 AM
Could be a few things, Material Definitions or texture size to name a few... You can allways upload to the O.W. thread and I would gladly check it out for you.
The ModFather
retired moderator
Original Poster
#19 Old 15th Aug 2005 at 9:06 AM Last edited by Numenor : 15th Aug 2005 at 9:10 AM.
Grapholina, if the .obj mesh is composed by different groups, you can select and map the groups one by one using the menu Edit/Select/By Group (I usually use the keyboard shortcut, CTRL+G):



Once you have selected a single group, hit the apostrophe key: all the other groups will be hidden, and you can easily work with only the selected group.

This is an undocumented feature of UVmapper Classic, and there is no way to make visible again the groups that you have hidden: you have to save the work and re-open the file. Apart from this little problem, this feature is extremely useful.
Screenshots

I've finally started my Journal. Information only, no questions.

My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD)


I *DON'T* accept requests, sorry.
retired moderator
#20 Old 15th Aug 2005 at 2:05 PM
Oh! That is really nice to know. I've been using the Tile menu and therefore, even after I selected a group, I couldn't get rid of the others. I've been manually making my own maps.

As for the texture thing, the problem was that I had forgotten to apply materials to the mesh. I took it back into my program, applied the materials, and voila! Now I have texture.

Thank you for your help. If we can get through all of my questions, maybe we'll have a brand new living room set to play with.
Forum Resident
#21 Old 15th Aug 2005 at 11:52 PM
Thanks, NUmenor. I'll try that.

Can bad mapping result in an invisible object? Or would it just result in a badly covered object?
Mesh Maestro
#22 Old 16th Aug 2005 at 1:01 AM
Bad mapping will not cause an object to be invisible just make it look a bit "yucky"...
Forum Resident
#23 Old 16th Aug 2005 at 1:21 AM
Thank you JW.

*sigh...back to the why is my object invisible thread...*
Space Pony
#24 Old 27th Aug 2005 at 12:11 PM
Thank you for this - it's great! Do you know of anything similar for clothing? I know - it's basically the same but....... it is different
One horse disagreer of the Apocalypse
#25 Old 9th Oct 2005 at 6:30 PM
Is there any way to tell UVMapper Pro that you are going to use a 256x512 texture file so that it gives you a long thin mapping area to lay out your pieces on? I moved my parts over to the left leaving the right of the square empty, and asked for the template to be saved onto a 256x512 image, but all that happened was that I was expected to paint my image all long and thin down just one half of the texture image otherwise it got stretched out and half missing.

Also is there any way to select an area and ask UVMapper to double its size in one direction only? Do we only have freehand pulling?

"You can do refraction by raymarching through the depth buffer" (c. Reddeyfish 2017)
Page 1 of 4
Back to top