Splitting a poly and calc new Texture cords

Started by
1 comment, last by Lugerns 20 years, 6 months ago
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
/Luger
Advertisement
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
/Luger

This topic is closed to new replies.

Advertisement