   .map file Texture Coordinate Calculation
  I want to write a Loader for Doom3 Map Files (Plaintext) And i have a little problem with this brushdef3 Texture Axis thing. I had a working Code for Coord generation for the old map file format (The one with 2 x 4 Coordinates as Texture Axis) Now the new format is somewaht more complicated (2 rows of a homogenous 3 x 3 Matrix). And i cant find real information on how to generate the real U/V Values per vertex. I think my normalization code which scales the Coords after the first generation does work again the same way but i need help with first part. i now use this code for the old format:   for(int i = 0; i < Polygon.GetVertexCount(); ++i){float U, V;U = TexAxis[0].Normal.Dot(Polygon.Vertices[i].Position);U = U / ((float)TexWidth) / Scale[0];U = U + (TexAxis[0].Distance / (float)TexWidth);V = TexAxis[1].Normal.Dot(Polygon.Vertices[i].Position);V = V / ((float)TexHeight) / Scale[1];V = V + (TexAxis[1].Distance / (float)TexHeight);Polygon.Vertices[i].U = U;Polygon.Vertices[i].V = V;}Please help me. I would be cool if someone could post some code for the new format. Thanks.   ---------------------------- By CommanderXXLCommander@bloomm.de---------------------------- 
  doom3 maps are made with radiant editors, so go to www.qeradiant.comsearch for the developerpage there and browse the CVS you will find a list with all source files of the editors and can easily find the part of the tex coord generation in a file called texture.cpp or similar, just do some research there 