read obj files

版本 1.0.3 (3.2 KB) 作者: Quirin Schmid
This function reads Obj files in, and stores the information in a Matlab struct
92.0 次下载
更新时间 2023/9/4

查看许可证

This function is adapted from Bernard Abayowas 'readObj' function but is significantly faster, but writes a txt-file derived from obj-file to disk (https://www.mathworks.com/matlabcentral/fileexchange/18957-readobj). It reads vertices, faces, texture and normal information from a specified Obj file, and stores the information in a Matlab structure. This file is designed for faces with 3 vertices (Triangulated mesh). The model should be continuous. Seperated parts should be loaded respectively.
Result can be displayed with accompanying displayObj
Example of usage:
path = 'C:\Users\User\Documents\MATLAB\';
filename = 'object.obj';
[obj,tex] = readObj(filename, path);
displayObj(obj,tex);

引用格式

Quirin Schmid (2024). read obj files (https://www.mathworks.com/matlabcentral/fileexchange/134606-read-obj-files), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2020b
兼容任何版本
平台兼容性
Windows macOS Linux
致谢

参考作品: readObj

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.3

changed indexing of table

1.0.2

changed face indexing

1.0.1

solved path problems

1.0.0