Question

I have a question that is bothering me for weeks! Is there any way of applying textures to 3D convex polygons, independently of their orientation in the 3D world. I am working with XNA 4.0 if it's relevant

I'm not expecting an easy way out, just a clean solution to solve my current problem. Does anyone made something similar to that?!

Thanks in advance, for your concern and time!

Était-ce utile?

La solution

Automated generation texture coordinates for shapes is not easy... I have an idea that is not the best, but maybe it help you

if the shape lays in a plane you can create a square that contains the shape, is easy to get the texture coordinates in [0..1] range interpolating vertex positions inside the square in the plane.

enter image description here

Autres conseils

Something similar is also here https://stackoverflow.com/a/19004944/2521214

  • worth looking also the whole thread (question and all comments including)
  • not just my answer
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top