microsoft / DirectXMesh

DirectXMesh geometry processing library
https://walbourn.github.io/directxmesh/
MIT License
787 stars 151 forks source link

reading somefile.obj FAILED (80070002) #12

Closed Postal86 closed 8 years ago

Postal86 commented 8 years ago

Problem converting from obj files into sdkmesh i have tried with three object.

walbourn commented 8 years ago

What command-line exactly are you using?

The HRESULT (80070002) is ERROR_FILE_NOT_FOUND which means you probably don't have the right current working directory or you are not using the correct path to find the obj file.

See the wiki as well.

Postal86 commented 8 years ago

meshconvert filename.obj -sdkmesh

untitled1 untitled2

walbourn commented 8 years ago

The problem is that houseinterior.obj is not in the current directory, i.e. D:\VisualStudioProjects\DirectXMesh-master\Meshconvert\Bin\Desktop_2015\Win32\Debug. You should change to the directory where the .obj file is located, and then use an explicit path to the meshconvert.exe.

Postal86 commented 8 years ago

What u mean current directory ?! meshconvert.exe app and object file are located in the same directory Chuck. Look at the screen shot. untitled

walbourn commented 8 years ago

Can you attach your houseinterior.obj? I suspect the problem is that your mtl file that matches it is missing.

Postal86 commented 8 years ago

Cannot attach zip file throwing an error i'll send you by e-mail.

walbourn commented 8 years ago
# 3ds Max Wavefront OBJ Exporter v0.97b - (c)2007 guruware
# File Created: 21.08.2015 18:38:02

mtllib house interior.mtl

First, the filename is a little questionable here having a space in the middle. Second, as I noted before you don't have this mtl file in your current working directory.

Postal86 commented 8 years ago

I found that file on the Web as a free resource 3D Objects(and i did not know if mtl file was needed ) , just wanted geometry for my demo. Oh couldn't imagine material file was missing and that's why converter was throwing an error. file name i know , when i was converting i have skipped that space, but i think mtl file is missing for the object and that's why during reading error was throwing. Thnks Chuck.