Blender to WebGL JavaScript Exporter

I’ve been playing with this technology lately and I have to say: WebGL is hot stuff. Through the HTML5 <canvas> element you can add hardware-accelerated 3D graphics to web pages. There’s no need to install a separate plug-in. It isn’t available in current browser versions however. You’ll need to install nightly builds of Firefox, Chrome or Safari in order to view WebGL.

Its worth playing around with WebGL even though it’ll take a fair bit of time until it becomes mainstream technology. WebGL a binding for JavaScript to native OpenGL ES 2.0
which means that if you learn the API you can use it for iPhone (Objective-C) and Android (Java) development as well.

You can also write shaders using GLSL (OpenGL Shading Language). To see what you can do with shaders take a look at this page.

If you don’t want to get your hands dirty with the low-level stuff then there are a couple of excellent libraries that do a lot of work for you. A very powerful one is GLGE. There’s also a fairly new one called SceneJS.

During my presentation at LFPUG last week I briefly touched WebGL to show how easy it is to write exporter scripts for Blender. I’m still working on the script but here are some preliminary results:

The script exports to SceneJS for now but I will add the option to export to pure WebGL and GLGE. I will make it available soon :-)

  • Delicious
  • Facebook
  • Digg
  • Reddit
  • StumbleUpon
  • Twitter

10 thoughts on “Blender to WebGL JavaScript Exporter

  1. LOL @ “There’s no need to install a separate plug-in… You’ll need to install nightly builds of Firefox, Chrome or Safari” :))

  2. Jose Perez says:

    I really get the following error when you run the scenejs-example:

    ERROR: 0:1:”: Not Specified for precision (float)
    ERROR: 0:1:”: Not Specified for precision (float)
    ERROR: 0:1:”: Not Specified for precision (float)

  3. Jose Perez says:

    someone can help me with this? I’m just beginning to study because I need WebGL for my thesis and I would be helpful to explain to me like riding a blender model on the web with WebGL.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>