Jump to content
  • Advertisement


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.

If you intended to correct an error in the post then please contact us.

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 this post

Link to post
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]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!