Home Technical Talk

using the 0 to 1 uv space

polycounter lvl 6
Offline / Send Message
MITVIZ polycounter lvl 6
does all enghines support this? say i have two objects that are the same and i want to have them on the same texture sheet should i move the duplicated to the 1 texture space or leave them all stacked up behind each other? can i also take something like this into a painting application?

Replies

  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    If you're asking if they can be placed outside 0-1, then no. Game engines ignore anything outside 0-1. As does Substance Painter. Mari supports Udims.

    If elements of the same model are identical then you can stack them and they will share the same texture space. Just make sure to temporarily move all but one outside 0-1 for normal map baking.

    If it's  multiple objects you're talking about where 1 has been unwrapped and duplicated then they will all have the same uvs and you can just apply the same texture to them all.
  • MITVIZ
    Options
    Offline / Send Message
    MITVIZ polycounter lvl 6
    thanks musashidan, yeah was just talking about using the o-1 space only, so if i use the normal mapping space (0) i can only put duplicates in the 1 space? or can i uv map my object and use both spaces so i have more resolution for my objects? i mean putting some of my uv shells on one space and some on the other, is that possible? how do i then render out a map to be painted? will i end up with two texture maps for one object?
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    I think you may be getting confused. 0-1 uv space means the square/tile in the centre of the uv editor. U being horizontal (0) V being vertical (1) so 1-0 is the next uv tile to the right, 2-0 the next, and so on. So the tile directly above 0-1 would be 0-1, 1-1, etc.



  • MITVIZ
    Options
    Offline / Send Message
    MITVIZ polycounter lvl 6
  • MITVIZ
    Options
    Offline / Send Message
    MITVIZ polycounter lvl 6
    aha, just saw the image you posted, so the 0-2 space cannot be used?
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    MITVIZ said:
    aha, just saw the image you posted, so the 0-2 space cannot be used?
    You mean 0-1? :smile: As in 0 to 1. This is actually 0,0 but is referred to as 0 to 1 as it goes from 0,0 to 1 in both the U and the V.

    But the answer is no. Game engines, bakers, Substance Painter, etc ignore any UVs placed outside 0,0(meaning 0 to 1) But if you are using Max to render then the texture will tile infinitely across UV space by default, unless you are using Udims; in which case you can use different textures in different tiles.
  • MITVIZ
    Options
    Offline / Send Message
    MITVIZ polycounter lvl 6
  • oglu
    Options
    Offline / Send Message
    oglu polycount lvl 666
    all engines i know are reading uvs outside of the 0-1 space...
    if you scale your uvs up 10 times you get a tiled texture...
    and if you move the uvs to 1-2 it will also work cause of the wrapping...

    if you are goin to stack uvs in 0-1 with different textures you need two materials to get them working...
    and if you move some uvs to 1-2 and like to use a second texture you have to use a second material...
  • Farfarer
    Options
    Offline / Send Message
    Game engines do NOT ignore that. How else would tiling textures work?

    Generally in game engines you can set the texture wrap mode. Clamp means that outside of the 0-1 range, the edge pixel of the texture is sampled. Repeat, which is usually the default, means the texture is repeated indefinitely for all UV tiles.

    When it comes to baking or painting, however, generally only UVs inside the 0-1 range are useable. This can be beneficial to us when baking meshes that have polygons which share UV space (usually from something like a mirrored mesh) as baking to overlapping UVs can have unpredictable results.

    UDIMs are a different matter again and most game engines don't support those.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Farfarer said:
    Game engines do NOT ignore that. How else would tiling textures work?


    Sorry, let me clarify: I'm talking about having multiple textures on multiple UV tiles simultaneously, specifically Udims.
  • Eric Chadwick
    Options
    Offline / Send Message
    Most game engines can support UDIMs, all you need is a custom shader. It's not really all that complex. I think the reason most games don't support UDIM out-of-the-box is the tremendous memory cost of all those extra bitmaps, plus the shader would get expensive. So it's just too complicated in the end, not really worth the effort.

    For the OP's original request, just use a different material for each object, solved.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Most game engines can support UDIMs, all you need is a custom shader. It's not really all that complex. I think the reason most games don't support UDIM out-of-the-box is the tremendous memory.

    Yes, I read about the process through the UE4 SDK, but it sounded a lot more hassle than it's worth.
  • CreativeSheep
    Options
    Offline / Send Message
    CreativeSheep polycounter lvl 8
    I have a question about UV's, do you calculate; (0+1,0+2) = v1_v2, by always add a zero to either U or V ?
    Then for UDIM how do you calculate ?



  • oglu
  • CreativeSheep
    Options
    Offline / Send Message
    CreativeSheep polycounter lvl 8
    I'm referencing questions from the second last comment on that page.
  • Eric Chadwick
    Options
    Offline / Send Message
    I'm referencing questions from the second last comment on that page.
    The main article describes exactly how you do this. I think the commenter did not actually read the article...

     you can get to this number from a traditional (u,v) coordinate by using the following maths: 1000+(u+1)+(v*10)

  • MITVIZ
    Options
    Offline / Send Message
    MITVIZ polycounter lvl 6
    Thanks guys!!!
Sign In or Register to comment.