#### Archived

This topic is now archived and is closed to further replies.

# Splitting a poly and calc new Texture cords

This topic is 5563 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi, all. I have a littel problem whit calculating new textercords for the new polygons(triangels), when i have split a polygon(triangel). Can someone help me whit the math to calculate the new textcords?! (I use OGL, dont know if you do this diffrent in DX) /Luger

##### Share on other sites
When you split your edge you probably do something similar to:

P = V0 + (V1 - V0) * t

Where P is the new point splitting the edge, V0 and V1 are the vertices of the edge and t is a scalar between 0 and 1 reflecting where to make the split along the edge.

This really shouldnt be any different in texture space except that you're dealing with 2D instead of 3D.

You could also choose to look at your vertices as 5D points (3 dimensions for x, y, z and 2 for u, v) and apply the above formula once in 5 dimensions doing it all at once.

[EDIT]: Fixed typos

[edited by - z80 on September 23, 2003 6:36:13 PM]

ok,
thx z80

1. 1
2. 2
Rutin
21
3. 3
4. 4
A4L
15
5. 5
khawk
14

• 13
• 26
• 10
• 11
• 9
• ### Forum Statistics

• Total Topics
633737
• Total Posts
3013613
×