Jump to content

UV Unwrapping Tips and Tricks


Recommended Posts

This is something that probably common knowledge among the more experienced modders out there, but for newbies like me, it was an revelation. I had seen textures done with this technique before, but wasn't aware on how to accomplish it. Then someone let me in on the secret in the kspmodders IRC channel. I haven't seen this particular topic covered in any tutorials, so I thought I'd write one myself.

Suppose you have a relatively complex symmetrical model. For example:

K1NgjAX.png?1

If you take the time to go through, mark the appropriate seams, and unwrap it, your results will look like this:

wTb9RJs.png?1

If you are lazy and just use Blender's "Smart Unwrap" function, you'll get an even bigger mess.

6Gqft5M.png?1

Either will result in many islands without much area to do a texture in, resulting in rather low quality textures unless you ridiculous sizes such as 2048 or 4096. Even at those sizes, the texture will never be good.

Here is an alternate method that will result in much higher texture quality by drastically minimizing the number of islands and allowing more space on the UV maps for the remaining islands.

First, go through your model and remove any components that repeat through out the model. In this case, let's start with the spheres.

ZHnV0NM.png?2

Even reducing to only this level offers a great deal of improvement in the UV Map:

MXiS5Rz.png?1

However, we can go even further by reducing repeated faced within the primitives themselves. In this next screen shot, I've deleted all but three faces in both the cylinder and sphere.

n9sjitY.png?1

Unwrapping this, though, results in an unusual UV map with a lot of wasted space because of the length of cylinder.

3vmMDi8.png?1

There are two possible fixes for this. Either resize the island or edit the model. Resize the island is easier, but would result in distortion in the texture, so not desirable. So I cut the faces of the cylinder in half and unwrapped it again. This results in a much better UV map with minimal wasted space.

JocK0B9.png?1

Now, lets give the model a simple texture:

CM2DqrI.png?1

Once you are happy with the texture, it's time to start rebuilding the model which is remarkably easy.

First, lets duplicate and rotate the faces of the cylinder until we have rebuilt it. For this, I duplicated the entire cylinder, then rotated it 180 on the x axis. Next, I selected the side faces then duplicated and rotated them 45 on the z axis until it is rebuilt.

You'll notice at this point that you have some odd seams appearing in the model.

sA12sGb.png?2

To fix this, select the entire model and "Remove Duplicates" from the Mesh Tools menu.

J6maYtw.png?2

After that, repeat with the sphere.

rFLt5V2.png?1

Then duplicate the whole sphere until it circles the cylinder.

HfnfOIB.png?1

Then duplicate the row of spheres until the entire original model is rebuilt.

ihlQZv2.png?1

The resulting model is identical to the original, but the UVmap allows for much higher quality textures (and easier to create textures).

There are other methods to achieves these same results, this is one way.

Side by Side comparison of the original UVmap vs the Second UVmap.

1CFk2SG.png

Edited by noonespecial
Link to comment
Share on other sites

I'd like to add this to the compilation, but you would need to expand it. Right now this only works if you have flat textures. Noise would result in a lot of seams.

Rotating the bottom half of the cylinder is especially problematic since texture painting over the seam would result in a kaleidoscope effect.

Edited by Cpt. Kipard
Link to comment
Share on other sites

I'd like to add this to the compilation, but you would need to expand it. Right now this only works if you have flat textures. Noise would result in a lot of seams.

Rotating the bottom half of the cylinder is especially problematic since texture painting over the seam would result in a kaleidoscope effect.

I'll be expanding it with a more complex model in the next few days. But, as it's a completed model I'm going to be using, I basically have to recreate it. I'll be using the model for this, which I also used this technique on:

xrS35U.jpg

Link to comment
Share on other sites

First, lets duplicate and rotate the faces of the cylinder until we have rebuilt it. ... (more steps with duplicating faces and meshes) ...

Wouldn't it be easier to use the various duplication modifiers (like Array and what-have-you), and then just "apply"ing those modifiers?

Link to comment
Share on other sites

