Extending Processing.js With a .OBJ Importer Part 2 February 28, 2011
Posted by Andor Salga in Open Source, Processing.js, webgl.trackback
Yesterday I wrote a blog about creating a .OBJ Importer for Processing.js. My demo compared begin/endShape performance against my importer and things looked pretty good. I could get 100 textured boxes running about 4-5 times faster using the importer.
Last night I decided to see how well Processing.js would perform with a much more complex mesh. I used Blender to export the COLLADA duck model into .OBJ, fed that into Processing.js and saw it ran much faster than I imagined.
Here’s a new demo which renders 25 ducks (over 12,000 vertices each) at 50 FPS on my system. These results are pretty exciting and I can’t wait to get back to hacking on this. Hopefully I can make it in for Processing.js 1.2.
Advertisement

[...] Salga is looking into adding OBJ file importing to Processing.js, and, to judge from the number of ducks on his demo [...]
This is really cool. But is it possible to get the *.obj together with the *.mtl file for the material in that script? Some days ago, i found this script/programm.
http://hideou.se/modelviewer.html?obj=/models/medieval_flamer.obj&tex=/models/medieval_flamer.jpg&spec=/models/medieval_flamer_spec.jpg
But it can’t handle with big files.
I don’t see why not, I just wrote a quick hack. I could make the reader spawn a new XHR every time a .mtl is referenced in the .obj.
[...] blog post is the continuation of a series of blogs [1, 2, 3] related to adding .obj file support to Processing.js. This code I’m working on is [...]