Home Technical Talk

Offsetting UV islands - how do _you_ do it?

I'm collaborating with a friend on some scripts for 3ds Max (tbh he's doing most of the work, I'm just testing and offering crits!).

I'm wondering how others are prepping their UVs for baking?

I make all my unique UVs first, then I mirror the model, and duplicate any parts that will have overlapped UVs. Then I pack. I like using the Group Selection tool in Unwrap UVW, because it keeps the overlapped UVs together when I pack.

However when the UVs are done, I need to move all the overlapping islands out of the 0-1 space, leaving just one copy inside.

How do _you_ do this part?

I use the Select Inverted Faces tool, Grow the selection until it stops, then use the Relative Type-In to move them 1 unit (or a small script which does the same thing). I do the same with Select Overlapped Faces. Then I move 1 copy of each back into the 0-1 square.

If some of the inverted or overlapped islands are welded, I have to Break them first, to prevent the long stretched bits.

How do others offset their UVs? There has to be a better way.

Replies

  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    I use the UVW Xform modifier. Its pretty simple and fast, you can type in the offset and tiling values. It also works very well when you want to stretch the uvs to get 1/2 or any texture ratio.
  • Eric Chadwick
    Options
    Offline / Send Message
    But how do you select the overlaps? That's the most time-consuming and error-prone part of it for me.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Lets say you have your smoothing groups set up, so you can see where you have the seams. There is an option in edit poly to select faces based on smoothing groups. This can work in this case...To be honest, I don't really have an idea about how to do it if you have only one or just a few smoothing groups, which are not matched to the uvs.
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    I use Maya but still might be useful for workflow discussion.

    I turn on shaded uvs so I can tell where the overlaps are.

    I then click to select a vertex on an overlapping group of shells which selects 1 vertex from 1 shell, then I hold shift and marquee select that same vertex which deselects the vertex I had selected, and selects that vertex for all the other shells.

    Then I repeat for all the other overlaps, and convert selection to UV shell and offset by 1 unit with a script.
  • Eric Chadwick
    Options
    Offline / Send Message
    Smoothing groups don't always match UVs, nor should they. I split the UVs for every hard edge, but I don't need hard edges for every UV edge... usually I have more UV splits than I have hard edges.

    Anyway, smoothing groups don't help with this, since they have no knowledge of overlaps in UV space.
  • Eric Chadwick
    Options
    Offline / Send Message
    Oooh that's a cool feature in Maya, the shift-marquee. But what if the shells are welded together? Can you do that in Maya? Does it prevent them from being separated when you try to offset one of them?
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Smoothing groups don't always match UVs, nor should they. I split the UVs for every hard edge, but I don't need hard edges for every UV edge... usually I have more UV splits than I have hard edges.

    Anyway, smoothing groups don't help with this, since they have no knowledge of overlaps in UV space.

    Thats not new. Im talking about something like when you have a box for example, and there are 1-1 cylinders on its 2 sides, which should overlap on the uvs. You should have a uv cut along the cylinders so it can be unwrapped, but you won't add a smoothing break there , for sure. Okay , So the box has its smoothing groups, and the 2 cylinders are in anothers, and you know that they will overlap, but you want to offset one during the baking.In this case, you can do what I described. Actually I don't see why it couldn't work.
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    I dunno, it's usually just a select overlapping faces in unwrap uvw, maybe a 'grow selection to shell' (polyunwrapper) and then move them over by 1. Then followed by a select inverted faces, same procedure. If it's moving the wrong shells, I guess it's a matter of deselecting those shells, using the viewport to select a correct poly, and another "grow selection to shell".
    It's a shame I never became friends with the UV grouping feature, it seemed like a good idea but I found it hard to keep groups in between collapsing the modifier and later adding a new one.
  • throttlekitty
    Options
    Offline / Send Message
    Oooh that's a cool feature in Maya, the shift-marquee. But what if the shells are welded together? Can you do that in Maya? Does it prevent them from being separated when you try to offset one of them?

    They can only be welded at the central seam (assuming a left/right symmetry here), and that's entirely up to you. If it was a single shell folded in half, you'd end up selecting the whole shell. (I think you are asking if separate uv shells can be welded, say a series of bullet casings; which maya won't let you do.)

    Can you not select UVs in the 3d view in Max? I either do what m4dcow suggests, or simply select the single uv/shell in the viewport if it would be easier.
  • EarthQuake
    Options
    Offline / Send Message
    In Modo:

    1. I apply a material to all the faces I want to mirror (this makes it easy to select again if I want to move them back, for instance if I need to make changes and repack).
    2. Select faces by material
    3. Offset using the numeric transform box by 1 unit, in Modo you can transform uvs numerically in UV space with the same tools that you would use to transform in 3d. Make sure to click tear off so the UV's don't stick to the other islands and the center seam.
  • Farfarer
    Options
    Offline / Send Message
    Yeah, I do what EQ does except I use polygon part tags rather than materials.
    Unwrap the mesh, select the polys want mirrored using the tag, copy/paste/mirror then offset them. I generally give them a different tag at this point so I can select them easier.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    I use selection sets, but they're functionally identical to polygon tags really. The only reason I don't use materials is I (usually) have colour id materials already added, which themselves are useful for selection, so I tend to leave them alone.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    I do the same as you Eric. I think it's pretty straightforward, and scriptable.
  • FourtyNights
    Options
    Offline / Send Message
    FourtyNights polycounter
    Sometimes I've offsetted overlapping UVs for baking, only in a case when I have a character's head and body on their own material IDs and set of textures, while still sharing a seam around the neck. Just to get more texel density for the head.

    Nowadays, I'll just pack all of the skin to the same UV set and use tiling detail normals with masks though... depending on the amount of exposed anatomy. (;

    For example, if my character has a pullover covering all the way to the neck, I'd most likely give head its own UV set to have the "maximum" texel density.

    ...and if he, or she is wearing just pants or a swimsuit, I'd probably go with the "skin into one" style with tiling detail normals if needed.

    Not sure was this off topic or not, haha. :D
Sign In or Register to comment.