# UV mapping - parallelogram tiling on a plane

This topic is 3368 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello, I've been searching a way to calculate the uv coordinates on a plane. It was a succes as I used the following formula to get an image onto my plane. (There are no tiles of my image, just 1 image strechted in my plane) This is how I calculated the UV coordinates: $p(x, y, z)$ is my intersection point from a ray from the camera that hits the plane. $u(x, y, z) = \frac{x}{\sqrt{x^{2} + y^{2} + z^{2}}}$ (here we fill the intersection point into the equation to get our u) $v(x, y, z) = \frac{y}{\sqrt{x^{2} + y^{2} + z^{2}}}$ (here we fill in the intersection point into the equation to get our v) The plane is defined by it's normal vector and an offset. Now I want to put textures onto my plane, however I want to be able to not only make rectangle tiles, but I also want to make parallelogram tiles. This will be done by defining two directional vectors I call one xVec and the other yVec. How can I change my u function and v function to be able to map parallelogram tiles? The size of the tile is specified by the length of those vectors. Thanks for your help!

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 13
• 11
• 15
• 11
• 12
• ### Forum Statistics

• Total Topics
634151
• Total Posts
3015839
×