Jump to content
  • Advertisement

Archived

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

Lugerns

Splitting a poly and calc new Texture cords

This topic is 5481 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
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]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!