18
\$\begingroup\$

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

EDIT 2:

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

enter image description here

\$\endgroup\$
5
  • 2
    \$\begingroup\$ Now you can ;-) \$\endgroup\$
    – Valmond
    Mar 23, 2012 at 8:46
  • 1
    \$\begingroup\$ Nice! The one with the repeated texture looks quite mesmerizing too :) \$\endgroup\$
    – bummzack
    Mar 23, 2012 at 14:00
  • \$\begingroup\$ I love the one with the repeated texture. Looks awesome. Would you care telling what you did to achieve that effect? \$\endgroup\$
    – kaoD
    Mar 23, 2012 at 16:53
  • \$\begingroup\$ I concur. How did you do that? \$\endgroup\$
    – jmegaffin
    Mar 23, 2012 at 18:05
  • 1
    \$\begingroup\$ 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... \$\endgroup\$
    – Esa
    Mar 23, 2012 at 18:28

1 Answer 1

12
\$\begingroup\$

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
 +-----------+-----------+-----------+
\$\endgroup\$
1
  • \$\begingroup\$ Ah! Of course! I'll be giving this one a go, thank you. \$\endgroup\$
    – Esa
    Mar 23, 2012 at 10:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .