Home Technical Talk

Tips and tricks for mapping UVs to texture atlas?

polycounter lvl 5
Offline / Send Message
gameofscones polycounter lvl 5
So lets say I've got a texture atlas with a few different islands on it. If I do a planar mapping of a square, scaling it down to match the UV exactly becomes quite challenging. Do you guys have any tips to go about this or do you just use your sad naked caveman eyeballs? 

Replies

  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    Use snap to grid. 
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    I usually use maths
  • Sajeet
    Options
    Offline / Send Message
    Sajeet polycounter lvl 7
    I use this if youre on maya :)


  • RN
    Options
    Offline / Send Message
    RN sublime tool
    To add to what's been said, another way to go is to script a tool for this (that is, to use automation).

    - If you already have a texture atlas, the tool should let you planar-map a selection of faces and let you input an "index" from the atlas (like a number 1, 2, 3), an ID that represents a rectangle of the atlas. The tool then offsets their UV coordinates so they are contained within the rectangle whose ID you specified. You don't have to worry about aligning UV vertices, just selecting faces and using the tool.

    - If you don't have a texture atlas, the tool should let you "compile" a mesh that's been textured with multiple materials (or a sub-material, depending on the software), which is much easier to map. Every texture element is in an individual file, they don't form an atlas yet.
    It should take all textures being used on the mesh and pack them into the same texture atlas, and then take all faces that are using the same material index and offset them to the same place on the texture atlas. At the end you get the single-material mesh and the texture atlas, with no visual difference.
    There used to be a script for 3ds for this, but it's very old.

    You would only go after a tool like this if you'll have to do a lot of repetitive texturing with atlases, like all the levels in a game for example. It takes time to create a tool like this so it needs to be worth it.
  • Bek
    Options
    Offline / Send Message
    Bek interpolator
    Seneca has a modo script for that; UV Hotspots. It has various methods so you can match closest aspect ratio or closest texel density. He had a video showing it off on dropbox but the link is dead; I can reupload it if necessary (Also you should mention what software you're using in the op so I don't have to guess...)
  • gameofscones
    Options
    Offline / Send Message
    gameofscones polycounter lvl 5
    Thanks for all of the replies everyone. I probably should have mentioned previously that I'm using 3ds. Regardless, your replies have been most helpful :)
Sign In or Register to comment.