Home Technical Talk

UV editing & mesh deforms

Hi all. Had a question about texturing and UV editing that's been bugging me for some time now. I've done some searching, asked around, but haven't found a good answer. I also have too much time on my hands, so I created this.

texturing_question.gif

Replies

  • mwilson
    Options
    Offline / Send Message
    Hopefully I gave enough information. I've thought about using a deform modifier or a lattice, but that would only work in *some* situations. I must be missing something simple.
  • helldiver
    Options
    Offline / Send Message
    Pssh.... you think you got problems...

    I run into all sorts of nightmares particularly when you got the Normal map people telling you to keep uv chunks as linear as possible (like in your first example). Then you got the other half telling you to Relax everything which ends up looking like your second example.

    Here's what I do; I do both.

    I take your example #2 and hit Relax, then I rotate it or scale it until it's in a comfortable direction to work with in Photoshop. I'm careful not to change the uv layout though.

    If you do what you did in the last picture, as you mentioned you'll end up with all sorts of stretching along the triangles and you may end up with those mysterious Normal map errors.

    I'd much rather the headaches in Photoshop which I can easily manage, than headaches in the 3D scene or game environment.
  • mwilson
    Options
    Offline / Send Message
    Hey, thanks for the info. I have some more questions if you're up for it.

    The way you mentioned (taking the headache in photoshop vs deformed texture) is how I've been doing it mostly, but it's not always so simple for me. When I've got a more complicated mesh and several different pieces that need to be unwrapped, not having those consistent 90 degree angles in my UVs makes it incredibly difficult to get the textures it line up correctly.

    While I was investigating I came across a few examples from other polycount members in their sketchbook posts, where they'd show the mesh and the texture, but the textures are always neat little squares, while the meshes are highly deformed. Here's an example that I was looking at earlier...

    (Taken from http://www.polycount.com/forum/showthread.php?t=88455&page=2)

    Here's his texture:
    05_TexturePage1.jpg
    and here's his wireframe:01_ClayRenderWireframes.jpg
  • helldiver
    Options
    Offline / Send Message
    his is deformed just like you and me (or your second example). Look at the lamp (second island from the left). The other peices are being tiled and they are going on relatively flat surfaces/square surfaces.

    The only one that might be questionable is the third island from the left, the long peice of wood. I'm thinking that one is tiled all over particularly along the upper curved beam ontop of the roof.

    Take a look at Bobo the Seal's work: http://www.bobotheseal.com/published_art.htm

    IL_RatMan_TQ_ArmorTex.jpg

    Note how his islands are relaxed. It'd be neat if he could come in and tell us what trick he uses. In general I do what he does. Normally I follow his methods as best I can or PoopInMyMouth's (Ben Mathis)

    You can see that in my own work:

    del_this_1.jpg

    And a Chaos Bloowbowl Cheerleader

    del_this_2.jpg

    Before that I used to flatten everything out, kind of like you do. It has its advantages particularly if a different texture artist will be working on it. But the more I did it the more I discovered all sorts of anomolies. The guys on here beat me out of that habit.
  • mwilson
    Options
    Offline / Send Message
    Interesting. What would you propose doing for a situation where I want text in the texture? For instance, a tavern sign, "Ye Olde Smutty Inn" on a block of wood. It's something I tried on an earlier model and gave up on, because it unwraps too deformed to place text on, and straightening it out deforms the applied texture.

    Thanks for the advice, btw.
  • mwilson
    Options
    Offline / Send Message
    It's also funny looking at those texture maps, and then my own. Oh god what have I been doing.

    Screen_shot_2011-11-02_at_4.27.26_PM.png

    I'm really, really new to this heh
  • helldiver
    Options
    Offline / Send Message
    Can you post a picture of the sign with wires? There's like 101 things that could be causing it. I mean just recently I learned about broken tangents along UV seams and how they can cause normal map seam errors. I mean everything could be perfect with the mesh and the normal map just wants to be a jerk and cause a nasty seam to appear.
  • helldiver
    Options
    Offline / Send Message
    Cooked this sign up really fast, and by fast I mean like 2 minutes in mudbox...

    The sign itself is a box I subdivided to match the contours of the high poly mesh I did in mudbox.

    del_this_4.jpg

    Now assuming you're using 3Dmax, I then did a UVW Map->Planar, along Y, and hit Fit.

    That gave me a planer UV projection of the front and back face. For the sides I simply selected those faces and also did UVW Map -> Planar and either Y, X, or Z depending.

    Once that was all done I did UVW Unwrap -> Edit UVW and selected the seperate island chunks (proper term is "Pelt" I think). For each Pelt I used the Relax tool and selected Faces and hit relax. I then organized them to fit the UVW space with the front pelt being the bigest one (see screenshot).

    del_this_3.jpg

    Once that was done I backed my normal, ao, and made the diffuse and specular out of those.

    [Note] I apologize for my bad normal I forgot to set the whole thing to one smoothing group.
  • mwilson
    Options
    Offline / Send Message
    Having trouble finding the sign model, might have deleted it. The one I did had a bit more geometry than yours, and was heavily deformed in the areas with the text.

    I'm a little confused about your instructions regarding how you did the unwrapping, most likely because I'm not using 3DS :) I've been using blender 2.5 so far (every time I try to switch to 3DS I end up missing my hotkeys too much). I'll do some research and see if I can translate what you said to what blender has. Thanks :)

    I'd love to pick your brain some time. I'm just starting out and constantly find myself wondering if there's a better or standard way of doing certain things
  • helldiver
    Options
    Offline / Send Message
    Max is all I know :(

    Little maya, enough to import/export, scale, that's about it. The only Blender I know about is the one I use to make ice cream smoothies in my kitchen...

    There are several step by step tutorials for UVW mapping in Max. Since I think you might need to go back to the fundamentals (such as the correct modifiers to apply, working with quads to make things easier) and a whole bunch of workflow steps first.

    Also, I don't know whether my method (selecting faces and planar UVW mapping then Relaxing) is the method the pro's use. Each time I've asked either none of them answer or I get a cryptic scientific answer which I need a quantum physics degree to decipher...

    I'm tied up the next couple days, but while I work on my current project I'll knock out a step by step tutorial on how I go about UVW mapping an object, I'll post it here.

    That might help you, or at least get you started. At the same time one of the guys might come in and tell us a better/faster/more effiecient method.

    The weapon is what I'll be texturing once the low poly is done:
    http://www.polycount.com/forum/showpost.php?p=1456837&postcount=10226
  • Michael Knubben
    Options
    Offline / Send Message
    Mwilson: To get that result in Blender, you'd just mark the edges around the sides and unwrap. You have two methods at your disposal, NDL and PFKL (I just hit the keys randomly as I don't remember the actual abbreviations, nor what they stand for. Luckily, that doesn't matter right now, on with the message! Are you ready? Okay good), so just see which gives you the best unwrap, it won't matter much. Anyway, getting the exact same result as Helldiver should be easy, let me know if you're having trouble and I'll check out the actual steps in Blender (not a blender user myself, but I know the basics).

    To belatedly answer the first question posed: it depends.
    To put it slightly less infuriatingly vague: sometimes one method will be better than the other, mostly depending on how stretched something will be, and what you're hoping to put on there. If you're painting a leg with stockings, dear lord do yourself a favour and straighten that shit out. If, god forbid, that ends up being too stretched for your purposes you'll always have the other (mad) solution available to you, and you can get by with 3d painting software (Blender, as it happens, does this).

    The fact you're not sure about this means you do understand that you're finding a balance between the perfect unwrap and the perfect unwrap to paint on, and the answer simply isn't the same every time!
  • helldiver
    Options
    Offline / Send Message
    Well if you still want to try in max...

    I do it the old fashion way. If anyone knows anything faster, please do tell.

    delete_tut.jpg

    1) Take my object and reset transforms. I then apply a UVW Map modifier, Planar and a long an axis that lays out the object in as best a planform as possble (sometimes X, Y, Z, which ever).

    2) After collapsing, I select each face I want to constitute an island. Now how these are selected is important. Obviously you'll want to keep things as planar as possible. If you select a set of faces that have strong bends (like 90 degrees or more) you might get a bad unwrap-relaxation.

    3) Anyhow after selecting the faces (or element in some cases) that I want to constitute a pelt (or what ever those chunks are called) I apply a UVW Map modifier, Planar. Sometimes I'll use the gizmo to line things up better then hit fit. But that's just to help out when I go back to Edit UVW and relax things.

    After applying the UVW Map modifier, I apply a UVW Unwrap modifier and then I hit Edit UVW. I then select the whole UVW patch and go to Tools and select Relax Dialog. I normally relax using Faces.

    4) After relaxing by faces your pelt should more or less be nice and flattened. Some things to keep in mind:
    -Normal maps and some engines like the UVW to be facing the right way. So for the reverse side of something, make sure it is mirrored or flipped so that it is facing correctly. You can check this when using the Relax Dialog because when you relax something it'll get all garbled up (it's trying to mirror it).
    -If you're mirroring a UVW patch to save texture space, offset the other side by 1 unit (there are several tutorials around here explaining that). I normally do this later, after I've organized my UV layout.

    5) How you go about selecting faces and applying the UVW Map modifier is a whole science and a skill on its own, using Selection groups helps a lot.
    For cylinders I normaly select the cylinder lengthwise (see the pic) and apply a UVW Map modifier planar.

    6) I then select half of the faces on the cylinder and seperate them by applying an Unwrap UVW modifier.
    I then stitch those faces along the side which will least likely be seen by the camera.

    -Again, there's a whole science revolving around where to stitch(weld) your UVW seams, where to hide them, etc. Normally what I do is I imagine that I'm a player and I'm looking at my model. I then imagine where I'd least want to see a seam.

    In the case of the bolter I ran most of the seams along the bottom (inside the barrel the seem goes along the top).

    -Had this been a first person weapon, I'd probably run the seams along the bottom-right edges, since it's the spot where the camera will least likely see.

    7) I continue selecting faces, applying the UVW Map modifier, followed by UVW Unwrap and relaxing the patches. I set them aside to keep them out of the way of each other.

    8) I will then group them together and relax them in sets. While I do this I roughly scale the peices so that they are more or less in scale with one another.

    -I'm finding out that this is becoming more and more important. You can't just have stuff be at any scale. In some cases it doesn't matter, but in others you will end up with stretching or strange seams on your Normal.

    -If you notice my daemonette cheerleader, the UVW patch or chunk, is larger than other parts. That's because I wanted more detail in that area. If you want to draw attention to a certain part of your model, make that UVW island larger (specially faces or parts with lots of detail). Keep in mind though, that you may have some pixel scale issues along the seam border.

    Done: I then get all the peices and more or less arrange them as best as possible to optimize texture space. I keep a 5 pixel distance between peices, sometimes more depending.

    -I have the most difficulty with Normal maps. They hate me, and I hate them... So most of my uvw optomization work is mostly to ensure no Normal map errors. I'm an expert at diffuse repair in photoshop, but Normals are a whole other issue...

    Here's the bolter with normal and a fast Diffuse/Spec I slapped together:
    sm_prev_06.jpg

    I goofed on the ammo clip but it's a simple fix.

    Anyhow, hope this helps you somewhat.
Sign In or Register to comment.