Home Technical Talk

Dealing with texel density and tiling textures issues...

jordank95
polycounter lvl 8
Offline / Send Message
jordank95 polycounter lvl 8
Hi all -

Running into a little bit of a texel density issue and I'm not sure the best way to go about it. I understand texel density as I've made good amount of scenes, but this new scene I'm working on has a texel density of 10.24 per meter, whereas I'm used to working with 5.12 per meter (and lower) in the past. 

The issue comes with tiling textures. I'm working on a floor tile material thats just standard square ceramic tiles. Similar to something like this:

https://www.expressflooring.com/blog/wp-content/uploads/2015/05/Granite-Tile-1024x668.jpg

Each of my floor modular pieces are 4x4 meters, meaning a 4k texture would tile perfectly. But I don't want to use a 4k texture for the floor, rather I want to use a standard 2k. But tiling the 2k texture over the 4x4m ground mesh would cause the texture to repeat 4 times, making the tiles small. If I make the tiles bigger in Designer to offset this, then I have way less variation and you can notice it repeating way more.

What's a way around this?

Replies

  • Kanni3d
    Options
    Offline / Send Message
    Kanni3d ngon master
    You can totally tile a material/texture with it repeating. That's the nature of tileables. :smile:

    If you have a module that is longer/larger than your delegated texel density, it'll just have to tile - you don't NEED to have all textures/modules fit perfectly within the edge of a texture.

    It's the same thing as having a 2x2 meter floor module. it'll fit with your 2048x2048, right? but then you'll have to duplicate those modules to fit the space of 4x4 meters..therefore tiling.
  • jordank95
    Options
    Offline / Send Message
    jordank95 polycounter lvl 8
    @Kanni3d right, I understand all of that, but maybe I’m not being 100% clear. Lemme try to explain a little better!

    If my texel density is 5.12 per meter, the 2K texture of the floor tiles i made in designer that has 9x9 tiles, looks great on my 4x4 floor mesh piece. But once I up my texel density to 10.24 per meter, that texture now tiles 4 times, therefor making that 4x4 floor piece have 18x18 floor tiles and they look really physically small in the game world. The only solution is to lessen the tiles in designer, but now I have way less variation but the physical size of the floor tiles is correct. 
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    Just use whatever texel size you feel is appropriate.  Texel density is not a dogma.  Ugly repeating details if you couldn't hide them   make much worse impression than inconsistent texel size.      Game art is always a compromise and trade off.   You could use non square texel size too sometimes.

    All that said  any material consisting actual tiles or any repeating elements  is repetitive in its nature  and  usually makes lesser of a problem with repeating look  so in such case there is no need to bend the rules.     Also sometimes if some detail makes a texture look too repetitive  you could make such detail a decal.   The final look of materials is a combination of main texture, macro layers, decals and small geometry covering the ground.

     Still if nothing helps   slightly varying texel density  in environment materials is acceptable, nobody would notice.
  • jordank95
    Options
    Offline / Send Message
    jordank95 polycounter lvl 8
    @gnoop thanks for clarifying a bit. Maybe I’m not fully understanding texel density with tiling textures. But thinking about it a little bit more, let me know if this is correct:

    If my texel density is 10.24 per meter, and I have a 4x4 meter piece, does that mean I need to have a 4K tiling texture on that piece for it to be accurate?

    lets say I have a 2.56 texel density, does that mean that I need a 1024 texture on a 4x4 in order for it to be accurate?

    having a 4k texture on a 4x4 meter piece with 10.24 texel density seems crazy. How do you get around this? Just use masks for grunge, decals, whatever else to cover up the low texel density?

    ugh. Maybe I’m not understanding some things and it’s really driving me crazy. I understand texel density as a whole, but when it comes to tiling textures there’s something that isn’t clicking. 
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    jordank95 said:
    @gnoop thanks for clarifying a bit. Maybe I’m not fully understanding texel density with tiling textures. But thinking about it a little bit more, let me know if this is correct:

    If my texel density is 10.24 per meter, and I have a 4x4 meter piece, does that mean I need to have a 4K tiling texture on that piece for it to be accurate?

    lets say I have a 2.56 texel density, does that mean that I need a 1024 texture on a 4x4 in order for it to be accurate?

    having a 4k texture on a 4x4 meter piece with 10.24 texel density seems crazy. How do you get around this? Just use masks for grunge, decals, whatever else to cover up the low texel density?

    ugh. Maybe I’m not understanding some things and it’s really driving me crazy. I understand texel density as a whole, but when it comes to tiling textures there’s something that isn’t clicking. 
    Like was mentioned earlier, you just tile the texture more. So if you had a 1024px/meter texel density and a 4x4meter floor piece, you would tile that 1024 4 times. Your floor UVs would be 4 times larger than 0-1 UV space.

    The issue you may run into is that say the scale of your floor accommodates 16x16 bathroom tiles, and you have a 4k texture that has 16x16 bathroom tiles you can't simply resize that 4k texture to a 1k and tile it 4 times, because now that 4x4meter floor piece would have 64x64 bathroom tiles on it and scale would be off. In this case you would need to author a texture that has 4x4 tiles that 1k resolution so when you tile that 1k texture 4 times, you end up with 16x16 bathroom tiles like you intended.

    To compensate for the repetition you get with this, games tend to use vertex blending shaders, decals or even just clever prop placement make it less noticeable
  • jordank95
    Options
    Offline / Send Message
    jordank95 polycounter lvl 8
    @m4dcow that’s the main issue I was running into that I wasn’t sure what to do. So let’s say I have a texture that’s 16x16 bathroom tiles like you said, but there’s a specific design within that bathroom tile texture, so I can’t simply reduce the tiles, they have to stay at 16x16. What would I do in that case? That’s the issue I’m running into now. 
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    In that specific situation I would use a low res texture (16x16px) that would drive the pattern in a shader. You could also use vertex colors but it probably wouldn't be wise tessellating the floor that much. You could probably do it with decals too.

    I would recommend experimenting with shader creation in something like UE4.
  • musashidan
    Options
    Offline / Send Message
    musashidan high dynamic range
    Is there a specific pattern design that will only fit on a 4m2 floor piece with that exact amount of tiles?
  • Prime8
    Options
    Offline / Send Message
    Prime8 interpolator
    jordank95 said:
    ...
    If my texel density is 5.12 per meter, the 2K texture of the floor tiles i made in designer that has 9x9 tiles, looks great on my 4x4 floor mesh piece. But once I up my texel density to 10.24 per meter, that texture now tiles 4 times, therefor making that 4x4 floor piece have 18x18 floor tiles and they look really physically small in the game world. The only solution is to lessen the tiles in designer, but now I have way less variation but the physical size of the floor tiles is correct. 
    There is no way around this, with a lower resolution you have more tiling and less variation.
    If you need 9x9 tiles on a 4x4m floor and you want to use a texture covering a quarter of that floor, that texture has to contain a quarter of the tiles, 4.5x4.5 tiles in this case.
    Now the texel density defines how large the texture for the 4.5x4.5 tiles needs to be.

    If you have a specific real world pattern you need to recreate, which doesn't fit exactly into your texel grid (e.g. 1.1x1.1m), you either need to adjust the texel density (preferably) or squeeze the pattern into your grid. 
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    I am really puzzled why texel density have became such a holy grail recent years.  It's important really only when you use some macro texture scaled from the same UV, which is easy to workaround with just a single extra multiplier in a patch  specific shader.

    Especially when people left 50% of a texture empty because of  holy texel density.  It's just madness imo.    Do somebody really notice a 50% texel scale difference ? Or wasting his/her time redoing textures because of wrong density scale?  Substance Designer is hardly capable to easily change the overall scale at all

  • RacePeaceDay
    Options
    Offline / Send Message
    RacePeaceDay polycounter lvl 6
    Judge by eye if texel density is good enough, no need all that math. Make sure it's not too blurry is all you need.

    To break tiling, vertex paint, decals, layered shader, combinations of these things.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Unless you're blessed with all the video memory in the world and turn mips off you will encounter situations in a game where texels are bigger than pixels. When that happens, any significant  inconsistency (above about 25%) in texel density between assets makes your game look like a shoddy hackjob.  

    Any studio that gives a toss about presentation will have texel density guidelines for various subsets of assets and will enforce them. 

    OP :  make the texture bigger or do something in a shader to increase perceived texel density using lower res maps (eg, detail map)
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    poopipe said:
    any significant  inconsistency (above about 25%) in texel density between assets makes your game look like a shoddy hackjob. 
    I have never understood it.  It's probably one of those things peoples  perception differs , Like 120hz vs 60hz or 60fps vs 140.  Some people claim huge difference  I never noticed a thing.    
     Clever texel size variation and stretching actually helps to  move mip switching further away and sort off some mipmapping issues in certain situation , like stretching texels on a road surface for example.
      
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    gnoop said:
    I am really puzzled why texel density have became such a holy grail recent years.  It's important really only when you use some macro texture scaled from the same UV, which is easy to workaround with just a single extra multiplier in a patch  specific shader.

    Especially when people left 50% of a texture empty because of  holy texel density.  It's just madness imo.    Do somebody really notice a 50% texel scale difference ? Or wasting his/her time redoing textures because of wrong density scale?  Substance Designer is hardly capable to easily change the overall scale at all

    Yeh but tileable textures in environments are the easiest place to adhere exactly to texel density requirements, it often goes hand in hand with modular sets since you want pieces to all line up consistently.

    I don't have an issue breaking convention in certain cases, but it is just a guideline so everyone is on the same page. It is almost like if there wasn't a style guide for a project, assets would just end up looking off when they are put together in a scene.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Exactly - you need the guidelines.  
    If you're working on things in isolation this sort of stuff doesn't matter at all but when you've got 50 or 60 people working on hundreds of things you can very easily end up with a horrible mess.

    There's an optimisation angle as well.  If you know a subset of assets are going to be a minimum distance from the player  at all times you can work out the optimal texel density - ie. The closest to 1 texel per pixel - and ensure people aren't pissing memory away by going higher. 
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    While I agree that texel density is important  until some degree, there is another side of this whole thing. We, as artist has super sensitive eyes for this kind of stuff, and we tend to observe assets one by one in games, looking for their technicalities. On the other hand, most of the gamers who just plays the game don't give a shit at all because they came to play and not to look at a museum of assets. They don't even know about this, and they won't start comparing assets. For example, my brother plays a lot of games for fun. And he isn't a complete noob about 3d either even though he wouldn't be able to make a single 3d asset. But he had to listen to my stuff during the years, so he knows some terms and how stuff is built. And even then, he can tell if something is too lowpoly or has too lowres texture, but it still doesn't come to his mind to compare them to each other, so even him wouldn't ever notice if 2 things compared to each other has off density. And this is someone who has some slight clue about 3d but he just plays. Now hardcore gamers, entirely different story...And at the end of the day, we make stuff in games for gamers! Also, I can't agree more with what gnoop said about leaving half the texture empty because of correct texel density is just a total madness, in the age where video memory is the most valuable resource and we don't have that much of it.

    I'm not saying that its all bullshit and you shouldn't care either, but these days, artists tend to see the importance of this a little bit exaggerated. I'm not a gamer but I work in the fields of 3d and games for many years, and after some time I came to the conclusion that the overall feel and quality of the whole image is more important than small technicalities, unless something is very off. So off that it falls off from the image as we say around here. Long story short, in my honest opinion, you have some leeway to play with this and in some cases, I would rather scale things up to better fill the texture space and have better resolution on my little child. And half filled texture in a portfolio piece because of strict texel density decision is rather damaging.
  • gnoop
    Options
    Offline / Send Message
    gnoop polycounter
    Obscura said:
    While I agree that texel density is important
    Yeah,  in a game I  am working for (racing game)  texture memory is most valuable resource probably since such games couldn't use  typical  substance or megascan 2x2 meters textures.

    At 100mph speed they would repeat so crazy it would give you an epilepsy seizure. So you have a choice : everything is equally mid/low res, everything is uniform and  lost any texture detail character  or you prioritize some key elements having slightly smaller texels size.  White painted line/grass edge for example.    

    So I believe texels size is another tool you could use to certain advantage if you use it clever and don't make it too crazy.   

    For some uncertain reason art people now believe that same texel size evrywhere is more important than issues it often makes much harder to sort off  like too much of same repeating decals, too uniform and even textures they have to use, blurry macro texture or unnatural looking detail one ,   unnatural vertex color based blending because height blend its too expensive for multi layered things etc.

    I don't say it's something you don't have to care at all  but 25% difference is a "shoody hackjob"   Really?
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Yes,  If you put two assets next to each other with a 25% discrepancy in texel density and the texels are bigger than screen pixels I think it looks very shitty and I would not sign it off  - it's only an opinion but it's one shared by most art directors I've worked with. 

    In the context of a racing game it makes perfect sense to pick different densities for different classes of asset egg. the road, car interior, road markings, off track assets, background assets etc.  And you absolutely should come up with standards that use the minimum resolution required. 
     
    Within a given class, assets really need to be pretty consistent among themselves though or you end up with things not bedding in and connecting properly and that's what I'm talking about 


  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Everybody can have their opinion of course. Personally, it hurts my eyes much more when things don't look grounded because of poor lighting tech, when things look flat in ambient lighting, when foliage still looks like cards in 2019, when characters has stupid face because of bad anim, when particles are visibly still cards in 2019, when normal mapped planar surfaces looks like its texture is just a sticker and has no feel of depth, and I could go on for long. Inconsistency in texel density is one of them, and its not the first one on my personal list. Its also harder to notice in a fast paced game if we play them as its intended to be played (not stopping on every corner to observe if texel density is consistent).
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    To be fair, I have a reputation for being pretty anal about this sort of thing
Sign In or Register to comment.