Jump to content
  • Advertisement
isu diss

DX11 FBX UV coordinates Problem

Recommended Posts

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.

 

Untitled.jpg

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!