My suggestion for long cylinders would be to make the texture seamless either horizontallly or vertically, depending on your cylinder UV placement, and extend the UV beyond the texture by equal multiples, and if necessary cap the cylinder with short cylinders, which also blend seamlessly with their respective edges (which will only blend if the UVs are a multiple of the texture width/height.

I hope I'm making this clear. I can post some pics if you need.

I think it's best to rewrite this, otherwise you're just teaching people bad habits.

Link to comment
Share on other sites

It's good to know that all polys don't need unique UV space. beyond that, deciding where t UV seam and how much to tile is a matter of artistic judgement and design necessity. It varies wildly from one model to the next. The saying "more than one way to skin a cat" is rather apt here.

Link to comment
Share on other sites

Wouldn't it be easier to use the various duplication modifiers (like Array and what-have-you), and then just "apply"ing those modifiers?

This was meant to be a newbie introduction to the concept. Arrays and what-have-you are a little more advanced than I intended this tutorial to be.

My suggestion for long cylinders would be to make the texture seamless either horizontallly or vertically, depending on your cylinder UV placement, and extend the UV beyond the texture by equal multiples, and if necessary cap the cylinder with short cylinders, which also blend seamlessly with their respective edges (which will only blend if the UVs are a multiple of the texture width/height.

I hope I'm making this clear. I can post some pics if you need.

I think it's best to rewrite this, otherwise you're just teaching people bad habits.

Sounds more like you're talking about texturing as opposed to uv unwrapping. But, what do you mean by extending the UV beyond the texture? It was my understanding that, generally speaking, the textures should extend beyond the UV. Additionally, multiples of texture width/height. I understand what you mean there. If you're using a seamless texture, the UV should be a multiple of base texture size so the seams line up. But you lost me on the extend the UV beyond the texture part. ;)

It's good to know that all polys don't need unique UV space. beyond that, deciding where t UV seam and how much to tile is a matter of artistic judgement and design necessity. It varies wildly from one model to the next. The saying "more than one way to skin a cat" is rather apt here.

Indeed. I also think experience, as well as artistic judgement and design necessity, is an important factor. This technique isn't applicable to all situations.

To all: Thanks for the suggestions, recommendations, and what-not. I'm still very much a newbie to this ;)

Link to comment
Share on other sites

It's just that unwrapping is something you do only after you have an idea of the texture you need and I think flat textures are so rare that it's best to not give newbies ideas like this.

This is what I meant by extending. If the top and bottom under that UV island are seamless, then the texture is repeated and everything looks fine.

rkiVdjy.png

Link to comment
Share on other sites

It's just that unwrapping is something you do only after you have an idea of the texture you need and I think flat textures are so rare that it's best to not give newbies ideas like this.

This is what I meant by extending. If the top and bottom under that UV island are seamless, then the texture is repeated and everything looks fine.

http://i.imgur.com/rkiVdjy.png

OH! I see what you're saying. Extend the UV island outside the bounds of the UVMap (I probably have my terminology wrong).

Link to comment
Share on other sites

extending outside the UV space works if the texture is set to repeat in Unity before export, this is default and in most instances you won't have any problems. But if it's some texture you didn't export and it was set to clamp in Unity, this method won't work.

Link to comment
Share on other sites

Wau nice but what about this :

KrRbqYm.jpg

A lot of those UVs were mapped manually. As I am looking at it I am asking myself : How the hell I did this ???!!!

So I am looking forward for your another tutorial. I can create model within a week but that UV mapping is killing me. Never done this before. So it is a pain for me.

Thinking that I will start from scratch and create new model. Or maybe will try to create those UVs again. I want to finish this. Working on it for 3 months because of limited free time.

Edited by Jovzin
Link to comment
Share on other sites

That looks a little similiar to this:

2iUeCD4.png?1

I used a different technique while unwrapping this one. I'll improve this tutorial, then do I tutorial on how I did this one.

Although I agree with nli2work. The UVMap on that model is pretty good to begin with.

Edited by noonespecial
Link to comment
Share on other sites

So you are saying that it is quite OK ? Hmm well I think it is a mess. I want to have a simplicity like nonespecial has above. This looks nice very nice.

Hmm I think I should try to recreate those UVs again :( Crap it will be a pain but I will try it.

But I am thinking about recreating the model again too. I am not sure. What are your suggestions ?

Thanks for help.

Link to comment
Share on other sites

For the second tutorial, I'll be using a more complex model.

YUoqa1f.png?1

This is a rather complex model. Let's take a look at the UVMap of it unwrapped.

jWLdpny.png?1

Quite a mess, though it could be worse. A "Smart Unwrap" would generate this result:

YWvVC2E.png?1

If we take a closer look at the model, we can see there are many "duplicate" components:

The fuel tanks (16)

Support Beams (more than 100)

Joints (x96)

Storage Boxes (x4)

Multiple Sections of the top plate

Mounting Plates (4)

So that means there are roughly 234 unique islands in the UVMap. Theoretically, we should be able to reduce this to less than 10 unique islands. As in the first tutorial, now that we know which components are duplicates, let's remove all but one of each. I ended up with 6 components.

gVSogES.png?1

Lets unwrap it and take a look, I ended up with 19 unique islands.

r9rgOqX.png?1

It is much better than the total unwrap, but I think it could be better. I want to change the sizes of the islands to allow for greater detail in some areas and less detail in areas that don't really need it.

4FrIsvg.png?1

It is also recommended that at this point you bake any required textures before duplicating any parts. That will prevent duplicates rendering more than once per island can causing undesirable artifacts.

Pg4pvYD.png?1

Note: As planning a model before building is a very important step before building, it is worthy to note that it was at this step I started the original model. I knew what needed to built, so I made the components then constructed the craft after unwrapping. Unlike what I did for this tutorial, I didn't start with a completed craft and deconstruct it

The next part is much more involved. In the previous tutorial, it was a simple matter of rotating the parts around the center. Not so with this one. Most of the parts will be duplicated and manually moved to the desired location. For simplicity, I will only build 1/4th of the lander.

vKs0LXD.png?1

At this point, it's a simple matter of duplicating and rotating the duplicates to complete the model.

UQri4Ij.png?1

Now the model and the UVmap are complete. Texture your model as you desire and...

wBYvYi6.png?1

Link to comment
Share on other sites

2. Yes, I baked the AO with only the unique meshes in the scene. If you duplicate before baking, the render results are strange.

Wait a minute no you didn't. You duplicated the tank and baked separate AOs without even mentioning anything about it. This step is really important you shouldn't just gloss over it like that.

Also you should bake AO for a single unique section with unused copies of those sections to get a much more natural result.

Also you have at least 3 tanks in that part that would receive very different AO

This is all relevant to a good UV layout. It's exactly why I said that you need to plan reeealy well before unwrapping.

Link to comment
Share on other sites

Now I'm the confused one.

Wait a minute no you didn't.

Yes, I did.

You duplicated the tank and baked separate AOs without even mentioning anything about it.

I did mention that, immediately before the AO baked photo in the tutorial. "It is also recommended that at this point you bake any required textures before duplicating any parts. "

Also you should bake AO for a single unique section with unused copies of those sections to get a much more natural result.

I believe that is exactly what I did and said to do in the tutorial. "It is also recommended that at this point you bake any required textures before duplicating any parts."

Also you have at least 3 tanks in that part that would receive very different AO

For the purpose of this tutorial, I found only one tank was need to illustrate the point of the tutorial. In application, such as the part being used by ChakaMonkey, I used two unique tanks. I don't see why a third would be needed unless you are overly relying on AO to provide shading.

This is all relevant to a good UV layout. It's exactly why I said that you need to plan reeealy well before unwrapping.

I mentioned that myself. From the original post, "Note: As planning a model before building is a very important step before building, it is worthy to note that it was at this step I started the original model. I knew what needed to built, so I made the components then constructed the craft after unwrapping. Unlike what I did for this tutorial, I didn't start with a completed craft and deconstruct it"

So that is the source of my confusion, as all these issues were addressed.

Link to comment
Share on other sites

Do you mind if I have a go at unwrapping this? I'll tell you all my reasons. I just can't in good conscience add this to the list as it is right now.

I don't mind at all. Especially if I stand to learn something from it :D. What is your preferred format?

Link to comment
Share on other sites

I would have baked at the quarter sections that are replicated instead of the lower level as you had it. Although it's not a huge visual difference. The shadow from the square panels can easily be seen as the shadow from the retracted landing legs. the stretched procedural noise on the thin metal struts are more problematic for me.

as far as duplicating before or after baking it's a matter of workflow preference. You can offset overlapping islands by 1 in U or V, and leave only one island in the 0 to 1 UV space and everything will bake just fine without W-fighting artifacts.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...