Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® FBX® / FBX SDK / about node,material
  RSS 2.0 ATOM  

about node,material
Rate this thread
 
62299
 
Permlink of this thread  
avatar
  • zydgyy
  • Posted: 27 November 2011 05:22 AM
  • Total Posts: 84
  • Joined: 09 November 2011 05:37 PM

Hi,guys,if i got a pointer pMesh of a mesh,and then i call KFbxNode *pNode = pMesh->GetNode();
ant then i call KFbxSurfaceMaterial *pMat = pNode->GetMaterial (0);
However as i have known,a mesh could belong to more than one node,and each node could have it’s own materials attached it,and then my calls could work?!So,how can i get material of a mesh just in case that i just have a mesh handle?



Replies: 0
avatar

True, a node can have many node attributes connected to them. Because of this, we connect materials directly on the mesh, rather than on the node.



Robert Goulet, FBX Dev Lead

Replies: 1
/img/forum/dark/default_avatar.png

Is that true??we attach the material to mesh,not node?you sure about that,since i read about the Doc,

Author: zydgyy

Replied: 30 November 2011 01:44 PM  
avatar

Oops, you’re right, my mistake. That’s true, materials are connected to the node. You cannot retrieve the material unless you ask for the node of the mesh. And if you are using instancing (multiple node per mesh), you will have to iterate to the one you want to get.



Robert Goulet, FBX Dev Lead

Replies: 0