Jump to content

UV Layout


dustty
 Share

You are about to reply to a thread that has been inactive for 4612 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

UV-map creation is as much an artform as creating mesh shapes. Usually it is a matter of balancing compromises.

Essentially, it's about how and where you choose to make the cuts/seams to flatten your meshes. The goal is to reduce texture distortion as much as possible - however, the compromises often involve awkward seams that can result in visible (or difficult to hide) joins in the textures. So it is often a balancing act in choosing WHERE to make the cuts, and WHEN the texture distortion is acceptable to avoid painful texture seams.

In the case you refer to here, with the series of planks, it is relatively easy to define the cuts (on the corners of the thin edges) and lay them out flat, since the cuts are on logical corners of the planks, and the mesh consists of flat surfaces. As such, it's a simple matter to lay them out in the example you mention. If I remember correctly, Chosen's mesh had the bottom face removed, hence his easy-to-visualise UV map... if the bottom face had been included in his mesh, the layout would probably look quite different.

In the matter of getting the flattened UV-map to be proportional to the faces, well, that depends on the software you are using. Some software will flatten your UV-maps via an automated process after you have defined the cuts/seams, which makes the task a lot easier... however others require you to do this manually via pinning it flat, and this can often result in a bit of a guessing game. So it all depends on what program you are using.

Every mesh is different, and as such the resultant UV-maps will require different approaches. There is no easy, straight-forward answer - it's a matter of deciding where you want to cut your mesh in order to flatten it.

I would suggest, at least for relatively simple geometric meshes, to make your cuts in logical places (edges, corners) where texture joins won't matter much (ie: eliminating the need for textures to perfectly align). If you can visualise in your mind where the joins are, when the mesh is flattened, you will be able to know logically what each area of your UV-map represents.

And then there is tiling/overlaying repeated faces to better use texture resolution, but that is another subject.

:matte-motes-smile:

  • Like 1
Link to comment
Share on other sites

To create that particular UV map, I did the following:

1.  Before duplicating the first plank, I used a cubic projection to quickly map all sides of it at once.  This gave me a separate rectangle for each side.  Because the projection cube was equilateral, the faces of the model were mapped in relative proportion to each other, automatically.  The results looked like this:

plankUV1.jpg

2.  At this point, all the faces were separate shells, and they were all rotated in the same direction.  That's not particularly efficient.  So, I rotated them and moved them, so that matching edges were touching, and I merged all the overlapping points, to eliminate redundant data.  Maya offers a very quick way to do this, which is simply to select the edges around the top of the model, and then hit Edit UV's -> Move and Sew UV Edges.  (Alternatively, you can always move the UV's around by hand on the canvas, which on a model this simple, wouldn't really take any extra time.)

3.  Next, I duplicated the model nine times, grabbed the UV shell for each copy, and snapped each to its own location to the grid.

I didn't time myself, but I'm guessing the whole thing took about a minute or so.  Was it a one-click solution?  No, UV mapping rarely is.  But it was still pretty darned quick, and very easy.

Another option, which would have been just about as fast, would have been to use a cylindrical projection at first, in order to grab three of the five sides, and then use a planar projection to grab each of the other two.  This would have involved a few extra clicks, though.

 

 

If you're looking for a one-click solution, there are programs, plugins, and other software that can do that (sort of).  But I wouldn't suggest trying any of them until after you've become very good at doing it yourself.  No matter how good the automation might be, a human being will always be better.  Without experience, you won't very well know what to, and not to, do.  As Maeve said, UV'ing is an art. 

Here's what I got just now, by letting Unwrella do the work for me:

planksUV_Unwrella1.jpg

That's pretty good, especially considering it was instantaneous.  But it's not quite as good as the one I did myself.  It allows a little less canvas space for the end faces, and it doesn't jive quite as well with the texture I was planning on using.

So, even if I'd used this as my starting point, I would have ended up altering it by hand anyway, which in this particular case, really wouldn't have saved me any time at all.

 

Here's another result from Unwrella, after a tweak to its settings:

planksUV_Unwrella2.jpg

This one's actually a little better than mine, in terms of data usage. There are no repeated points. 

However, there's an obvious peculiarity to it (at least to the untrained eye).  It utilizes diagonals, rather than direct alignment with the grid.  Unwrella does this sort of thing a lot, in order best ensure ensure even texel density on all faces. The diagonals change the surface area, which helps the numbers in that regard.  It works best for models that are a lot more complicated than just the simple cubes in this example.  It's kind of silly to do it here.

On complex models, this approach is really handy for texture baking or 3D painting, but it's obviously not ideal for 2D painting. It probably wouldn't have been great for the pre-existing texture that was to be used here, even if the geometry did lend itself better to the diagonals.

The diagonals obviously do leave a few pixels unused, but no more than were unused in my map (less, in fact).  On more complicated models, Unwrella tends to be really good at finding "out of the box" solutions to maximize canvas usage, by throwing out all kinds of oddball diagonals.  You end up with some really interesting plate techtonics and melted clock jigsaw puzzling that you probably would never have thought of on your own.  But again, on just a handful of cubes like this, there's nothing to be gained by it.

 

