Home Technical Talk

How can I tile within a UV chart?

Scuse the newb..

Im trying to tile the floor of this room...

What I want is the edges to be dirty, and the corners to be dirty, and the middle to be tiled. So I figure I need one square with 2 sides dirtied up (the corner) and one or 2 squares to tile along the edges of the room, and one "clean" tile that can be tiled in both directions...

thus...

20100603-xny3u86utmjxnmuwjnsba3p4du.jpg


But how, in Maya?

Heres the beginings of my UV sheet, Walls are easy, cos Ive just wrapped them al the way around, but the little bit in the top left, is where I intended to use somehow map the floor from.. but now I try I cant figure it out!!!






20100603-byqbk5fprqpsq6nbbkjq2xetnq.jpg


Surely I dont have to have a whole seperate sheet just for the floor, when its mostely just tiles...


Pleae help... Ive been struggling wit this for ages...
Im sure its just a head thing, like Im thinking about it all wrong...

Cheers

Mark

Replies

  • EarthQuake
    Options
    Offline / Send Message
    Chop up the geometry, map each quad to the texture space you want to use. You will also need to add a certain amount of padding to each section as well, or you'll get really nasty artifacts when the textures mip down.
  • markfrancombe
    Options
    Offline / Send Message
    Thanks for the fast reply... unfortunately I dont understand some of it!!
    EarthQuake wrote: »
    Chop up the geometry,

    REally? Thats easier said than done! How would you do this? Wont this add to polycount? Do I really need a quad for EVERY tile on the kitchen floor, that gonna be hundreds of quads.. I knoe you dont mean that, so Im missing somthing. Look at my 1st pic, javent I done what you mean. I want one tile in all the corners, one tile for the edges of the room (rotated around 90degrees for each wall- and a completely tiled part in the middle. Cant I do that? I want to try to keep all the graphics for this room on one sheet.
    EarthQuake wrote: »
    map each quad to the texture space you want to use.

    Can you explain this? Right now I have mapped the central floor area to ONE tile, as you can see, its HUGE, now I want to shrink and tile THAT SECTION of the chart.. If I do it now, I see the whole chart, including the walls... See the layout pic below...
    EarthQuake wrote: »
    You will also need to add a certain amount of padding to each section as well, or you'll get really nasty artifacts when the textures mip down.

    Im afraid I dont really understand this either.. Iv never had mip explained to me, altho Ive seen the term before... and where/why will I get artifacts?


    Sorry If this is all stupid questions, I hope you guys dont mind helping me get thru this learning bump...

    Thanks SO much in advance..


    cheers Mark
  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    As for the mip question...You have to make the Texture for example for the floor a little bit bigger then the uv island itself.If you go a little bit away from your object, the texture size gets sized down.If that happens and you have no padding in the texture it gets the colour of the surroundings of your map if you have a white background you get a white border.

    hope this helps
  • r_fletch_r
    Options
    Offline / Send Message
    r_fletch_r polycounter lvl 9
    Do I really need a quad for EVERY tile on the kitchen floor, that gonna be hundreds of quads..

    Thats exactly what he means. the only way to do this now is to split the floor into a quad grid and map each quad with the relevant texture coords.


    You could split out the floor textures into individual textures and tile them. Im not sure which would be better though, more draw calls or more verts. workflow wise id think splitting out the textures for the floor into seperate tiles would be easiest
  • mackster
    Options
    Offline / Send Message
    If you want to see an example of how an in-game model UV can look like tile'd up beyond recognition you can visit my old CG society website: http://mackster.cgsociety.org

    Basically in terms of performance the choice of tiling in that way is not good because where every UV/vertice is "cut" you'll end up with an doubled up amount of vertices in game, but on the better side you'll end up using far less textures - which is good of course.
    My bet is that you would tile your textures in the 0-1 space, or use specific textures for each and every material.

    There is a couple of options have to choose between, and which one that is best is hard to say, you always has to make a choice based on performance (texture space/vert count/draw calls) and what's most comfortable in terms of what project you're working on.

    Good luck!
  • Mark Dygert
    Options
    Offline / Send Message
    In general unless its a project with super tight resources I lean toward bigger tiles and hack up the geometry.

    People always freak out about a few more verts like its going to grind everything to a halt, but most of the time unless you're on the DS or iPhone, it won't. Especially since those extra verts let you do a lot more than just save a draw call.

    It will allow you to do variations, Its easy to break up the tiling repetition by mapping a few tiles to different spot on your texture.

    It gives you enough verts to do things like blend textures based on vertex colors as a mask or use vertex colors to help the lighting along. You can also paint deform areas as seen in this video.
    [ame]http://www.youtube.com/watch?v=0V6bit8PrZo[/ame]
    You can do this in Max, Maya and XSI easily too if you're not using UDK.
    Being able to do these few extra things can really punch up your scene.
  • mackster
    Options
    Offline / Send Message
    Like said, depends on what game you're working on, and vert's and draw calls still counts. For example, try comparing an online Unity 3D game with a next gen game (PC/Xbox360/Ps3), you'll will end up with an staggering frame rate using lots of polygons/vertices and large textures. Computer games of today is not all about AAA FPS games using what-ever-next-gen engine.

    An FPS game can easily bounce up to 1000 draw calls and render 1 million verts/sec, still you'll end up fighting frame rates when you have plenty of effects/particles/lights/physics and much more going on. In my world - an good game artist should always strive to use as few polygons as possible to achieve the modeling objective. But then again, I'm old school and not the lucky owner of an Nvidia GTX480. Awesome Unreal video though! :thumbup:
  • SHEPEIRO
    Options
    Offline / Send Message
    SHEPEIRO polycounter lvl 17
    as im geussing there are more jobs in the industry working on consoles...its safe to say that this is the happy medium to shoot for...

    "In my world - an good game artist should always strive to use as few polygons as possible to achieve the modeling objective" its really not as important as saving on draw calls and far too a simplistic approach to take IMO, and the relative importance will continue to decrease aswell
  • ZacD
    Options
    Offline / Send Message
    ZacD ngon master
    mackster wrote: »
    In my world - an good game artist should always strive to use as few polygons as possible to achieve the modeling objective.

    There's always the question, if its going to look better, are those 250 tris worth it?

    Most of the time, its worth it to break up tiling floors.
  • markfrancombe
    Options
    Offline / Send Message
    Thanks for the feedback guys, it humbles me that a simple question is taken so seriosly by a bunch who are IN the industry and know what they are talking about... ANyway...
    Theres a lot of opinions here, so... where are we?

    Theres... split up my floor into alot of quads and apply a texture to each quad. therby keeping all my graphics on one sheet, but adding a bunch more tris.. OR....

    Adding a new texture to the central part and tiling it...

    I can see theres some debate here... interestingly, I thought that there was a way to TILE a section of my main texture.. but apparently not... Odd.. not often I think up a way of doing something that is NOT possible...
  • mackster
    Options
    Offline / Send Message
    It's actually one of my favorite topics when it comes to 3D modeling for computer games, and as you can see - others as well. The answer to your question is very simple: do as you wish and suits you best. I personally would not go with the "extra polys just because I can", but instead you could think like this:

    - What texture resolution do I need on the model (512? 1024?)
    - What details do I want on my model?
    - ie. the floor need to be tiled, can I maintain a good resolution on the rest of the
    model while tiling the UV or should I add new material for the floor.
    - Look up texel resolution.

    The optimization of a game and what's going on under the "hood" is far to complex to explain here in just a few words, but what you should know is that when you tile your UV, every vertice is doubled up in-game. The same goes for hard edges (edges with an angle of 90 degrees). Also, regarding textures - you could say - for each and every material/shader you add to your model that's an draw call (look up Direct X SDK). And when you have all elements in game, like mesh, textures, fog, DOF, filters, physics and so on, you'll have a frame rate - and depending of what kind of game it is, camera view, how much you've tried to squeeze in terms of elements you'll end up with a frame rate that needs to be optimized.

    There are lot's practical solutions and things that a game artist can do and think of to make a game run as smooth as possible, and when it comes to art specifically textures are more heavy than mesh data, and for consoles (PS3/Xbox360) that always has an fixed amount of video memory you are more limited than a PC...

    Oops, there I go again - time to celebrate weekend! Have a good one folks, and good luck to you!
  • gsokol
    Options
    Offline / Send Message
    "In my world - an good game artist should always strive to use as few polygons as possible to achieve the modeling objective" its really not as important as saving on draw calls and far too a simplistic approach to take IMO, and the relative importance will continue to decrease aswell

    I wish this were the case for me. Its all about saving draw calls.

    As for splitting up the geometry to add the tiling in the middle with the dirt corner, there are a couple things you can do.

    1. First of all, the method of splitting geometry is perfectly ok to do. Texture space is a lot more expensive than a few verts. Being super efficient with modeling is important, but people tend to be more willing to dish out a few for things like this.

    2. A lot of the time, you can use linear interpolation/blend mapping/whatever else you wanna call it....where you have 2 textures...the tiled floor texture, and the dirt texture, then have an alpha to dictate how they blend (white would be map 1, black would be map 2) Not sure about how thats done in maya specifically. The video Vig posted is kinda the same thing, but it uses vertex painting to determine where the texture goes.

    3. Decals. Lots of times decal planes are placed all over the place to break up tiled textures, and they would work here too. In this instance, you could make a decal plane that has the dirt texture, but opacity all around it, and just place a few of these where you want them. If you want, you can make a couple variations, but one of them being rotated might do just fine. It ads more tris,but if these are all just copied, then in a game engine, they would typically be instanced...so there is less of a hit on vert count.
Sign In or Register to comment.