File Exchange

image thumbnail


version (696 KB) by William Harwin
Load an alias wavefront obj file into matlab.Updated Dec 2016


Updated 29 Dec 2016

View Version History

View License

Load an Wavefront/Alias obj style model. Will only consider polygons with 3, 4,5 or 6 vertices. Programme will, by default, ignore normal and texture data but these are available when loading into a single argument structure. It will also ignore any part of the obj specification that is not a polygon mesh, ie nurbs, these deficiencies can probably be remedied relatively easily.

Cite As

William Harwin (2021). loadawobj (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (13)

yaoyao hao

Phill Johanson

deru jian

myrah naeem

jiji hr

thanks a lot, great work


work perfect. Thanks a lot.


Very, very useful. Thanks!

I found it convenient to first go through the file just counting the number of elements to allocate the variables. It improves reading speed significantly for large models.

Angela Chapman

Really useful; thanks!

Doug Hackett

Very nice, thanks for doing this.
Found a couple of things:
- File was renamed loadawobj, but not function name inside file.
- Bug when using 'f 1//1 2//1 3//1' face format:
Replace lines 69 and 69
f1=f1([1 4 7]);
f1=f1([1 3 5]);

S. Q

thanx for this great work, could u plz tell me how can I use it, I renamed the function name, but I received this msg(Undefined command/function 'loadawobj')

giulio antonutto

A great piece of code.
Few additions are required if you wish to import textures (UV) but not so much. The rest is simply brilliant.

William Harwin

renamed loadawobj

urs (us) schwarz

note LOADOBJ is a generic ML function! please, rename it

MATLAB Release Compatibility
Created with R2015b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!