x


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

more ▼

asked May 11 '11 at 03:11 PM

Borgo 1 gravatar image

Borgo 1
28 3 3 9

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

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)
];
more ▼

answered May 25 '11 at 10:05 AM

Paulius Liekis gravatar image

Paulius Liekis
7.3k 16 24 45

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1362
x300
x237
x137

asked: May 11 '11 at 03:11 PM

Seen: 1055 times

Last Updated: May 25 '11 at 10:05 AM