tri tri intersect with uv coordinates
Posted 22 June 2010 - 02:25 PM
Im getting geometric boolean objects working at the moment right, but then I suddenly decided I needed to preserve 2 objects with full uv intersecting with each other. :)
Ive nearly got it all done, right, but im stuck sorta at the beginning with this part I left till last, I need a tri tri intersect that describes not only the 2 intersection points, but uv coordinates for the 2 intersection points also.
At the moment, my system is using a battery of ray tri intersects to intersect the edges of triangle a with triangle b and vice versa and its working, but now I need uv coordinates for the two intersection points.
Is there some simple method for doing this, is all im asking, any help would be nice. When I figure it out I'll close the thread with a result.
Posted 22 June 2010 - 02:30 PM
Posted 22 June 2010 - 04:11 PM
Currently working on: the 3D engine for Tomb Raider.
Posted 22 June 2010 - 05:15 PM
So off I go on the net "barycentric coordinates"... thanks .oisyn, if only I had you as a next door neighbour then you could come over and finish my project for me. hehe.
Posted 23 June 2010 - 10:11 AM
But ive got a solution, I rotate the triangle so its parallel to the camera then I spin it so edge 0 is totally vertical, then I do a line intersection using the edge 1 ray direction and measure the distances along the lines where it intersects.
I then have a weight for both edges then I use the uv's of edge 0 and edge 1 to produce the uv coordinate.
I bet thats something to do with baricentrics anyway, even though I couldnt say it came from what I read at all, it just totally blew me out of the water.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users