Home Technical Talk

Tiling some of texture, not all?

bpears
polycounter lvl 4
Offline / Send Message
bpears polycounter lvl 4
Is it possibe to tile a part of a texture on some parts of a model, without "folding" faces? While still using the texture normally for the rest of a model. Or do I need to just use a separate texture to do that? If so, would it be more optimized to make that part, that is using a separate tiling texture, its own object/mesh?

Replies

  • WarrenM
    Options
    Offline / Send Message
    It depends on what is more expensive on your engine/platform. The first way creates more verts and the second way creates another texture lookup and rendering call. Hard to say without knowing your target....
  • Michael Knubben
    Options
    Offline / Send Message
    if it only tiles in one direction, you could use a non-square texture, like a 256x1024. Then you unwrap the unique elements inside of the uv borders and have the tiling elements cross it.
  • 54Strat
    Options
    Offline / Send Message
    54Strat polycounter lvl 5
    From a recent post ( http://www.polycount.com/forum/showthread.php?t=122013 )

    The only way to use tileable and unique textures in the same image file is to arrange them so the tileables only tile in one direction and span across the whole texture in that directon. That leave space to add other tileables or unique textures in the non tiling direction. In the image below, the stone textures tile only in U, so we can just stack additional textures in the V direction.

    Untitled-1.jpg

    There's also a nasty technique to flip / mirror the UV's to create a pseudo tiling, but that's so old school it hurts,
  • bpears
    Options
    Offline / Send Message
    bpears polycounter lvl 4
    It depends on what is more expensive on your engine/platform. The first way creates more verts and the second way creates another texture lookup and rendering call. Hard to say without knowing your target....

    Target is multiplatform PS4, PC, maybe xbox. Working in Unity. It's an FPS game.
    if it only tiles in one direction, you could use a non-square texture, like a 256x1024. Then you unwrap the unique elements inside of the uv borders and have the tiling elements cross it.

    Are you saying to put the UV's of the to-be-tiled faces in the outskirts of the main texture square, and have the texture go past the normal texture square to also? Trying to wrap my head around it before I go modeling all my stuff wrong. I'm learning texturing in Maya, and trying to figure out the most optimal way. Working out of Unity.
  • bpears
    Options
    Offline / Send Message
    bpears polycounter lvl 4
    54Strat wrote: »
    From a recent post ( http://www.polycount.com/forum/showthread.php?t=122013 )

    The only way to use tileable and unique textures in the same image file is to arrange them so the tileables only tile in one direction and span across the whole texture in that directon. That leave space to add other tileables or unique textures in the non tiling direction. In the image below, the stone textures tile only in U, so we can just stack additional textures in the V direction.

    Untitled-1.jpg

    There's also a nasty technique to flip / mirror the UV's to create a pseudo tiling, but that's so old school it hurts,

    Ok, so that hole thing is one texture? and the tilable part is out of the normal UV square?
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    google "thirding" term. If you are brave one you can look directly to polycount wiki cause it is covered there as well. You know polycount have wiki as well right?

    EDIT: does not matter what engine are you using... It is general technique.
  • bpears
    Options
    Offline / Send Message
    bpears polycounter lvl 4
    cupsster wrote: »
    google "thirding" term. If you are brave one you can look directly to polycount wiki cause it is covered there as well. You know polycount have wiki as well right?

    EDIT: does not matter what engine are you using... It is general technique.

    I'm trying to understand, how does the modeling program know which parts you want to tile with and which are unique? Do you just stretch the tiling parts past the texture and it repeats itself in the direction the UV was overflowed?

    I have experience unwrapping and texturing characters, but not with tiling. So trying to understand how that part ties in.

    EDIT: I googled thirding, but that doesnt seem like tiling/unique combo? But using tiling in sections. Correct me if not. Thanks
  • fr0gg1e
    Options
    Offline / Send Message
    fr0gg1e polycounter lvl 17
    you can cut your polygons anywhere and tile with geometry. I often do that if I have to use texture pages.

    Each element below is made to tile on it's own (being stipes or bricks...and some tests that didn't turn out too good =)Trim02_Full_Marmoset.jpg
    All the elements are placed tp specific numbers in PS beforehand. Then I used textools to map my polys perfectly to the tiling numbers on the sheet. Then I do elements that I tile. Heavier on the polygon side but for what I had to do it was fine.
    And this is where I only need to tile in one direction (horizontally).
    Trim01_Marmoset.jpg.
    Less hassle but less possibilities.

    Thirding (courtesy of poop) is the same principle applied only to the middle part while top and bottom are unique
    thirding.jpg
  • bpears
    Options
    Offline / Send Message
    bpears polycounter lvl 4
    I was thinking of doing the folding geometry, but I have too keep my polycount down. I wonder if texturing each modular piece separate would be even better than an extended texture? If you figure, with occlusion culling, the modular pieces that are seen at once, may not always be all parts, so only rendering the modular pieces necessary, along with their textures(my point). What you think?

    EDIT: Although, I guess I may need tiling within a modular piece as well.. Hmmmmm...
  • bpears
    Options
    Offline / Send Message
    bpears polycounter lvl 4
    The main thing I am wondering at this point, is, to use the technique 54Strat posted, how is the texture itself layed out in UV space? is the tiling part in the (1,1)? above the (1,1) border?
  • fr0gg1e
    Options
    Offline / Send Message
    fr0gg1e polycounter lvl 17
    I wouldn't use UV tiles, Also called UDIMs, as they are very specific and most engine might not understand them.
  • 54Strat
    Options
    Offline / Send Message
    54Strat polycounter lvl 5
    @bpears

    The uv range for that texture is 0 > 1 for both U and V, as it is for all textures. Because it's non square, it's aspect (1:2) may confuse.

    Let's say that texture is Width=512 px and Height =1024 px, the u range is from 0 to 1, or 0px to 512px. The v range is 0 to 1, or 0px to 1024px.

    So the tiling part's bottom left corner is uv = (0,0.5) or (0, 512)px, and it's top right is uv = (1,1) or (512,1024)px. hth.

    @fr0gg1e

    Just wondering, which engines won't understand UV tiling? And UDIMs are a very specific case (MARI?) and require converting.
  • bpears
    Options
    Offline / Send Message
    bpears polycounter lvl 4
    54Strat wrote: »
    @bpears

    The uv range for that texture is 0 > 1 for both U and V, as it is for all textures. Because it's non square, it's aspect (1:2) may confuse.

    Let's say that texture is Width=512 px and Height =1024 px, the u range is from 0 to 1, or 0px to 512px. The v range is 0 to 1, or 0px to 1024px.

    So the tiling part's bottom left corner is uv = (0,0.5) or (0, 512)px, and it's top right is uv = (1,1) or (512,1024)px. hth.

    @fr0gg1e

    Just wondering, which engines won't understand UV tiling? And UDIMs are a very specific case (MARI?) and require converting.


    Makes sense now, thank you! And so I suppose I could also do something like this, and have the faces that will tile to be within the top right, in the red, and it would be able to tile U and V?
  • Eric Chadwick
    Options
    Offline / Send Message
    Yeah that works. Except the top right would have to be the same end-texture for both runs, so you couldn't do horizontal-stone vs. vertical-wood... they'd both have to end in wood.
  • Noors
    Options
    Offline / Send Message
    Noors greentooth
    Don't you guys have mipmap bleeding issues with tiled texture atlas ? Or is there some shader magic to precisely wrap textures ? Like a clamp at "subtexture" level ?
  • Eric Chadwick
    Options
    Offline / Send Message
    Aniso filtering kills most of it. If you don't have that, mobile or Wii for example, then test and add only as much border as you need. We needed a lot for one Wii title I worked on, because the camera was low to the terrain fairly often.
Sign In or Register to comment.