Creating texture coordinates
I have a small problem. I have a bunch of stuff that I should get the texture coordinates for a point from... but I have no idea how. (I am trying to calculate the texture coordinates for a Quake map face's vertex)
This is what I know: the plane of the point, the x and y offset of the texture, the angle of rotation for the texture, the x and y scaling of the texture and of course the coordiantes of the point itself.
I saw some example code using some texture matrix, but I have no idea how to turn that into a 2-element vector - the point has 3 elements, so I can't directly apply the matrix...
How should I do this?
Also, if you have any information or links about Quake(2) map loading (especially .map, not .bsp), I'd appreciate it.
I haven't worked with Q1/2 .bsp format, so I can't answer your question, but...I recall seeing some tutorials on the subject on flipcode.com (maybe you've already seen these). Specifically, I remember a discussion of calculating the texture coordinates. I don't know if it's still there or not - the site has been reorganized fairly recently. But you might check into it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement