jump to navigation

Extending Processing.js With a .OBJ Importer Part 2 February 28, 2011

Posted by Andor Salga in Open Source, Processing.js, webgl.
trackback


Run me!

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

Comments»

1. WebGL around the net, 3 March 2011 | Learning WebGL - March 3, 2011

[...] Salga is looking into adding OBJ file importing to Processing.js, and, to judge from the number of ducks on his demo [...]

2. xam - March 9, 2011

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.

3. Andor Salga - March 9, 2011

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.

4. Extending Processing.js with a OBJ Importer Part 4 « Andor Salga - January 5, 2012

[...] 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 [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.