Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17825

FBX UV coordinates Problem

$
0
0
I don't know whether this is correct or wrong. This is how I load the UVs. UV = new XMFLOAT2[NumVertices]; for (int i = 0; i < Mesh->GetPolygonCount(); i++)//polygon(=mostly rectangle) count { FbxLayerElementArrayTemplate<FbxVector2>* uvVertices = NULL; Mesh->GetTextureUV(&uvVertices); for (int j = 0; j < Mesh->GetPolygonSize(i); j++)//retrieves number of vertices in a polygon { FbxVector2 uv = uvVertices->GetAt(Mesh->GetTextureUVIndex(i, j)); UV[3*i+j] = XMFLOAT2((float)uv.mData[0], (float)uv.mData[1]); } } How do I correct this? Below image was captured when I was trying to load a texture onto a plane.

Viewing all articles
Browse latest Browse all 17825

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>