Archived

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

Blitz_Krieg

Tex co-ord generation between two splines

Recommended Posts

Blitz_Krieg    122
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