Jump to content
  • Advertisement

Archived

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

Blitz_Krieg

Tex co-ord generation between two splines

This topic is 5585 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

Hey, I have a thing where i create a triangle strip from two splines. Vertices are located on the splines at equal distances along the splines. I''m trying to figure out how to generate the texture co-ordinates for these verts, so that the texture looks "normal". That is i want the texture to be aligned to the average of the two splines. The two ways i''ve thought about doing this are... 1) Generate all my verts aligned to the average of the two splines, and therfore simply assign the same texture co-ords at each pair of verts. This requires doing some funky stuff at the ends of the splines. But otherwise is reasonable simple (although reasonably expensive..?) to compute. 2) Generate my verts as i''m doing (a certain distance along the splines) and figure out some forumla to adjust the texture co-ords so the texture aligns with the spline average. The forumla might be something like finding the positions on the spline where the orthogonal to the average spline would intersect, and then modify my tex-coords by the distance between my verts and those intersections. But i figure there might be a simpler (or at least less expensive) way to come up with the co-ords. I hope i''ve made sense, any help greatly appreciated! Thanks, CYer, Blitz

Share this post


Link to post
Share on other sites
Advertisement

  • 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!