For a detailed report of conversion support for this version, see the. Later on, you can than add other implementations like OBJMesh or anything similar.The following sections are about how the Maya FBX Plug-in converts Maya objects and their properties. It is always a good idea to create an abstraction for the input data you are using.įor example, you could create a class AbstractMesh and an implementation XMesh deriving from it. I guess you can look up the advantages of the.obj files. If you want to try out graphical programming it is not bad, but if you are aiming for higher concepts you can later switch. I don't know if it is of any use in DirectX 9.Īs far as I know, the standard.x just supports basic meshes with no enhancements such as animation. I can remember, that in the DX 10 SDK is a sample of how to load an.obj file, I think the sample is called MeshFromOBJ10. You will need an external mesh loader for that purpose. I'm not sure of this.) Code for loading.X files into DX9/C++: D3DXLoadMeshFromX( 'Tiger.x', D3DXMESH_SYSTEMMEM, g_pd3dDevice, NULL, &pD3DXMtrlBuffer, NULL, &g_dwNumMaterials, &g_pMesh ) Is there a function like 'D3DXLoadMeshFromOBJ(.)' to load an Object? How do I load and render.OBJ files? 8( Another question of mine is what is the difference between an.X file and an.OBJ file and which of them should I use?ĪFAIK, DirectX does not support wavefront object files out of the box. As far as I see in DirectX SDK examples this code is for loading.X model (which needs a plugin for '3Ds Max' to export that kind of extension. Now I have a Model that I created in '3Ds Max'(It's a little backyard with high stonewalls, so I'm trying to use it as my world object.) and I want to load this model into my DirectX9/C++ project. Hope this helps.Ĭurrently I have a 3D Cube that I drew by writing coordinates, that can rotate and move on a black screen. NOTE: If your.fbx file consist of more than one mesh then you would need to iterate thru the scene untill you find the desired mesh. Was to convert all my DirectX files into this new PMD format because.įbxMesh* mesh FbxNode* node = myScene->GetRootNode()->GetChild(0) //I want my mesh to be formed by triangles so i convert the mesh into triangles FbxGeometr圜onverter lConverter(node->GetFbxManager()) lConverter.TriangulateInPlace(node) mesh = node->GetMesh() now you should be able to get a correct vertex count from your mesh, and be able to extract the vertices. Blender 2.5 platform and as you can see from the table. When i have loaded an.fbx file i create a mesh pointer and then go into my scene and grab the mesh. Well you create a mesh, but you don't point it to a mesh in your scene.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |