I have 2 triangles ABCam using an old Runescape model format, also used by Thief and PMN
I want to generalize the triangle PMN from points to linesQuake. In this format, where any choice along that line will produce the sameinstead of specifying UV mappingcoordinates for the triangleeach vertex ABC
Basically i want to find all triangles that project to, we specify a given setsecond trio of vertices PMN. Those vertices are then used to project UV texture coordinates onto ABC.
And as the projection throws away one dimension that should be infinitely many, but they should have some orderingSome previous Q&A explains this projection algorithm and how to reverse it.
So i should be able to start with one and then walk alongI have a linemesh with UVs that I want to save in this format. To do that, I want to find alla trio of vertices PMN for each triangle ABC that reproduce the correct UVs.
i am not sure on how iThese PMN vertices are chosen from the collection of vertices already in my mesh.
I could do thatsearch every possible ordered triangle in my mesh, any advicebut that scales as \$O(n^3)\$ and would be appreciatedimpractical for meshes with high vertex counts.
FormulaHow can I more efficiently find a PMN triangle that createsproduces my desired UV mapping fromcoordinates on each triangle PMN & reverse: reversing plane projection texture mapping algorithmABC?