- Home /
How to split UV in Mesh
Hi, I wat to know how to create a UV where 2 triangles must be separated.
For exemaple, if I have:
vertices = [ Vector3(0,0,0), Vector3(0,0,1), Vector3(1,0,0), Vector3(1,0,1)];
triangles = [ 0,1,2, 1,3,2 ];
uv = [ Vector2(0,0), Vector2(0,1), Vector2(1,0), Vector2(1,1) ];
Ok, now I have a plane with 2 triangles and a plane style UV. Here, the triangles vertex are joined in the UV, but I want to separate the triangle 1 UV and the triangle 2 UV, like a UV Seam.
How can I do this?
Thanks, Borgo
Answer by Paulius-Liekis · May 25, 2011 at 10:05 AM
Just insert two vertices (in vertices, indicees and uvs):
vertices = [
// first triangle
Vector3(0,0,0),
Vector3(0,0,1),
Vector3(1,0,0),
// second triangle
Vector3(0,0,1),
Vector3(1,0,0),
Vector3(1,0,1)];
triangles = [
// first triangle
0,1,2,
// second triangle
3,5,4
];
uv = [
// first triangle
Vector2(0,0),
Vector2(0,1),
Vector2(1,0),
// second triangle
Vector2(0,1),
Vector2(1,0),
Vector2(1,1)
];
Your answer
Follow this Question
Related Questions
Do i need recalculate uv coordinate after modifying mesh vertices 0 Answers
Vertex count on a procedurally generated map and some related doubts 2 Answers
uv sub meshes in cube c# 0 Answers
Procedural mesh creation issue 1 Answer
How do I calculate the UV's for a procedurally generated shape? 2 Answers