|
UVW Unwrapping
Creating the Texture map for your mesh
(C) Malard 2009
It is essential that you must produce an easy to understand Texture Map in order for derivers to derive from your mesh. Malardorian meshes work on the technique of "MOMMIN (Most of Mesh, Most in Map)". Basically this means whatever parts of your mesh are visible constantly or most of the time, those parts are clearly shown in your texture map. Try to work on this basis since I have found texture developers can work more easily on a texture for a product using this technique.
Setting Up your mesh for UVW Unwrapping
Ok before we start, do not combine all your meshes into one if there are multiple parts. Doing so will make things generally harder to Unwrap.
NOTE: CLOTHING MESHES CREATED IN THE MALARDORIAN CLOTHING CREATION METHOD WILL PRE CREATE YOUR TEXTURE MAP CO-ORDINATES FOR YOU.
For this purpose of this tutorial we will be unwrapping a Large Pipe with a small pipe connected to it:

Download Mesh file here (use right click -> properties and then copy the address URL to your web browser). You will need to import it since the file is an ".OBJ". Also you must detach the small pipe from the large. To do this select the small pipe element and then press the "Detach" button which is next to attach. This mesh is Public Domain, but please quote my name when you have used it in your own creations.
So here we have our mesh. Firstly to understand how to Unwrap this mesh we have to see what simple shape that mesh resembles. So since its a pipe we will need to unwrap the mesh using a cylinder mapping constraint. Other constraints are Plane, Pelt, Spherical and Box. Each constraint has additional properties to adjust the best optimisation for texture map As seen bellow:

So as seen above select your mesh and then Apply the "Unwrap UVW" modifier.
Unwrapping Your Mesh
Click on the Small plus sign next to the modifiers name ( ) and then select Face. Always have "Ignore Backfacing" off and un-tick this feature if not already un-ticked. Now select the all the faces by holding down your left mouse button and drag it across over the mesh. A boundary line will draw the selection area. Let go of the mouse button and your mesh should be red or tinted red. Now since it is selected you can now apply a mapping constraint. So select the "Cylindrical" constraint and you should see a cylinderal shaped guide. This is the constraint. You will notice that the constraint is slightly off center of the mesh so click the property "Fit". It seams strange but most of the time some people will instinctively press "Center". If you press center it will move the constraint to the origin of the mesh Not to the actual center of the mesh itself. You should now see that the constraint is around the pipe just right. Now that is done deactivate the "center" constraint and then press the "Edit..." button. You will see a window like this:

Here we see the flat equivilant of the mesh. Notice that it is slightly off center to the map, this is normal since the workspace is not defined inside the thick dark blue box.
Green lines are the seam lines and they will also show on your mesh while the modifier is active. This as it is ok for the time being since we will need to edit the meshes UVW map further.
Now since we used a cylinder on the whole mesh, the faces that are perpendicular to the tube are not visible. These faces need to be extracted so the texturerer can easily texture them. Now since the perpendicular faces are flat we use the plane constraint, because a plane is flat. Additionally to save time we can also use the plane to Unwrap both ends of the pipe. To do this, Select all the flat faces at both ends like this (the non visible sides are also selected):

Then apply the "Plane" constraint and you should see a square frame at one end like this:

Now your flat perpendicular faces are unwrapped. Go back into your UVW Unwrap editor and you should find it will look like this:

Clearly this is not suitable for a texturer since the two unwrap sections of faces overlap each other. So, deactivate plane and then click the move button in the top left corner of the UVW editor and move the selected section to a side in the workspace. Now deselect the the selection and then click on "Tools" then "Pack UV's" on the UVW editor. You will get a window. No settings will need to be adjusted in it so just press ok. The outcome of packing will place every individual unwrapped panel in its own place like (without the text):

Now since we have 3 sets of pairs in the map we can consolidate them together (yet again to make texturing easier). So, this time click on the Vertex selection mode and the select all the vertices of the middle thick ring. You may require selecting a section then adding another selection on. This is done by holding down the Ctrl Button on your keyboard and then select again as normal. This will add on the vertices that were you select which were previously unselected. The vertices selected will show up red. Now before we go further click on "Options" then "Advanced Options" on the UVW editor. Here we need to change a setting (if not already set) and that is in the "Misc Preferences" section. Tick the box next to "Vertex Snap" and press ok. Sometimes that change may not take effect, if it doesn't then re-do the last process. Click on the Snap activation button which will make the vertices snap to other vertices or gridlines. Now that you have your thick ring's vertices selected, click and hold one of the selected vertices and drag that vertex to the same relative vertex on the other thick ring. You'll find since you have all the other vertices selected they will move in sync as well. Deselect your vertices and you should find that both rings are now appearing as one. Do this for the other matching pairs.
Once you are done it is time to finalise the working area (the area inside the thick dark blue box). Basically move your parts around until they are neatly spaced. Deactivate the Snap tool if you feel it is of annoyance. You may find that there is some unused space so use the scale tool to scale up any of the panels you feel should be scaled. Since you have pairs of panels that appear as one ALWAYS select the panels as if they were multiple parts that are separate but you wanted to move them together. That is the unwrapping done!
Now try repeat this section on the smaller pipe.
Generating a Texture Map
With the version of Unwrap UVW in 3dsmax 8 there is a feature which allows you to render the texture map as lines and other modes. This is really useful as it will generate a very accurate map at different dimensional sizes. To generate, click on "Tools" and then "Render UVW Template" on the UVW editor. This will show a small window like this:

For exporting Edge Based Texture maps (the maps that show lines) press the "Render UV Template" button without changing any settings. If you would like to export a texture map as like the maps provided with malardorian meshes, un-tick all the tick boxes apart from Force 2-sided. Now click on the drop down list next to "Mode" and Select Normal. Now press the "Render UV Template" button and you should have a solidly coloured panels. Please note that if you have two layers over each other you will find colour rips in your maps. this is due to the fact that 3DS Max cannot decide which panel is above which. The colours are only there as a reference of active texture area and are not intended for guidance as such.
Combining UVW Maps for a single mesh
Earlier On I said about keeping the parts of a mesh separate. Well now Im going to tell you how to avoid losing your UVW Settings on separate parts and also combine parts together for the convenience of exporting. Firstly convert a mesh to an "Editable Mesh" by selecting and then right clicking on the selected mesh. Click "Convert to.." and then "Editable mesh". Don't worry, even though the Unwrap UVW modifier has disappeared the Texture Co-ordinates are still set on the mesh. Now attach each of your parts that you have recently unwrapped. Apply a new "Unwrap UVW" Modifier and when you click on "Edit..." in the modifier properties you will see all the panels of all the parts of your mesh. "Ok, how do I extract each one for texture map exporting" you say, well at the bottom of the editor window you will see a drop down list saying "All ID's". Now if you have already set up your Material ID's then when you look at the list inside it will show you each mesh's panels from the mesh that is associated with that Material ID name. If you haven't then set up your material ID's A tutorial about doing this is in this book. Clicking on an entry in the list will isolate the panels of the mesh that is associated with that Material ID name.
Other Essential Features of the UVW Unwrap editor
While working in the editor did you notice the two buttons that say "Rot +90" and "Rot -90" ? These are the 90 degree rotation buttons. If you find that a certain section of your map is rotated and the texture has been rotated on the mesh which you believe is not correct you can easily fix your panels by selecting the panels and then pressing the "Rot +90" or "Rot -90". You can correctly orientate the panels.
You may also like to get the correct scale of each panel so that the texture will be evenly detailed. There is a built in temporary checker texture map which will show when selected and it will show if certain panels are differently scaled to others. At the top right corner is a drop down box saying "Checkerpattern (checker)". click that box and then re-click "Checkerpattern (checker)" from the list. Now look at your mesh and you will see your mesh as with the checker texture on it. If an area of mesh has small squares then your unwrap panel for that area is big. If an area of mesh has large squares then your unwrap panel for that area is small.
|