B Tutorial 3D Extension Tutorial - Unwrapping in Wings 3d

Users who are viewing this thread

Yoshiboy

Count
Chapter 1 - Introduction

So, first of all. What is unwrapping, or UV mapping.

Unwrapping is transferring a 3d model onto a 2D imagine so that you can apply a texture to it. Everyone has had to draw out the "net" of a cube in school to see what it would be like if you took it apart and laid it out flat. Its exactly the same principal.

unwrappingtut1.jpg

unwrappingtut2.jpg


Alternately you can think of it like stickers. Each piece is like a sticker that you stick in the relevant place on the model. This leads us onto one of the big issues of unwrapping: stretching. See how the top of this deer has a nasty liney and stretched effect across it. This is because on the 2D unwrap to the side the faces sizes are not proportional to the actual model. This causes the computer to try and stretch all those pixels across a small area and leaves this nasty effect, this is something you want to avoid. Its like a sticker that isn't big enough for the face and it has to be pulled out to fit. You will see how to avoid this effect later.

unwrappingtut3.jpg


The other thing to avoid is making it into too many pieces. This becomes hell to draw onto and organize and you get lots of seams. Too many seams are another horrible thing to have, even though you cant avoid them. Seams are the edges to the unwrap pieces. Its like having to try and line up stickers when your drawing them in two different places. Usually it doesn't quite fit and makes it look nasty.

unwrappingtut10.jpg


On this milk bottle you can clearly see the seams running down the front.

Now, lets get the hang of the process involved in unwrapping something in wings3d, and the interface:

Before we start looking at this i would require you turn on advanced menus in wings3d. If you don't have these on already then your missing out! They contain heaps of useful tools and such.

To turn on advanced menus go: edit > preferences... click on the "Advanced" tab and tick the "advanced menus" box.

Chapter 2  - The outliner, materials and textures.

Now, when you have a model there will be a material applied to this model and its faces. Its through this material that the computer knows what texture to stick onto the faces. Managing materials in wings3d is relatively easy. Open up the outliner window (window > outliner) and take a look. Listed you will have the following:

A list of objects, followed by a list of materials, followed by a list of any images you have in the file.

unwrappingtut4.jpg


