Home Technical Talk

Sword UV creation

polycounter lvl 11
Offline / Send Message
thegreyman1 polycounter lvl 11
Hello everyone. Not sure if this is in the right section but anyway...

Just creating a Katana for a client (my first ever sword) and I've hit a problem with the UVs. As you can imagine the huge blade is taking up a lot of UV space and if I keep everything else to scale then theres a lot of wasted space. A lot.....

So what do I do? Or more precisely what have any of you done before? Do you use a non-square UV map? ie 1024x256 etc (the game is in Unity so waiting for him to find out if that will do). Do you chop the blade UVs in half? this still wouldn't work too well in my view. Or do you put the sword in diagonally? Still has wasted space though...

Any help would be appreciated here :)

Thanks

Replies

  • Autarkis
    Options
    Offline / Send Message
    Autarkis polycounter lvl 8
    Would you mind posting your uv layout as it stands? Using non power of 2 textures in Unity slows down their rendering so I don't think it would be good for you to do that. Not too sure how Unity 4 handles them but I know 3 and 3.5 there was a slowdown associated with them.
    You could chop the blade uv's in half shouldn't be a problem imo.
  • thegreyman1
    Options
    Offline / Send Message
    thegreyman1 polycounter lvl 11
    Yes but that would be a real pain to texture.

    And technically I would still be using power of 2 UVs, as in it would be either 256, 512, 1024, 2048 etc but the UVs wouldn't be square.

    This is a UV template render of my quick UVing (very quick) I think I'll move all objects to the top of the map

    7-7.jpg
  • Autarkis
    Options
    Offline / Send Message
    Autarkis polycounter lvl 8
    By non power of 2 i meant non square uv's. Running on not much sleep today so I muddled my thoughts. Hah :P

    Yeah I see what you mean with that uv layout. You could always texture it like that, then cut off the layout and make it an optimal layout and do a transfer textures with the two meshes in your 3d software or xnormal. Quick and easy solution so texturing wouldn't be a pain. I'm sure someone else will pop in with a much better solution though ;)
  • James Ordner
    Options
    Offline / Send Message
    Just make a non-square power of two texture. 1024x256 works just as well as a square texture like 512x512, even for Unity. This will allow you to use much more of the texture space, as well as minimizing stretching.
  • Autarkis
    Options
    Offline / Send Message
    Autarkis polycounter lvl 8
    Oh good to know. I was told on a previous project that non square textures cause slowdown in Unity builds. Guess the programer told me wrong then!
  • James Ordner
    Options
    Offline / Send Message
    I believe that iOS compression is different, requiring square textures. You should be fine if you are developing for PC though, which by the looks of your UVs, you are.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Just cut the blade into 3 pieces , is there really a need to have double sides mapped also ? I guess you will see the katana only from one side ...when I made my katana I have cutted the blade into 3 portions , just be sure to make correct seams .
  • Deadly Nightshade
    Options
    Offline / Send Message
    Deadly Nightshade polycounter lvl 10
    First off you should stack the right and the left side -shells on top of each other (invert one).
    Second, split the long shell into either 2 or three smaller shells. It's pointless having such a long shell if you are restricted to using square texture maps.
  • GeeDave
    Options
    Offline / Send Message
    GeeDave polycounter lvl 11
    From my limited knowledge and some quick googles it appears that using non-square (but still Power of 2) textures is fine for anything other than deploying to iOS devices within Unity. This is apparently a driver issue and not hardware related... meaning iOS is more than capable of handling it, it just doesn't. Some links:

    http://answers.unity3d.com/questions/195219/can-rectangle-pot-pvrtc-textures-be-used-on-ios.html

    http://answers.unity3d.com/questions/8826/using-non-square-textures-on-iphone.html

    http://forums.tigsource.com/index.php?topic=27423.0

    The last one there is interesting as it talks about how to prevent issues with automatic re-scaling when building on iOS, essentially just manually setting no compression and taking the texture "as is". At-least that's my understanding. The last iOS game I worked on in unity had pretty much zero texture compression, I never questioned why... perhaps all of this explains it though.
Sign In or Register to comment.