Here's the same map, after straightening the diagonals:

planksUV_Unwrella3.jpg

I had briefely considered using this layout as my example in the other thread, but opted against it, mostly for simplicity of presentation.  I figured it might have been harder for some people to understand how the trapezoidal faces on the UV canvas relate to the rectangular faces on the model.  Rather than risk confusing the issue, I left everything rectangular.

 

 

By the way, since you mentioned the results the results on my map look proportional to the model, we should probably discuss that.  It's not entirely accurate.  If the map were in true proportion, most of the faces wouldn't have enough pixels in them for the texture to be recognizable, and the height of all the faces wouldn't be enough to fill the canvas. 

Your numbers from the other thread, put each plank at 16 x .5 x .1. If the 16-unit length were to equate to 500 pixels, then .5 units would be 15 pixels, and .1 units would be just 3 pixels.  I didn't want a texture height of only 3 pixels, and I also didn't want to waste canvas space, so I stretched out the smaller faces a bit on the canvas.  This made the large faces proportionally narrower.  The end result is the best "happy medium" between accurate proportion and practical texture considerations.  True proportion is very rarely possible for any UV map.

  • Like 1
Link to comment
Share on other sites

I have tried every combo under the sun, marked the seams in every combination unwrapped in every mode I get some variations of this.B esides feeling like a total idiot and totally frustrated I am ready to abort the whole operation.cube.png

Link to comment
Share on other sites

As a Maya user, I'm afraid I can't very well advise you on what buttons to push in Blender. I can only explain applicable concepts. The principles are the same in all programs, but obviously the specifcs are a question of knowing your particular software.

YouTube is loaded with tutorials on UV mapping in Blender. I would suggest you watch a few. I just watched a couple, myself, and as I suspected, there are lots and lots of ways to quickly create a well proportioned map.

Link to comment
Share on other sites

It looks like you modified the mesh in object mode. Blender makes a distinction between an instance of an object, which you can move around and some what modify in object mode, and the underlying object data, which you edit in edit mode. The reason for this is so you can have multiple objects with different position, scale, rotation, etc., but still share the same object data. You can apply modifications you make in object mode to the object's data by hitting ctrl-a in object mode and selecting "Rotation & Scale". To avoid this problem in the future you should always edit an object in edit mode.

  • Like 1
Link to comment
Share on other sites

The reason you have squares instead of something nearer to the shapes of the mesh faces is that you applied scaling in object mode. UV mapping is an Edit mode operation, and it uses the local coordinates without the Object mode scaling being applied. In local coordinates, the object is still a cube. If you leave the scales as 1,1,1 in Object mode and scale in Edit mode, you will get different results.

Here are two ways of doing the UV mapping in Blender (2.49 here).

On the left: using Project from View...
1. Go into view from top (NumKey 7) and unwrap using Project from View (U5).
2. Expand map in Y dimension to 1/10 height (SY...)
3. Go into face select mode then select the visible face
4. Scale in X dimension (SX...)
5. Scale in Y dimension (SY...)
6. For each vertex around the bottom edge, do Mesh->Vertices->Rip
    {Rip is very teperamental. It only works when the vertex is viewed at certain angles. Trial and
     error*. You can see when it has worked because one of the selected edges loses its highlight}
7. Now you can move the vertices to give right angles, and align (SX0, SY0). Then select all vertices in the 3D view and do Mesh Vertices->Remove Doubles to undo the ripping (this will not affect the UV map).


On the right: using default unwrap...
8. Mark seams on the small vertical edges at both ends.
9. Select all and unwrap (U1)
10. Select horizontal pairs of vertices and make appropriate widths (GY...).
11. Vertically align wobbly vertices (SX0, 4 times)
12. Horizontall align (SY0, 4 times)
13. Scale to full width (SX..., with UV layout clipped to image size)

Now, for either method, when you add and apply the Array modifier, all the planks will have superimposed UV maps. Go into UV island select mode, select the top of the pile and move it vertically (GY). Repeat until they are all separated.

plankuvmap.png

*anyone know a way to make this consistent?

  • Like 1
Link to comment
Share on other sites

Drongle, ripping is dependant on where your mouse pointer (not to be confused with the Blender cursor icon) is located.

Don't  click, just place the "plus sign" on the seam opposite of where you want to pull away a vert and then hit V.  Play around with it bearing that in mind and you'll see what I mean.  You'll get more consistant results after you get the hang of it.  For a cube corner, sometimes you do also have to rotate it a bit to get the third connection detached, but not always.

 

Edited to correct. I wrote "arrow" by mistake.  The position of the mouse is a plus sign.  Also if you are seperating a corner into 3 detached planes and the last vert is stubborn, place the cursor just  outside the geometry in line with the edge that you are seperating.  ek...even more editing.

Link to comment
Share on other sites

I highly recommend Ashasekayi's video on UV unwrapping which is part of a series from a class she teaches at Builider's Brewery.  It's beyond excellent, particularly  if you are using Blender. Even if you are not using Blender this is a valuable video that gives beginners to UVs  the hang of the work flow necessary to get an optimized uv layout.

 

  • Like 1
Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4612 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...