chinese file name don't support
tonyDx opened this issue · 4 comments
my mtl file's name is chinese so the obj2gltf can't find this file
@lilleyse the model you provided is working, but my model not working, the output as following:
/objs/大地形obj文件 # /root/.npm-global/bin/obj2gltf -i 大地形-20200708.obj ENOENT: no such file or directory, open '/objs/大地形obj文件/�ӹ�����-20200708.mtl' Could not read material file at /objs/大地形obj文件/�ӹ�����-20200708.mtl. Attempting to read the material file from within the obj directory instead. ENOENT: no such file or directory, open '/objs/大地形obj文件/�ӹ�����-20200708.mtl' Could not read material file at /objs/大地形obj文件/�ӹ�����-20200708.mtl. Using default material instead.
the file '大地形-20200708.mtl' is present in the same directory.
@chenzaichun are you able to share your model? I can help investigate.
The model I used is more that 1G. I think it's encoding issue, for mtl issue, I could use iconv to convert gbk to utf-8, then I convert the mtl to utf-8, the file missing issue could be solved.
iconv -f gbk -t utf-8 xxx.obj -o xxxx-utf8.obj
iconv -f gbk -t utf-8 xxx.mtl -o xxxx-utf8.mtl
# backup the orginal mtl and use the xxx-utf-8.mtl instead
mv xxxx-utf8.mtl xxxx.mtl
I'll find some smaller model if you need.