I imported vertex positions, indices and normals successfully in OpenGL using fbx sdk, but I just can't figure out how to import vertex colors. I tried to fetch the pointer to array of colors trough mesh layer but it returns null. Can anyone help me with this one please?
1 Answer
they are stored in normalized GL_UNSIGNED_BYTEs, a single color is 4 bytes, and are held under the KFbxLayer class and KFbxLayerElement class is the base class for Layer Elements and describes how all is arranged in memory. example layers
KFbxLayerElementVertexColor KFbxLayerElementNormal KFbxLayerElementUV KFbxLayerElementTexture KFbxLayerElementMaterial KFbxLayerElementPolygonGroup
Create an instance of KFbxMesh object and a new KFbxNode object containing that mesh. Then access KFbxNodeAttribute or the KFbxLayerContainer also holds layers, maybe your vertex colors are in there
refer to the sdk documentation Autodesk