Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I made a procedural mesh and now I want to apply a texture to it. The problem is, I cannot get it to stick the way I want it to.

The idea is to have the texture painted only once over the whole mesh, so that there is no repeating. How should I map the UV to make that happen?

My mesh is a simple plane consisting of 56 triangles. I'd add pictures to clear things up but I cannot since my reputation is below 10 points.

Any help is appreciated.

EDIT(Kind people gave me up votes, thank you):

Meet my mesh:

enter image description here

And when textured(tried to repeat the texture):

enter image description here

And my texture:

enter image description here


bummzack's instructions worked like a charm and the mesh got textured just as I wanted it to. Thank you.

enter image description here

share|improve this question
Now you can ;-) – Valmond Mar 23 '12 at 8:46
Nice! The one with the repeated texture looks quite mesmerizing too :) – bummzack Mar 23 '12 at 14:00
I love the one with the repeated texture. Looks awesome. Would you care telling what you did to achieve that effect? – kaoD Mar 23 '12 at 16:53
I concur. How did you do that? – jmegaffin Mar 23 '12 at 18:05
But of course I'll share :). I made the UVs go this series all the way through: (0,1);(1,1);(0,0); The vertices are ordered one vertical line(Zs) down step right(x+1) and another vertical line down... – Esa Mar 23 '12 at 18:28
up vote 12 down vote accepted

To map your texture once on the mesh, your UV coordinates should go from 0..1 over the whole mesh. But depending on the mesh at hand, this can get really tricky.

Since it's a plane, this should be simpler. Just look at the plane from it's "up" direction and assign 0,0 to the top left and 1,1 to bottom right. The vertices in between should be fractions. Eg. a vertex in the middle would have 0.5, 0.5 as UV coordinate.

Here's an example:

   0,0         0.33,0      0.66,0      1,0
 |           |           |           |
 | 0,0.25    | 0.33,0.25 | 0.66,0.25 | 1,0.25
 |           |           |           |
 |           |           |           |
 |           |           |           |
 |           |           |           |
 |           |           |           |
 | 0,1       | 0.33,1    | 0.66,1    | 1,1
share|improve this answer
Ah! Of course! I'll be giving this one a go, thank you. – Esa Mar 23 '12 at 10:37

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.