Home Technical Talk

tileable texture question

polycounter lvl 13
Offline / Send Message
breakneck polycounter lvl 13
I haven't done much tileable texture work so this may sound retarded.
I'm working on a twisted/ kinda tree that is pretty large. Using only a 1024 texture, I would think that I would be better off making the texture so that it tiles more often therefore increasing pixel density. On the other hand I don't want to cut the uvs and overlap them all on the 0 to 1 space so I was thinking about doing something like this:
uvthingy.jpg


so to get back to my question:
does uvs beyond 0 to 1 space work the same in game engines as it does in my 3d application? And if so, is a uv unwrap like this something that is acceptable in the industry?? I would assume so but I just wanted to make sure I'm not doing something wrong. or any other advice would be great, thanks!

Replies

  • Tumerboy
    Offline / Send Message
    Tumerboy polycounter lvl 17
    yup. At least every decent engine

    That's how most bark textures are done. They tile more on the vertical than the horizontal, so sometimes bark will be on the left half of the texture (tiling vertically, but not horizontally) and leaf card textures will be on the right. Then the trunk is unwrapped into the left half of the UV space, but extending above and below 0-1.

    You can pretty much put your UVs where ever you want. Though if you want to be nice to the person that is going to have to come back an clean up after you (or look at the UVs later for whatever reason) keep them somewhere near by so they don't have to hunt things down out in the 35-40 space (not that I've had to do this or anything :( )
  • Ryno
    Offline / Send Message
    Ryno polycounter lvl 18
    Map them 0-1 on the X/U so you don't get a seam. Then tile vertically as you show in your sketch. If your engine supports it, do a 1:2 aspect ratio (tall rectangle) to help minimize tiling vertically.
  • Peris
    Offline / Send Message
    Peris polycounter lvl 17
    i usually use a tiling bark texture that is 256*512 size or so (tall rectangle like ryno said), since you'll notice the horizontal tiling a lot less than the vertical, and keep my leaves/alphas on a separate sheet since the materials will be split anyway, so no point in keeping the bark and leaves on the same sheet =).
  • warby
    Offline / Send Message
    warby polycounter lvl 18
    the half life 1 engine is the last ( only) engine i ever remembered having a problem with uvs being outside the 0-1 range. every modern engine will handle what you are planning to do just fine how ever probably not important with bark but i know unreal engine will get less and less precise the further you go away from 0-1 i had this big cathedral model where some of the uvs where in the 100+ area and than unreal 3 started distorting them just so you know :)
  • breakneck
    Offline / Send Message
    breakneck polycounter lvl 13
    great info from all - thanks a bunch!
  • SHEPEIRO
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    Tumerboy wrote: »
    yup. At least every decent engine

    That's how most bark textures are done. They tile more on the vertical than the horizontal, so sometimes bark will be on the left half of the texture (tiling vertically, but not horizontally) and leaf card textures will be on the right. Then the trunk is unwrapped into the left half of the UV space, but extending above and below 0-1.

    personnally i wouldnt work like this, id use two seperate textures, because most engines i work with have a draw cost for any surface with alpha in (aswell as mem cost for having an extra channel for all that space when only half needs it but this is less important) so if your going to have alot of trees it makes sense to reduce the cost by having two texture one with alpha for the leaf planes and one without for the trunks, this also gives you gretaer freedom with tiling
  • breakneck
    Offline / Send Message
    breakneck polycounter lvl 13
    Shep:
    I am doing how u and peris mention by making two separate textures: one bark, one leafs.
  • Tumerboy
    Offline / Send Message
    Tumerboy polycounter lvl 17
    Sorry, I should have clarified better. I agree that putting leaves and bark on one texture is NOT the way to go. I was simply trying to point out that you can pretty much do whatever you want with your UVs in modern engines.
  • warby
    Offline / Send Message
    warby polycounter lvl 18
    SHEPEIRO wrote: »
    personnally i wouldnt work like this, id use two seperate textures, because most engines i work with have a draw cost for any surface with alpha in (aswell as mem cost for having an extra channel for all that space when only half needs it but this is less important) so if your going to have alot of trees it makes sense to reduce the cost by having two texture one with alpha for the leaf planes and one without for the trunks, this also gives you gretaer freedom with tiling

    WORD

    actually when ever you have a big white BLOCK in your alpha map you are doing something wrong
  • Ryno
    Offline / Send Message
    Ryno polycounter lvl 18
    I'm finishing the last of 40 trees right now, I'll try to bust out a little tutorial once things get more sane.

    Some other quick notes though for the moment:

    Trunks-

    For trunks, make sure that horizontally, you are mapped zero to 1 (or 2, 3, or whatever) and that your texture tiles on the U and V, to avoid seams. If you don't map zero to 1 horizontally, you'll get a nice big vertical seam all the way up your tree.

    If you must have seams in the trunk, hide them toward the interior, under the canopy.

    Nail the scale of the bark texture. A small chunk of bark isn't as big as a dinner plate. View the trunk from player's perspective.

    Once you're mapped zero to 1 horizontally, you can offset UVs horizontally to skew them. They will still be 1 unit apart so that you won't see a seam. But by skewing them, you can avoid seeing repititious tiling of your texture vertically. It allows you to keep more distinct detail in your bark texture without having it tile poorly.

    A combination of 3d branches for larger ones, and 2d alpha pane branches is optimal. Just butt the 2d branches into the ends of your tapering 3d branches, and add them as twigs and small offshoots in other areas.

    Leaves-

    Leave a lot of negative space/transparency in your leaf clump textures to avoid them from looking too solid. Layer multiple cards to build depth.

    Use a variety of different leaf clump shapes to avoid the cotton ball look to the clumps.

    Often it's hard to properly paint or find good photos from which textures can be extracted. Bake leaf clump textures from a mid poly individual leaf model if possible. This way you get texture and clean alpha.

    Lighting -

    Trees light like shit. Therefore, if your engine/shader supports it, do some hand painted vertex coloring to add some AO. This is very hard to bake properly. Darken the geometry in the interior of the canopy to give the tree more depth and to keep it from looking too flat. Leaf cross-clumps should be slightly lighter at their tops and exterior area.
Sign In or Register to comment.