Home Unity

TIling Texture UVs outside the 0-1

polycounter lvl 5
Offline / Send Message
Pinned
SpiffyMai polycounter lvl 5
Hi. 

I thought it was a general practice that if you're making tiling textures, that it was no problem taking the UVs and putting them outside the 0-1.

Is there any reason this would be a bad idea, performance wise? 

Replies

  • jStins
    Options
    Offline / Send Message
    jStins interpolator
    Shouldn't be a problem. Did you come across something to the contrary?  
  • Eric Chadwick
    Options
    Offline / Send Message
    If you're baking lightmaps, the UV has to be all inside, generally with no overlaps.

    If you're transform bound (vertex count is limited) then you can reuse the lightmap UVs for your tiled textures, by setting the tiling amounts in the shader. 
  • SpiffyMai
    Options
    Offline / Send Message
    SpiffyMai polycounter lvl 5
    jStins said:
    Shouldn't be a problem. Did you come across something to the contrary?  
    Not exactly. I made a trim sheet and stretched the UVs off into space to tile them off of it to keep from making 3 different materials. My coworker was playing devil's advocate and mentioned that our Lead had once said that if you don't lay the UVs out properly, it stresses the engine out and that our other coworker, a tentative senior but not really, would shit bricks if the devil's advocate coworker had UVs out of the 0-to-1. 

    So. In anticipation for the lead or the "senior" to shit bricks, I thought I would ask, since, as I was taught in school, it was totally fine. But school and practice are two totally different animals. 

    I did go looking in other forum posts and never saw anyone say anything about it doing anything performance-wise.... just that it would tile (or not, depending on the shader). 
  • Eric Chadwick
    Options
    Offline / Send Message
    You might have a "senior" with their head up their ass. Shitty egos happen sometimes. Just run it by them for feedback. Asking never hurt. 

    Could also be the coworker misheard the instruction, or is blowing it all out of proportion.

    On lower end hardware, you can run into precision issues if the UV is really far away from the 0-1 "home". But that's pretty rare these days, unless you're doing mobile development, or doing PS2 dev. :D

    There's also an issue with long thin triangles, which can stress the renderer out. But that's not a UV issue. And can fixed pretty easily by just cutting the mesh in a sensible amount. 


  • SpiffyMai
    Options
    Offline / Send Message
    SpiffyMai polycounter lvl 5
    Good to know! Thanks for the help, Eric Chadwick & JStins
Sign In or Register to comment.