Home Technical Talk

tiling textures only on one corner

polycounter lvl 3
Offline / Send Message
poly_bob polycounter lvl 3
is it possible to repeat a texture only on one corner?

for example

SvJJyUF
http://imgur.com/SvJJyUF

I have 4 tileable textures on 1 uv space.
I want to repeat the grass texture and have it only affect my ground mesh.

I've tried changing the (repeat U and repeat V) # in maya but the other textures are affecting the ground mesh.

I have also tried scaling down the grass texture in photoshop and repeating it manually. but that decreases the quality of the texture greatly.

If this is not possible, is there a workaround to this?

Replies

  • Eric Chadwick
    There are a few techniques to solve this.

    1. Make the terrain mesh so that each quad represents the size of the grass quadrant of your texture. UV each quad to fit into that quadrant. This can be done in 3ds Max using Face Mapping in the UVW Mapping modifier, then scaling down the UVs and moving them to that quadrant. This works in all game engines. It greatly increases the vertex count of the model, but in return you get better memory and rendering performance because of the reduced texture fetches.

    2. Use one big contiguous UV layout (standard terrain-style UVs) and add some shader code to offset and scale the UVs. This is more expensive to render, but doesn't balloon the vertex count like option 1. This is rarely used because of the shader expense.

    3. Don't pack the four textures into one, keep them separate. This stresses the rendering because it increases the texture fetches, but it takes much less time for the artist to implement, and may be fine anyhow depending on how your game manages memory. Most games use this method.

    More techniques and ideas
    http://wiki.polycount.com/TextureAtlas
Sign In or Register to comment.