Blender Version: 2.37a
Tutorial Version: August 30, 2005
Resources: N/A
Advantages of UV Mapping (as compared to using the Texmesh function):
We will begin with the "winding river" example from the TexMesh tutorial.
Assuming that we have already created our mesh, added another lamp, and positioned the Camera 12 units above the origin, you should have something like the following:

With the Plane object selected, [Tab] into Edit mode and ensure that all vertices are selected and press Ctrl_n to ensure that all the normals are pointing outwards. [Tab] out again to Object mode. Press [f] to enter UV Face select mode. With your mouse cursor located in the 3DWindow, press [U] and select 'From Window' from the popup menu.

From the UV Image Editor's UV menu, select 'Layout Clipped to Image Size'. This restricts the UV Mapped points from going outside the 'image' applied.

Select all of the points in the UV/Image Editor and scale them up to the maximum possible, such that it fills the entire gray square.

Now that we've defined the UV co-ordinates, we can set 'UV' in the 'Map Input' panel located in the Material Buttons window.

Apply the Dots2.dll texture to the Plane as explained in the TexMesh tutorial.
Tip: You can get an idea of the applied Dots2 plugin texture location and scale by switching to Shaded view mode.

Adjust the SizeX and SizeY parameters for the texture so that the dots are properly scaled.

Render.

Switch to edit mode for the plane and using the Proportional Edit mode (Smooth falloff) as before, pull the center of the plane up 2 grid units. Render once again and you should get the following result.

All that remains to do is add an OfsX Material IPO curve and render out the final animation (Be sure to adjust the File Format to save to, End Frame, etc before rendering).
Done.
Now to replicate Application 2 described in the TexMesh tutorial using UV mapping.
Though, we will do things slightly different in order to reduce the amount of work unwrapping the spring/coil shaped mesh.
To quickly recap creating the spring/coil mesh from before:
You should end up with a one rotation mesh tube loop that looks like:

To make it possible to unwrap the tube into a 'grid like' layout, we need to create a seam running along the length of the tube.
The best place to place the seam would be on the bottom, so place your mouse cursor over an edge on the bottom line of vertices running the length of the tube and while pressing Alt, RMB click on the edge. Then press Ctrl_e and select 'Mark Seam' from the popup menu.

Now that we have the seam marked, we're ready to unwrap the mesh.
Add an UV/Image Editor window as before. Select all the vertices of the mesh and then [Tab] to Object mode.
Next, press [f] to enter UV Face select mode. With your mouse cursor located in the 3DWindow, press [U] and select 'LSCM' from the popup menu.


Select all the points and move them vertically to about the center of the image window. Scale the points vertically as much as possible.
You scale vertically as in the rest of the Blender User Interface by pressing 'S', 'Y'; or by using the 'drag in the direction to scale/mouse MMB click/LMB click or press [Enter] to accept' operation.

Now comes the arduous part of this technique - laying out the points in a nice equally spaced grid. First you should know that the default extent of the UV/Image Editor window (ie. with no image opened) goes from a X/Y co-ordinate of 0,0 in the lower left hand corner to a maximum of 256,256 in the upper right hand corner. Since our mesh loop is a 16 vertice mesh circle which forms one rotation/loop in 16 steps, this means that each line of vertices neeeds to be spaced 16 units apart: 0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192, 208, 224, 240, 256.
To achieve this we can either select the points in the UV/Image Editor using the standard selection tools (Border select, circular select), or we can select the vertices in the 3DWindow. If you choose the second method, you will need to select a row of faces using Alt_RMB, plus Alt_Shift_RMB to select the next 'row', since the UV Editor requires the entire face to be selected to display anything. Either way it's alot of work and it is a good idea to maximize the UV/Image Editor window to make it somewhat easier to select the points.
Tip: The Proportional Edit Tool also works in the UV/Image Editor (HotKey: o, and Shift_o to change the FallOff mode), in case you would like to spread the points apart vertically on the left side of the UV/Image Editor to make them easier to select.
Note: You can find what features are available for the UV/Image Editor, including what the associated hotkeys are, by simply browsing the menus in the Window header.
So let's begin by selecting the bottom row of points. Then press 'w' :: 'Align Y' to flatten out the points along the Y Axis.