In the example picture i have two objects. One is called "image1", one is called "cube2_cut3". I then have 3 more materials "_hole_" (this is an important material. Because Wings3d doesn't support Open geometry, any gaps in geometry are represented with the "_hole_" material. When you render it appear a semi-transparent blue.)  "default" (your default material obviously :wink: ) "default2" (another material i created) and "image" (another material i created)

we then have 3 more images. My reference picture of the reindeer, the automatic unwrapping image, used to test stretching (more on that later) and my texture file for the reindeer.

Currently the reindeer mesh has the "default" material. We can test this by selecting the "default" material, right clicking and clicking "select". This will select my mesh.

If you select the material and right click, then go "edit_properties" we can take a closer look at this material:

unwrappingtut5.jpg


unfortunately the material properties don't get exported with the mesh. But its still good stuff to know :smile:
Ok, some things with the outliner.

To add a new material you can either select an existing material, right click and press duplicate or without anything selected select "material..." from the right mouse button menu.

to re-name a material simply select it, right click and go "rename". Materials names do in fact get stored on exporting a mesh if its applied to the whole thing thats exported, so this can be useful.

to import a new image into the outliner go: File > Import Image...  and select it from wherever.

to apply an image to a material simply select it, drag it over the top of the material you want to apply it to and select "diffuse". This part is telling how you want the material to react to the texture. Like shown in the material properties above we want the texture to change the colour, so we select diffuse. The other options are a little more complex and you don't need to know about them.

To delete a texture applied to a mesh, like shown in the material properties above. select the material, edit the properties and press the little delete button next to the relevant texture.

To apply a new material to a mesh you select the mesh (either faces of object) which you wish to apply the texture to, select the material you want to apply from the outliner and click and drag into the view window. Release the mouse button and you should be given the option to apply the material to the selection.

unwrappingtut6.jpg


Chapter 3  - Unwrapping phase 1

Now that we have all of that sorted, lets learn how to unwrap!

Now, unwrapping comes in two fazes, first of all you need to tell the program how to take the model to bits, then you need to organize your peices on the 2D sheet to make best use of the space required.

Now, to get to the first faze we select the faces or object that needs to be unwrapped. We then select ".UVMapping."

This should open up a new window with the mesh in.

There are two main ways of unwrapping the mesh, projection mapping and unwrapping -



Projection mapping

Projection mapping is essentially breaking up the model into different colours pieces. These will be the separate 2D pieces that will be laid flat onto the 2D image. To colour the separate parts you simply select the faces you want, right click and select the colour you want the to be. You can also use the automatic unwrapping options that wings3d comes with. These will add projection mapping colours to the faces and occasionally cut lines. To use this right click and select "Segment by" followed by "feature detection" or "projection". The main problem with these is simply that they don't work very well and either require massive cleaning up operations one used or that they do completely rubbish projection faces.

You can also assign faces to the "ignore Faces" option. This will simply make it so they don't appear on the unwrap.

The advantage with using this technique is that its pretty clear what the pieces are on your model but the main disadvantage is that selecting all of the faces becomes very very time consuming and it can often be quicker not to use this.

unwrappingtut7.jpg


Edge Unfolding

Edge Unfolding (or whatever its called) is my preferred method of unwrapping meshes. Its pretty similar to the method above, but instead of colouring all your pieces, you only mark out the areas that divide the pieces, or the areas that you want "cut". Take a look at the top again, there is a picture of the net of a cube, laid flat onto the image. I used cut lines for that, and cut along the places just like in real life where you would place the cut lines to unfold a cube.

the main advantage of using this method is that it is altogether quicker than the one mentioned above. Using the "L" key you can select whole loops of edges, which is usually very useful for marking out with cut lines. To mark out cut lines, go into edge mode and select the lines you want marked, then, in the right mouse button menu select "Mark Edges For Cut"

unwrappingtut8.jpg





Ok, now once you've marked out all of your pieces using either method, its time to move onto the second faze. To do this i need to tell you about the different ways the computer can unfold these pieces.

In you go into the right mouse button menu and select "continue" you will see it give you a few options.

The first of these is unfolding. Unfolding is the traditional way of unwrapping a mesh. What it does is fold out the mesh where is can and try to get the most proportional representation for every face. Although this is very useful in places, for organic modelling and lots of other situations, it can sometimes cause the all dreadful stretching when it tries to create an even representation.

unwrappingtut9.jpg


As you can see at the top of this shuttle model, it bends the squares, making them into odd shapes and making them larger in places and smaller in others. This is a really horrible effect and although it lets some pixels be assigned to the edges, of where the top bumps up and down, it more or less screws the whole top of the unwrap making it horrible to work with.

Saying this unfolding can greatly reduce seams and is essential in some places. When your unwrapping a cylinder for instance all you need to do is make one cut line down the edge of one of the faces, then, when you unfold it it all gets pulled out into one long face that is easy to draw on and only has one nasty seam.

unwrappingtut11.jpg


The second two options are pretty straightforward. "Projection normal" and "Projection camera". What they do is either take the normal of the group of faces in every piece or the normal of the camera and take a 2D image of that piece and stick it down. This is very very useful for animals and when you are working from reference images. If you scroll back up to my picture of the reindeer you can see that this is what i have done with the reindeer. It means that if can fit onto the reference picture almost perfectly and i don't have to create a whole new texture. Like i mentioned above, the main problem with this is the stretching that you get at the top and the bottom of the model.

Finally you have Sphere Map and Cylindrical Map. You don't really have to worry yourselves with these two options, cylinders get unwrapped easy enough using the unwrapping method mentioned above and on my wing3d i cant quite get sphere mapping to work :wink: :razz:

Now, picking these from the continue menu is pretty easy. You simply want to pick the one that most of your pieces will be relevant to because if there are any pieces that you want done in a different way then that can be completed later.

So, pick which unwrap option you want and if everything goes well you should be presented with the 2D unwrap window with your pieces laid out over it. Not only this, but a checkered alphabet pattern will be applied to your model to show up any major areas of stretching.

If at this point your planning to unwrap this model onto an existing M&B texture then skip to the extra "Unwrapping to an existing texture"

Chapter 4  - Unwrapping phase 2

now, its in this area that you want to organize your unwrap pieces into the most efficient area. You want to make sure that there is the most space covered by the unwrap pieces because this will make your model and texture much more efficient in game and easier to use. To move, rotate and scale the pieces, simply select them and select "move", "scale" or "rotate" from the right mouse button menu. Its also at this point that if you have any other pieces that need unwrapping in a different way, like unfolding or projection normal, that you can deal with them. Simply select the piece you want and in the right mouse button menu select "ReMap UV" followed by your selected method.

Also, if there are any pieces that need to be broken down even further or any pieces that need to be connected together again where they were broken you can do that as well. At the top select Edge mode and then all you need to do is select the edge you want broken, or edges you want stuck back together and select "Cut" or "Stitch" depending on what you want done. Remember after this that you may have to use the "ReMap UV" command to get a nice shape.

unwrappingtut12.jpg


Now, dealing with duplicate or mirrored UV pieces in wings can be a hassle. Its usual practice to get the UV pieces and place them on top of each other when you have pieces that are the same to save texture space. Unfortunately there is no easy way to do this in wings, you just have to move, rotate, scale and flip until you get them more or less lined up. Some commands that can be useful in this process are "Move To > Center" and "Scale > Max Uniform". This can just help to align them up most of the time.

Now, if your unhappy with your unwrap and you want to start all over again its pretty simple. Select all the UV pieces and select "Delete" from the right mouse button menu. When you close the 2D unwrapping window and try to unwrap the object again it will revert back to the first faze of unwrapping, with the 3d model.

Chapter 5 - Finishing up.

Now you have all your pieces placed nicely and lined up your ready to be exported and made into a texture thats exactly what you are going to do.

Simply right click and select "Create Texture" from the menu.

Then select the size of the texture file template you want to create from the menu, select the line thickness ( i would advise 1 on this one) and your more or less ready to go. Click on and your window should get a white background.

Close the UV mapping window (don't worry, you can get it back again simply by selecting the model and selecting "UV mapping" again)

Now, look into your outliner, a new image as well as a new material should have appeared listed, the material should have the same name as your object with _auv on the end and the texture is the one that looks like an outline of your unwrap on a white background. The texture will be applied to the material, and the material will be applied to your model.

This is your unwrap template, something that simply tells you where to place your textures so that they will appear in the right place on the model. You'll want to import this into whatever program your planning to use for editing the texture, so select the image, right click and instead of going "export" select "make external..." What this does instead of export is make it so that wing is constantly importing this file from wherever you export it to. This in turn allows you to have a more or less live feed from texture file to model.

Select where you want to export the texture file to and save it. All you do now is open up this texture file in whatever imaging editing program you use, save, and then when you want to see it on the model, select the texture, right click and press "refresh".

So, that it. You've successfully unwrapped your model, and prepared yourself for texturing it. No problem.



Unwrapping to an existing texture

Now, if you planning to unwrap to an existing from M&B then you will need to convert the texture you are wanting to unwrap to into a .BMP file so that it can be imported into wings3d.

Close the UV window, so your back to mesh view. Import your texture that your using in .BMP form and assign it to a material you are using on your model, then apply this material to the model.

Select the model and click "UV Mapping" again. This will bring up the 2D unwrap window, but instead of having the checkered background you should have a background that is the same as the texture you imported. Align and move up the pieces of your unwrap into the relevant places they should be and your more or less done.

Make sure that when you import the mesh into M&B you give it a material that links to the correct native texture file you changed to a .BMP and thats about it. :smile:



Finishing Notes

Ok, if you have any suggestions or problems with this tutorial, if you spot any errors or mistakes with it then please please point them out to me in a PM or by posting in this thread, i will try to change it when i can.

Thanks,

Yoshiboy
 
Great work Yoshiboy.
I think this tutorials should be stickied in one big thread its really hard to find these gems in this mess.  :smile:
 
unfortunately i have a limit to the number of charaters i can put in my sig, and i dont think it would be appropriate to post a new thread just linking to all my tutorials. (unless i do many many more :razz: )
 
What we need is a clear thread linking to all modeling & texturing tutorials, aswell as linking to all mod that need more modelers  :razz:
just simple and clear.

BTW: yoshi, I made all my Tuts in one thread so I wouldnt have the sig problem  :razz:
 
OKay, I'm having a problem with unwrapping. I've done it this way many times before without problem, but this is the first one I've done that has been my own model done from scratch.

http://img412.imageshack.us/img412/551/wings3dproblemvm3.png

Okay, as you can see I have highlighted a specific part of the mesh. When I was marking the edges to be cut, I made a seam right down the middle of the helmet, cutting it into two halves. For some reason, when it was unwrapped, it did not follow that seam.

Here's another problem:

http://img388.imageshack.us/img388/2968/wings3dproblem2oy6.png

As you can see, there are these two wierd faces that are...um, wierd. There are two similar faces at the back of the helmet. What's going on?

Help please?
 
I suggest using the color-projection mapping thing. I find it a lot easier than calculating which edges need to be cut. Just simply select some faces and assign them together.
 
Will do. Have you ever had any similar kind of problem like this before? Or have seen it before?

One more thing: I applied a simple texture to it, exported it and viewed it in BRF editor. Those odd faces were normal. So I don't know what's going on there. I think it might have something to do with Wings3D's smoothing or something.
 
Okay, I tried it, and it just tells me that it cannot create normal for chart. It shows a highlighted part of the mesh, I'm guessin gthat's the problematic area, so I tell it to ignore those parts, but it still gives me the error and doesnt even highlight anything.
 
Dwinny said:
Okay, I tried it, and it just tells me that it cannot create normal for chart. It shows a highlighted part of the mesh, I'm guessin gthat's the problematic area, so I tell it to ignore those parts, but it still gives me the error and doesnt even highlight anything.

You probably have a part of the mesh it can't split up properly, add some more cut lines to it or something.
 
Okay, another thing.

I've edited an existing model. So, as a result, part of it is mapped and part of it isn't. So in Wings, I just adjust the previously mapped map. Then I move on to do the new parts that I edited. Except when I go to the UV mapping window, it doesn't show the background image anymore; it's just white. I've tried show/hide background image, which doesn't work. This has happened to me before, and I forgot how I fixed it. How do I get the image back?

 
you probably need to give those parts of the mesh the material which has that image assigned to it. Sometimes wings messes up the image for the background when you are just unwrapping certain faces or when there are multipal materials over the faces you are unwrapping. its very annoying. AFAIK nothing can be done about it if its that.
 
Sorry, server they are hosted on is down - exceeded bandwidth (unexpected as we thought we had twice as much). Can't do anything about it for the moment. You'll notice my website and everything is also down. Nothing will be up until at least the rest of the month and then I don't know.
 
hey yoshiboy,i'm just wondering

i have made a sword in wings3d and i don't have a clue what to do next,i don't know whether the UV mapping on mine is done or not done and i don't have any idea of how to texture mine and put it in my mount&blade :?:
 
Back
Top Bottom