Jump to content
  • Advertisement
Sign in to follow this  

How to find uv coordinates for a 3D triangle?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am using the uv coordinate as a seed for a 2D simplex noise to create surface effects. If the triangle has the normal pointing at z, then xy can be used as uv coordinates.


However, the triangles have more or less random orientations. I suppose I need a rotation so as to have the normal aligned with e.g. z, then I can again use xy as uv. I have difficulties to find out how to do this rotation.


It may be that the problem can have more than one solution, but I only need one. Is there an efficient algorithm for this?


Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!