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.
William Harwin (2020). loadawobj (https://www.mathworks.com/matlabcentral/fileexchange/10223-loadawobj), MATLAB Central File Exchange. Retrieved .
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.
Really useful; thanks!
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]);
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')
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.
note LOADOBJ is a generic ML function! please, rename it
Can now handle limited colour information via the alias wave front .mtl file, polygons with up to 6 vertices and lines.
Modified to return either faces and vertices, or a structure with more of the object information.
Rewritten the processing of the faces data to be more robust. Also will return additional data in a structure if only a single output argument is given.
Documented Doug Hacketts bug, but need some test files that demonstrates the problem please.
Aparently loadobj is a matlab function (although not with our toolbox set) so renamed loadawobj