4
\$\begingroup\$

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?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

they are stored in normalized GL_UNSIGNED_BYTE​s, 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

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .