Home Technical Talk

Tiling Trim Technique Question

I've been looking for some better ways to create modular assets while saving texture calls. I'd like to see if anyone can clear up a bit of confusion if they can, though.

Lets say I have a texture that tiles in all directions. Super. Excluding things like vertex painting or lerping there isn't going to be any variation to it.

I've done having more than one texture in a texture sheet that limits tiling to only one axis in one direction. Saves on texture calls and I can still vertex paint or lerp, cool.

The trim is where I have some questions.

I'm looking at the thirding technique and trying to figure out if I'm understanding it right. I'll start small and say instead of thirding this will just be...halving I guess would be the term? Let's say you have a texture where the top 90% is tiling in all directions and the bottom 10% is the trim.

I'm interpreting it as needing additional pieces of geometry for the border to use with the tiling portion of the texture that is on the wall mesh. Is this correct? Or is this how it is done normally?

If this is true then if I needed a wall to have no border at all wouldn't I need a separate texture without the borders as just using the tiling portion of the texture with borders on the same size wall mesh will cause stretching if I make the UV match the tiling area?

I was thinking of taking this set up and creating a texture with nothing but different borders that I can swap out in UV space on the borders on the fly.

If this is how it is done, then I do basically understand. If there is a way to accomplish this without adding extra geometry then I'm confused. Let me explain my confusion.

Lets say there is a texture and the middle 80% is tilable and the respective top and bottom 10% are borders. If I were to try and use the thirding technique without creating new geometry how would that work? Is that even possible (without stretching)?

If I tried to make a wall that has a different aspect ratio than the third of the texture that had the tiling texture portion then the UV placement would make the texture terribly stretched.

If the stretching was minimal and I needed a wall that used the border portion of a texture then it still wouldn't tile correctly with the original piece since changing the UV will only distort it more in one direction or another if stretched, or just pan the texture itself if the UV placement was offset, but retained the same size.

I think my questions makes sense. If you need me to clear up what I mean I'll be happy to or I'll make some images to go along with my reasoning. I really want to work with environments and level design so I want to make sure I'm understanding everything I read.

So, in case that was a TL;DR:

I want to make more efficient textures. When creating tiling textures with borders is it necessary to create more geometry for the border pieces or is there a special technique to use minimal geometry as well as save texture space.

Replies

  • Eric Chadwick
    Options
    Offline / Send Message
    Yes. When using an atlas texture, you need to split the geometry (add edges) when you want one of the inner textures to tile.

    This step-by-step tutorial should help.
    http://www.game-artist.net/forums/support-tech-discussion/182-step-step-techniques-tiling-textures-3ds-max.html

    More here
    http://wiki.polycount.net/TextureAtlas
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    really in most cases a huge atlas texture wont help performance much, your better off making a few tiling textures and a few trim sheets that can tile on the U.

    though a upside to have more geo, is tiling in different ways, and having verts for vertex paint.

    also adding extra geo isnt always bad, since the amount of extra geo added prolly has very little effect on performance, with modern hardware i never have hit limits with having too many tris, mostly have fillrate problems or too many draw calls.
  • mister_s
    Options
    Offline / Send Message
    passerby wrote: »
    really in most cases a huge atlas texture wont help performance much, your better off making a few tiling textures and a few trim sheets that can tile on the U.

    though a upside to have more geo, is tiling in different ways, and having verts for vertex paint.

    also adding extra geo isnt always bad, since the amount of extra geo added prolly has very little effect on performance, with modern hardware i never have hit limits with having too many tris, mostly have fillrate problems or too many draw calls.

    Yeah, the only thing I'm confused about is how bad is having more geometry. If I slice a wall then it would be two meshes (or 3 if there is a top trim) for every wall piece which would double or triple the amount of mesh calls in the scene.

    I could always use a single mesh that wasn't actually split and had a separate material on each piece so I can swap it out in something like UDK. I don't know how efficient multi-material meshes are, though. Unless what I just mentioned is actually what was meant in which case... derp.


    Am I worrying about nothing or am I still oblivious to something obvious?
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    what do ytou mean multiple meshs? you dont have to break it up, you just add additional edge loops, so you can place a uv seam down hte middle and apply differnt mapping
  • m4dcow
    Options
    Offline / Send Message
    m4dcow interpolator
    I wouldn't worry about it too much, geo is fairly cheap these days.
    mister_s wrote: »
    If I slice a wall then it would be two meshes (or 3 if there is a top trim) for every wall piece which would double or triple the amount of mesh calls in the scene.

    Don't think so small in terms of modularity, there is mesh modularity and texture modularity, it wouldn't be smart to have a mesh for each segment of a wall, you would be limited by object count fairly quickly.

    You can do a 2 segment wall with top trim, look at the image below, you would use 1 & 3 together.

    thirding.jpg

    Personally I think making good thirding textures is a pain, and prefer tileables with trim pieces and vertex blending.
  • mister_s
    Options
    Offline / Send Message
    Ahhh, I got you guys now. I was way over complicating things.

    So generally the only thing I'm sacrificing is a few triangles and some extra verts since I'm splitting the UV to tile.
  • passerby
    Options
    Offline / Send Message
    passerby polycounter lvl 12
    mister_s wrote: »
    Ahhh, I got you guys now. I was way over complicating things.

    So generally the only thing I'm sacrificing is a few triangles and some extra verts since I'm splitting the UV to tile.

    yep, which is more than worth the result, since tris are cheap.

    note for the future, you should not be trying to optimize till you got clear targets of what needs to be optimized. Since no point trying to save tris, if it's the fill rate slowing things down, and no point trying to fix fillrate issues if the issue is draw calls etc.

    best to just make your environment, and if it isn't running as fast as it should, profile it, and see what is slowing it down.
Sign In or Register to comment.