Home Technical Talk

UV mapping curved trunk

I got this book "Game Environments and Props" and, I am in chapter 2. I need to UV map this trunk but the book only shows me how to do it with the flat portion of the trunk, witch is easily done with a cylindrical mapping but..

I need help to UB map a curved portions of the trunk.. =o

I could just use cilindrical mapping with each section but that would be weird.

There is a video in the CD that shows the guy using automatic mapping, but it does not show how to clean up this mess..

PS: I am new and am starting to learn this stuff, I would appreciate if somebody give me tips and a good tutorial link.. =o

Replies

  • kdm3d
    Options
    Offline / Send Message
    Step 1: Uninstall Maya, install max...

    just kidding:)

    Automatic mapping would work for you. Run it, then relax everything.

    then its just a matter of selecting edges and stitching them together. I believe Maya has an option to move shells when you stitch. Thers no sure fire fast way of doing it. It takes some work sometimes.

    One thing you might try to make it a bit easier, is to reduce the number of sides you have there. For a game asset, there are too many sides. Its easier to unwrap when there are less.
  • PhattyEwok
    Options
    Offline / Send Message
    PhattyEwok polycounter lvl 9
    I don't know if maya supports it but in max you can do spline mapping where you pick a spline in the viewport and the uvw editor will map your object to the shape of the spline kinda nice if you are trying to preserve the unique shape.
  • nullfed
    Options
    Offline / Send Message
    nullfed polycounter lvl 9
    Here's how I do it when I can't find my MAX dvd:

    I've deleted any faces at the top and bottom of the cylinder

    - Planar map the trunk (try z-axis)

    - Select an edgeloop along the length of the trunk
    a.jpg

    - In the UV window, click the cut/separate UV button
    b.jpg
    ignore the other buttons and my child-like writing for now

    - With the edges still selected, convert the selection to UVs. In the UV window, move the selected UVs to one side

    - On the model, select an edge ring adjacent to the loop you slected earlier and convert that to UVs. Then deselect the ones that are marked here and move the remainder to the other side:
    c.jpg

    d.jpg

    - Select the UVs on the left and put a '0' in the U field in the editor
    select the UVs on the right and put a '1' in the U field in the editor
    (text fields in the top-right of the toolbar in the UV window)
    These points are in line with eachother already so they will tile a texture without a seam. Once they are at the border, if you want to move one of them for whatever reason, move the corresponding one at the other end as well.

    - Bring up the Polygon>Unfold options in the UV editor and select the UVs at the top of the trunk body (the ones left in the centre). Run Unfold with default settings. This will space the UVs at the point more evenly along the width of the area you're working in.
    Repeat the process with the clump of UV points at the bottom of the trunk
    e.jpg

    - With funky results as above, you can flatten them by putting '0' in the V field in the editor

    f.jpg

    - In the Unfold dialogue, reset the settings and make them match this instead:
    g.jpg

    - Have the object selected and make sure you're in object mode and then run unfold:
    h.jpg

    if you want, you can select loops along the trunk, convert to UV and the use the Align UVs icons listed above to straighten out the lines and move them around to suit you

    - Apply a checker material to the trunk. its ok, but the checkers are not square:
    i.jpg

    - Select all the UVs and change the toggle for relative values in the toolbar (the relative icon listed above), go into scale mode and put a 4 in the V field:
    j.jpg

    - Where there are bends in the trunk, you'll maybe have to select some UVs and move them up to give more evenness to the texture and as the shape tapers towards the tip, you 'll have to massage them around a bit more, but without doing any of that, I get this:
    k.jpg


    l.jpg

    And, yeah, spline mapping would be cool.

    Here's link to a nice unfold tutorial vid:
    [ame]http://www.youtube.com/watch?v=cN5dzZmg1SE[/ame]
  • Dastan
    Options
    Offline / Send Message
    Idid it =o !! Thanks nullfed! amazing xD

    Now for the final UV layout, is it possible to get the checker material to be 100% all over the geometry even with a bigger and more detailed trunk? I have a few small deformations in some places, like if I make it look ok on the base, the top gets a little stretched or so.

    I am thinking of reducing the sides of the trunk and about split it in two or tree sections, what do you think?
  • Mark Dygert
    Options
    Offline / Send Message
    In the original image with it auto-unwrapped you could stitch the pieces together, but that would take a while and would require you to relax and massage it into some recognizable shape.

    Instead I would of selected the whole thing, planar mapped it, defined a edge that ran the length of it and relaxed the mesh, if there are end caps I would probably detach them before relaxing. Kind of quick and dirty way of pelt mapping.

    Or since I'm a max user I would of selected an edge, converted it to shape (spline), selected the end ring converted that to shape, and extruded the end ring shape down the spline (adjusting the taper setting), then use the spline to spline map the newly created extrude.

    OR, create a straight cylinder (which is already unwrapped), apply taper, and path deform it down a spline.

    Long story short, sometimes it helps to think about UV's while creating objects.
  • Dastan
    Options
    Offline / Send Message
    Vig wrote: »
    In the original image with it auto-unwrapped you could stitch the pieces together, but that would take a while and would require you to relax and massage it into some recognizable shape.

    Instead I would of selected the whole thing, planar mapped it, defined a edge that ran the length of it and relaxed the mesh, if there are end caps I would probably detach them before relaxing. Kind of quick and dirty way of pelt mapping.

    Or since I'm a max user I would of selected an edge, converted it to shape (spline), selected the end ring converted that to shape, and extruded the end ring shape down the spline (adjusting the taper setting), then use the spline to spline map the newly created extrude.

    OR, create a straight cylinder (which is already unwrapped), apply taper, and path deform it down a spline.

    Long story short, sometimes it helps to think about UV's while creating objects.

    I spent the whole day and night working with UVs in order to practice and I am learning a lot from my mistakes, there is so many different methods to achieve the same ending that it gets hard to know which is the best and more appropriate to the chosen model.

    To be a newbie is really hard when it comes to digesting so many information =o and I was doing just that, stitching the automatic mapping in order to get good at it, and trying to the cylindrical mapping as well.

    I' ll post my results later so you guys may see how I am doing so far!
  • nullfed
    Options
    Offline / Send Message
    nullfed polycounter lvl 9
    Dastan wrote: »
    Idid it =o !! Thanks nullfed! amazing xD

    Now for the final UV layout, is it possible to get the checker material to be 100% all over the geometry even with a bigger and more detailed trunk? I have a few small deformations in some places, like if I make it look ok on the base, the top gets a little stretched or so.

    I am thinking of reducing the sides of the trunk and about split it in two or tree sections, what do you think?

    As I mentioned, you can take the UVs nearer the thin end of the trunk and move them up a bit to make things a bit neater.

    It depends what you can get away with when the whole model is put together - think about what the final tree is going to look like and what its going to be used for. Chances are, there's going to be foliage or twigs on alphas and as a whole, the model would be quite busy. Also with organic stuff like bark, you can get away with a bit of distortion. Its probably not going to be viewed from every possible angle, so approach it accordingly.

    I'm not trying to tell you it doesn't matter or being sloppy is ok, I just mean that there are ways to put your effort in the areas that make the most difference to the game player. You'd be suprised at the stuff you can find in games (that look great) if you were to take them apart model by model.

    With the final example I posted I would spend a bit of time playing with the UVs nearer the top but its not too far away from the point where I would move on to other parts of the tree. Any part of the model can be revisited at a later time if you notice a problem or if something needs a tweak.

    - Number of sides, I wouldn't worry too much. The method I showed would work with any number of divisions but again, you have to think of the final model and what kind of polycount you're aiming at. You could have quite a few divisions on the trunk (say 12 or so) because its the biggest bit and you want it to be nice and round, then as you move up through the tree, you could have fewer divisions on the branches as you go.

    - Uniformity of UV, as Vig said, instead of getting a final bent mesh and trying to UV that, you could start with a straight cylinder and get the UVs spot on before tapering it and then deforming it into place. You might still have to mess with UVs here and there, though, as the geo could be deformed such that the texture will appear stretched. For smoothing out general UV distortion, look into Polygons>Relax UVs in your UV editor.

    If you want a seamless transition between the trunk and the branches, that can be a bit more involved but you can get good results with careful splitting of your geo and UV seams. After that, you could get into mesh painting to cover the seams. For your first tree I wouldn't sweat it too much. The texture will play some part in how visible seams are generally so take the relationship between the model and the texture into account early in the process. Again as Vig said, it helps to think about UV's while creating objects.
  • Bal
    Options
    Offline / Send Message
    Bal polycounter lvl 17
    Eeeh... Lots of you seem to really be complicating things. I'd just install Roadkill ( http://www.pullin-shapes.co.uk/page8.htm ), place a seam along the branch, unfold, move stuff around until if you require it to be cleaner, should take about 10 seconds once you know the tool.
  • nullfed
    Options
    Offline / Send Message
    nullfed polycounter lvl 9
    Can Roadkill pin the outer seam to the uv boundary so that it will work with tiling environment textures? I used it a little bit a while ago but only for stuff with unique textures/unwraps.
  • Mark Dygert
    Options
    Offline / Send Message
    Bal wrote: »
    Eeeh... Lots of you seem to really be complicating things. I'd just install Roadkill ( http://www.pullin-shapes.co.uk/page8.htm ), place a seam along the branch, unfold, move stuff around until if you require it to be cleaner, should take about 10 seconds once you know the tool.
    You don't need to use road kill just do like I posted break the edges and relax.
Sign In or Register to comment.