OIDA
06-06-2007, 08:57 PM
I have the following dilema:
I want to find out the orientation of a texture on a given face, and get rotation values for the texture in world space. To clarify this, just imagine applying a planar uv mapping to a face and getting the gizmo's rotation values. That is the result I am after but I want to derive it from a mapped face on a collapsed mesh. Getting the rotation/orientation of the mesh face itself is straightforward, but I am having difficulties getting the relative rotation transform for the texture. basically what I want to do in the end is to align an object to the mesh face normal (that part is straightforward) and align it with the U or V direction of the texture. For example, if the texture had an arrow in it that points along the U direction of the texture I want to be able to align an arrow object on the face surface to the direction of the arrow in the texture.
Any suggestions, ideas?
Let me know if I am not making sense and I'll try to post a clearer description of my question...
Thanks!
I want to find out the orientation of a texture on a given face, and get rotation values for the texture in world space. To clarify this, just imagine applying a planar uv mapping to a face and getting the gizmo's rotation values. That is the result I am after but I want to derive it from a mapped face on a collapsed mesh. Getting the rotation/orientation of the mesh face itself is straightforward, but I am having difficulties getting the relative rotation transform for the texture. basically what I want to do in the end is to align an object to the mesh face normal (that part is straightforward) and align it with the U or V direction of the texture. For example, if the texture had an arrow in it that points along the U direction of the texture I want to be able to align an arrow object on the face surface to the direction of the arrow in the texture.
Any suggestions, ideas?
Let me know if I am not making sense and I'll try to post a clearer description of my question...
Thanks!
