Home Technical Talk

Unwrap question!

polycount sponsor
Offline / Send Message
malcolm polycount sponsor
Is there any way to grid the uv's on a pipe shaped unwrap? In the example below I can get to an okay unwrap for a lightmap in 7 clicks, but I'd much rather have it straightened to avoid stair stepping in the lightmap and minimize uv wastage. Is there any way I can gridify the uv's in one click? I can't find I way to do this in Maya so I'm wondering if anyone else's respective app has this functionality?

unwrappipethumb_01.jpg

Replies

  • osman
    Offline / Send Message
    osman polycounter lvl 18
    what I always do for this kind of models is, i model it straight, then uvmap it, and then model it to its final shape.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Yeah that's not an option in my case, I can't really fuck with the models on my current project the pipe is so brittle and convoluted changing any thing but the second uv set could cause the build to fail.
  • Eric Chadwick
    Can do this in Max with Chuggnut's Unwraptools, but it takes a few clicks. Have to select the left edge, alignU, select right edge, alignU, then select each row of verts and press evenlySpaceU.

    Or if you're lucky, you could recreate the surface with a Loft, which auto-straightens its UVs, then copy the UVs from that to the original... assuming they have the same vertex order. If not, no dice.

    You want some sort of non-relax tool. Good luck.
  • pyromania
    Offline / Send Message
    pyromania polycounter lvl 18
    [ QUOTE ]
    Yeah that's not an option in my case, I can't really fuck with the models on my current project the pipe is so brittle and convoluted changing any thing but the second uv set could cause the build to fail.

    [/ QUOTE ]

    What about using the Transfer UV's function? You could make a copy of the pipe, straighten it, UV it nice and neat, then copy the nice UV's back to the convoluted pipe.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    That would be more work than just doing it by hand, I can straighten a row of verts in one click.
  • fmnoor
    Offline / Send Message
    fmnoor polycounter lvl 17
    I feel your pain. I had to go through RTS unit models that were horribly unwrapped for a student project and when it came to aligning things I wondered if it this was possible too.

    In the end, I just used these to speed the process up (since it didn't seem I could use the repeat last command hotkey with the align buttons in the UVtext editor window)

    alignUV 1 0 0 0; right U
    alignUV 1 1 0 0; left U
    alignUV 0 0 1 1; bottom V
    alignUV 0 0 1 0; top V
  • MoP
    Offline / Send Message
    MoP polycounter lvl 18
    Hmm, dunno how to do this in Maya, but your post just spurred me to write a maxscript which will auto-align any selected edge loop's UVs just by selecting one edge and hitting a hotkey. It also falls back to standard axial aligning if UV verts are selected.

    I don't think there's an easy way to make the sort of thing you want automatic unless it's possible to script a function which will relax selected verts while still constraining them to a single U or V axis. Then you could just relax each set of edges, and then select all and pin the edges, then relax the central verts.

    Aligning then spacing evenly is probably the fastest method, like Eric said.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    Yeah Mop that is how I've been doing it too, I wrote this yesterday before I posted the question. Select one edge it grabs the edge loop and snaps them.

    this one snaps left

    SelectEdgeLoop;
    textureWindowSelectConvert 4;
    alignUV 1 1 0 0;
    textureWindowSelectConvert 2;

    this one snaps up

    SelectEdgeLoop;
    textureWindowSelectConvert 4;
    alignUV 0 0 1 0;
    textureWindowSelectConvert 2;

    switch the zeros and ones around if you really want the other two directions. It's an interesting problem, one that I would like to see solved in the future. There is a grid uv's feature in maya but it is ass, I'm not even sure what anyone would use grid uv's for? I should also note there is a super ghetto way to grid uv's for objects like this but the uv's will become evenly spaced squares so you lose your pixel density. Select all the faces of the pipe> unitize uv's> select all edges of the pipe except where you want the boarder edge> move and sew uv's. Perfect grid but pixel density will have to be fixed by hand. Actually come to think of it I just tried this again and it seems to be the fastest way.
  • malcolm
    Offline / Send Message
    malcolm polycount sponsor
    I've decided to put this gridify pipe junk into a button, here is the code if anyone wants it. Select one edge you want to use as the border edge, it needs to be a vertical edge so it can slice the pipe by grabbing an edge loop.

    pipegridjunk_01.jpg

    SelectContiguousEdges;
    string $borderEdgeGrid[];
    $borderEdgeGrid = `ls -sl`;
    polyConvertToShell;
    ConvertSelectionToFaces;
    performPolyForceUV unitize 0;
    select $borderEdgeGrid;
    InvertSelection;
    performPolyMapSewMove 0;
    polyConvertToShell;
    polyLayoutUV -lm 1 -sc 1 -se 0 -rbf 0 -fr 1 -ps 3.2 -l 2 -ch 0 ;
    SelectToggleMode;
    SelectToggleMode;
  • Noren
    Offline / Send Message
    Noren polycounter lvl 19
    Cool. smile.gif
    Perhaps have a look at the Morphmap_script by Olivier Vandecasteele. It's for Max and does work with flat surfaces only but it might give you some additional ideas.

    http://users.skynet.be/arketip/arketip_morphMapENG.htm
Sign In or Register to comment.