Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm a programmer who's trying to learn a little basic 3D modelling. I'm reasonably comfortable with basic geometry modelling, and can unwrap and texture simple models. But I have a question...

When it comes to unwrapping models, all the tutorials emphasise the need to mark as few seams as possible when unwrapping a mesh. My question is, why? I'm guessing this is super-obvious to people with modelling experience, but not to me (given that my texturing efforts mostly are constrained to the generation of AO or normal maps).

I’m guessing that it’s purely to do with preserving the model’s shape when it comes to editing the diffuse texture? Is that the only reason you don’t want to simply cut every edge and lay all faces out individually?

I realise I’m displaying my utter ignorance of the subject matter when asking this question, so apologies, but sometimes the super-obvious things are the hardest to find answers to .

share|improve this question

2 Answers 2

up vote 10 down vote accepted

Every "UV seam" in your model - that is, every place where the model's faces are continuous while the UV map for the same edge is cut up - is a problem both for the artists and for the hardware.

  • It makes it harder to texture the model properly. This is especially true when the editing is done on the texture directly, in 2D, not in a 3D painting program. The fewer such seams, the easier it is to mentally wrap the texture around the model.
  • While simple blending can work for the diffuse texture and some other texture types, you have to be very careful with things like a tangent space normal map. For these, you can't just linearly blend (interpolate) between the X and Y (usually mapped to R and B in texture viewers) values without the resulting normal vector becoming de-normalised and the seam becoming visible (usually as a slightly darker "line") under some lighting conditions. On the other hand, trying to fix it in texture and making the values on both UV edges close to each other or the same can result in the seam becoming visible because it's unnaturally flat compared to the rest of the model.
  • The pixel shaders have to do more work at every discontinuity (even if that's usually abstracted in the hardware nowadays), and get to hit different memory places to fetch the texture data from (which is usually the less optimised "code path" in hardware), as opposed to usually working with spatially close texture values.
  • Automatic mipmapping (and very few shops can afford to touch up the generated lower-resolution textures manually) will break all the hard work you and your artists did to make a seam invisible at the default resolution.

That said: If your art style dictates that the model faces are clearly distinct from each other and they only ever will have "hard", explicit edges, none of it is a problem.

share|improve this answer
    
Excellent point about the incoherent memory accesses in the pixel shader. Jumping around a texture like that will really trash the texture cache. –  Bob Somers Sep 26 '11 at 9:47
    
@Bob Somers: To be fair, this won't be much of a performance hit unless you are either programming for a low-end or mobile platform, or you're already taxing the GPU(s) to the max. –  Martin Sojka Sep 26 '11 at 9:54
    
Great answer, thanks. –  NM01 Sep 26 '11 at 9:56
    
Good point Martin. I've been living in GPGPU land for the past year writing performance-sensitive code, though, so I thought it was an interesting point that's not immediately obvious. :) –  Bob Somers Sep 26 '11 at 10:02

Two big reasons are making sense of the unwrapped texture and edge artifacts.

As you mentioned, it can be very difficult for an artist to make sense of how their 2D edits will wrap around the 3D model if the seams don't make sense. In the case where every face was separated and optimally placed with some kind of bin packing algorithm, it would be nearly impossible to edit the texture by hand. Hopefully they're using some kind of 3D painting tool these days, but it's still nice (and necessary!) to make edits directly on the 2D texture.

The other problem (edge artifacts) can show up due to floating point precision limitations with texture sampling. Let's say the faces are all laid out disconnected on top of a black background. Due to floating point error in your texture coords or during sampling on the video card, it's pretty likely those black edge pixels are going to occasionally show up or be blended in when the texture is filtered. Because this affects each face, you'll have this weird background-artifact-wireframe effect going on. The only way to combat this would be to artificially shrink your texture coords ever so slightly, but then each face would look weird because it won't quite line up with its neighbors texture-wise.

The nice thing about minimizing seams is that there are fewer edges in your model where the face is adjacent to the (unused) background, so there are fewer places for those artifacts to creep in. Most faces are immediately adjacent to their neighboring faces in the actual model, so the edge artifacts are actually adjacent pixels in the texture and you'll never notice them.

share|improve this answer
    
Perfect. Makes total sense, thank you. –  NM01 Sep 26 '11 at 9:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.