importing obj model into matlab

32 ビュー (過去 30 日間)
abraham okoko
abraham okoko 2020 年 1 月 30 日
コメント済み: Nathan Royer 2025 年 4 月 15 日
hello all,
this is quite important. ive been trying to use either the readobj or read_wobj and it hasnt workded for me.
files that were supposed to work came from this links.
it keps giving me this error:
>> obj =read_wobj('carbon_nanotube.obj');
Reading Object file : carbon_nanotube.obj
% WaveFront *.obj file (generated by Autodesk ATF)
Reading Material file : carbon nanotube 1mm draft.mtl
Error using fread
Invalid file identifier. Use fopen to generate a
valid file identifier.
Error in read_wobj>file2cellarray (line 298)
file_text=fread(fid, inf, 'uint8=>char')';
Error in read_wobj>readmtl (line 363)
file_words=file2cellarray(filename_mtl);
Error in read_wobj (line 78)
material=readmtl(filename_mtl,verbose);
298 file_text=fread(fid, inf, 'uint8=>char')';
please i need urgent help. i want to rerad in my .obj file
i have the .obj file saved and i just want to be able to access it in matlab please. any help is appreciated
  3 件のコメント
abraham okoko
abraham okoko 2021 年 3 月 10 日
hello,
so I was able to finally figure it out and used loadawobj instead.
worked perfectly fine for me and generated the carbon nanotube model i was trying to import
Nathan Royer
Nathan Royer 2025 年 4 月 15 日
it seems that it is expecting a mtl file in the same location as the obj file. So in your case you should have carbon_nanotube.mtl in the same file location as carbon_nanotube.obj

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by