Monday 4 April 2011

PHP ObjLoader - Demo

I wrote yesterday about the PHP Obj Loader I had written, and today I prepared a simple demo!

Model by Elliot Spence for NCCA group project - Terminus
The WebGL code has been adapted from http://learningwebgl.com/blog/

The model has been imported using the Obj Loader, converted to JSON and rendered in WebGL. To see a live demo of this in action go to my site to check it out. (You will need a WebGL enabled browser for this, I've been using Google Chrome but Webkit Nightly or Mozilla Beta should do)

Note: this link is now for demo 2

The demo is a proof of concept for the backend of a WebGL project I am working on at the NCCA. It shows the importing of complex, triangulated model, into Javascript for use with HTML5.

My plan is too extend the module to accomodate .obj files that contain exclusively Quads. These two functions will be sufficient for many of the tasks I want to complete. I will also incorporate FTP functions later on.

The code is open source and hosted on Google Code. That repository also contains examples on how to use the loader. (bear in mind, it will only work locally with full file paths for the moment)

On another topic: the video for Coin Sweeper, the game I made for my last assignment is now available for viewing, along with the report which can be found on my website.

If there are any questions or comments, please let me know :-)

2 comments:

  1. Hi ,
    Is theire still a way to take alook at the sourcecode?
    Is the conversion to .js /json online or offline.

    thanks for your time

    ReplyDelete
    Replies
    1. http://code.google.com/p/pjsmith-open-source/source/browse/ObjLoader.php

      The code is there (not sure why the url died)

      It's not very fancy and translates to json offline.

      Hope that helps

      Pete

      Delete