|
Updated to 0.5, see original post.
|
|
|
|
Cool! Normals is good! I will research.
I calculation cross product for vertices of triangles, but sometimes i have inverted normals.
|
|
|
|
Ohhhh man,
Thats what i’m looking for since long time, can you give to source code here or pm it to me ? I really need it :S
Thanks also for the great work :D
Peace
|
|
|
|
I have found in what was my problem with normals. It`s not normals. It is - “GetPolygonSize” :-)
|
|
|
|
Doug, how do you get texcoods? I really don`t understand this.
|
|
|
_Flame_ 01 March 2009 12:55 PM
Doug, how do you get texcoods? I really don`t understand this.
I’m still working on it too. Most of what I have is gotten from ViewScene and ImportScene.
See this thread: http://area.autodesk.com/forum/Autodesk-FBX/fbx-sdk/getuv-and-getlayerelementoftype-mismatch/
There is only one texture coordinate set per layer. Each texture element that uses that coordinate set is in that layer.
for (int i = 0; i < pMesh->GetLayerCount(); i++)
{
KFbxLayer * pLayer = pMesh->GetLayer(i);
if (pLayer == NULL)
continue;
for each element type you support (ELayerElementType pTypeIdentifier)
{
KFbxLayerElementTexture * pTextureElement = (KFbxLayerElementTexture *)pLayer->GetLayerElementOfType(pTypeIdentifier);
if (pTextureElement == NULL)
continue; // no element of that type
KFbxLayerElementUV* pLayerUV = pLayer->GetUVs();
if (pLayerUV == 0)
continue; // no texture coordinates
KFbxLayerElement::EMappingMode mappingMode = pTextureElement->GetMappingMode();
KFbxLayerElement::EReferenceMode referenceMode = pTextureElement->GetReferenceMode();
// get coordinates
KFbxLayerElementArrayTemplate<KFbxVector2> &lUVArray = pLayerUV->GetDirectArray();
// now get the coordinates depending on reference mode and mapping mode
}
}
|
|
|
|
Doug, do you use TriangulateInPlace? Scene5 have strange problem, probably with z-buffer.
|
|
|
|
Yes, I do. Where is Scene5?
|
|
|
Where is Scene5?
Post #24
|
|
|
|
The problem is in the scene. Scene5 has lamina faces (or very nearly so) in original mesh which causes the z fighting. You need to remove them from the original.
|
|
|