I was trying to understand obj file loading for 3d models. I am referring to DirectX 9.0 sample "MeshFromOBJ" to understand how it has been done. I tried creating a simple cube in Maya2012 & exported to obj file format. I tried replacing default "cup" model from the sample to my newly exported model. Please refer to the screenshot for the output I am getting.
Please also refer to the obj file content which I got after exporting.
[source lang="plain"]# This file uses centimeters as units for non-parametric coordinates.mtllib cube2.mtlg defaultv -0.762213 -0.812331 0.873061v 0.762213 -0.812331 0.873061v -0.762213 0.812331 0.873061v 0.762213 0.812331 0.873061v -0.762213 0.812331 -0.873061v 0.762213 0.812331 -0.873061v -0.762213 -0.812331 -0.873061v 0.762213 -0.812331 -0.873061vt 0.375000 0.000000vt 0.625000 0.000000vt 0.375000 0.250000vt 0.625000 0.250000vt 0.375000 0.500000vt 0.625000 0.500000vt 0.375000 0.750000vt 0.625000 0.750000vt 0.375000 1.000000vt 0.625000 1.000000vt 0.875000 0.000000vt 0.875000 0.250000vt 0.125000 0.000000vt 0.125000 0.250000vn 0.000000 0.000000 1.000000vn 0.000000 0.000000 1.000000vn 0.000000 0.000000 1.000000vn 0.000000 0.000000 1.000000vn 0.000000 1.000000 0.000000vn 0.000000 1.000000 0.000000vn 0.000000 1.000000 0.000000vn 0.000000 1.000000 0.000000vn 0.000000 0.000000 -1.000000vn 0.000000 0.000000 -1.000000vn 0.000000 0.000000 -1.000000vn 0.000000 0.000000 -1.000000vn 0.000000 -1.000000 0.000000vn 0.000000 -1.000000 0.000000vn 0.000000 -1.000000 0.000000vn 0.000000 -1.000000 0.000000vn 1.000000 0.000000 0.000000vn 1.000000 0.000000 0.000000vn 1.000000 0.000000 0.000000vn 1.000000 0.000000 0.000000vn -1.000000 0.000000 0.000000vn -1.000000 0.000000 0.000000vn -1.000000 0.000000 0.000000vn -1.000000 0.000000 0.000000g pCube1usemtl initialShadingGroupf 1/1/1 2/2/2 4/4/3 3/3/4f 3/3/5 4/4/6 6/6/7 5/5/8f 5/5/9 6/6/10 8/8/11 7/7/12f 7/7/13 8/8/14 2/10/15 1/9/16f 2/2/17 8/11/18 6/12/19 4/4/20f 7/13/21 1/1/22 3/3/23 5/14/24[/source]
Is there anything that I am missing or doing wrong while exporting. I used all default settings in the exporter.
Edited by TheOrestes, 07 October 2012 - 08:11 AM.