To move the points to the bottom of the UV/Image Editor, we will bring up the numeric Properties panel by pressing [n].
In the 'Median Y' numeric button field, enter a value of 0.
Note: For the points along the outside border, you can just simply grab/move them to the edge.
Tips:

From here it becomes very repetitive, repeat the Align and setting the Median value operation for each row and column of points until you end up with an evenly spaced grid like:

Now the hard part is over.
Set 'UV' in the 'Map Input' panel located in the Material Buttons window.
To obtain more than one loop for the mesh, first scale the UV layout in the UV/Image Editor by 0.5 horizontally and move it all the way to the left. Make sure the 'Clip' option in the UVs menu is still set to avoid dragging it beyond the limits. Next duplicate the mesh loop object in the 3DWindow and move it vertically until it lines up with the first loop. Join (Ctrl_J) the two loop objects. Tab into edit mode and connect them together by removing duplicate vertices. (You may need to increase the 'Remove Doubles' limit slightly).

Now you should have two sets of UVs in the UV/Image Editor (One set of points is lying directly on top of the other). Click on a point and press Ctrl_L to select one group (FYI: In Blender, the term 'island(s)' is used to refer to an isolated group of points) and move it all the way to the right. Select a face in the mesh tube to ensure that you moved the right group of points (ie. compare the location of the face you selected to its placement in the UV/Image Editor); if you selected a face from the lowest mesh loop, you should see a face hi-lited in the UV/Image Editor in the left most group of points. If it isn't, you will need to switch the groups in the UV/Image Editor. Also ensure that the start of the second mesh loop is the same as the first loop in it's horizontal placement in the point layout in the UV/Image Editor. If it isn't, you will need to mirror either one or perhaps both of the group of points about the X axis by pressing [m] :: 'X Axis'.

The rest is identical to the TexMesh tutorial - add a material, a Material ofsX IPO curve and render.
You may also want to set SubSurf for the mesh to obtain a better result.
If you want to use another texture(s), simply add them to the texture channels, ensuring that you have selected 'UV' mapping for each.

Now to Application 2B.
Though this time, we will be using straight NURBs Surfaces.
One of the interesting details of NURBs, is that they are generated with the UV information already built-in.
This is why, when you have a control point selected in a NURBs object, you can press Shift_r to alternately select the row/column of control points (ie. Press Shift_r once to select the row of control points in the 'U' direction, press Shift_r a second time to select the contol points in the 'V' direction).
This means no need to unwrap a mesh or use the UV/Image Editor. Which is a good thing, because I don't know about you, but I have better things to do with my time than unwrap 4,000 lines of vertices ;) .

We will start from the point in the TexMesh tutorial where we have just finished creating the NURBs Surface tube using the DupliFrames method. Here is the blend file with the material already asigned to the Nurbs Surface:
nurbs_02.blend
If you make a test render now at the current frame 125, you will notice that the left side of the tube is transparent (more or less). To fix this, select 'UV Orco' from the Edit Buttons window [F9] - 'Curve and Surface' panel.


After another render:

Due to the manner in which we created this NURBs Surface tube (using the DupliFrames method), you will notice that instead of the texture being offset in the X direction, it appears to be offset in the Y direction. Hence, the lower part of the tube is transparent. To fix this, we need to switch the X and Y coordinates in the co-ordinate mapping matrix buttons located in the Material Buttons window :: 'Map Input' panel as shown below in Figure 2b_4.


![]() |
![]() |
All that remains now to do is supply a proper path and file name to save the animation to, set the file format to save to, and render out the animation.

Well, as we've seen Blender gives us lots of different ways to achieve our goals. Which technique you choose is, of course dependant on what specific task you are working on, and the result that you're trying to achieve.
For more complex shapes, NURBs would probably be your best bet, for their ease of setting up and application of animated textures (Despite the slight additional work to correct the final result when the NURBs Surface is created using DupliFrames).
Mesh/UV Mapping could be a better alternative if you intend to animate the final result with armatures or would like to have access to the more advanced tool options available in Blender when working with meshes. Unfortunately, I haven't been able to figure out a way yet to translate the NURBs UV mapping data when converting a NURBs object to a Mesh object.
TexMesh would be best suited to instances where you wanted to recreate the active object from scratch or where you are dealing with a complex mesh object which might be too time-consuming or cumbersome to use the UV/Image Editor.
and that's a wrap...
.