I started to work with WebGL a few months ago. WebGL (in case you never heard about it) is a new emerging standard for rendering GPU accelerated graphics in the browser, without any plugins. Not all browsers support it yet, but the latest Chrome and Firefox do and others are about to follow (Safari, Opera, sadly not IE for the moment).

Whatever happens, WebGL seems to be here for good and it is definitely worth learning or at least looking at. It is a pretty low level API unlike Flash Away3d, not to mention Unity. In this respect, it’s much closer to Molehill. This can be discouraging at first, but after I got into it a bit, I found out it’s actually pretty fun to play with.
WebGL is a Javascript API. I always had mixed feelings about Javascript, remembering it from the days of Netscape and the so-called DHTML. But it was 10 years ago, and when I tried it again now I had to change my opinion. It may not be as strict and carefully designed as C# but it is simple, very flexible and easy to share. In the web environment, that last point (often brought by mrdoob) is perhaps the most important.
Based on OpenGL ES, WebGL is a collection of functions to communicate with the graphics card. To those of you who are used to OOP patterns and frameworks, WebGL will come as a shock. It’s mostly plain functions that set some properties, toggle some states or push some data to the GPU. It’s like a giant switchboard with one big global space for all operations. Sounds like fun, eh?
Resources and WebGL demos appear almost everyday, so be sure look around the web for interesting stuff. There aren’t that many comprehensive tutorials yet, but you can try the lessons at Learning WebGL – it’s the best introduction to the subject I’ve seen so far.
What better way to learn a 3D API than to build an engine? I was contemplating writing my own engine in Flash/AS3 a few times before, but never though I had quite enough knowledge to do this. This time I felt much more confident. Also, WebGL gives a pretty good start that Flash didn’t back in the days.
That’s how J3D was born. J3D is a very simple engine that can load 3D models and textures, has a scene with a hierarchy of objects and can render everything using basic lights. Somewhere on the way I added the feature to export models from Unity3d which I thought would make the job of preparing assets much easier.
Although J3D is pretty small and has limited functionality, it works and building it allowed me to learn and understand WebGL pretty well. This was my primary objective.
Last week I uploaded all the code to github and shared the link on Twitter. People seemed to like it and showed quite some interest. This made me very happy and gave me the idea to continue with the project and see where it leads me.
To sum up: demo, another demo, source code on github and more coming soon!

@felix Three.js is great and has lots of cool functionality. I’ve been playing with it at the beginning but later I wanted to look under the hood ;)

@tommekkie depends on what browser you are using. I didn’t add any warning in case your browser doesn’t support WebGL (but I will do it some day). For the time being make sure it’s Firefox 4 or latest Chrome. If it still fails, go here and send me whatever you see there: http://alteredqualia.com/tmp/webgl-maxparams-test/ along with your browser version and OS. Thanks.

Thanks for reply. Unfortunately I can’t see anything more than a black line of text on the top on both Firefox 4.0 and Google Chrome 10.0.648.205 on Windows XP Professional SP3 system, Nvidia GeForce 9500 GT graphic card.

proti commented on April 21st, 2011

The same situation as tommekkie Firefox4.0 + WebDeveloper plugin can see only the checkboxes, when testing WebGL only “WebGL MAX parameters test” text appears on white bg.

@proti @tommekkie Maybe you have WebGL disabled then. Have you tried other webgl demos? To check if WebGL is enabled in FF (should be on by default, but you never know) type “about:config” in the address bar, filter for “webgl” and check webgl.disabled is set to false. If this doesn’t work, well… you’ll need to search google for some more information. It’s all still very experimental :)

[…] for WebGL that has a Unity3d object/scene exporter. The author wrote a blog post about it entitled Taming WebGL with some background on the library:J3D is a very simple engine that can load 3D models and […]

Scientific Visualization Programming commented on February 23rd, 2012

I think that J3D is a great 3d engine, but it has not enough documentation about its API…

@Scientific Visualization Programming I agree with you but theres only so much things I can do it a day so no documentation. However, if you, or anyone else, is willing to look into that and contribute to the project it would be awesome!

Post a comment

everyday3d is a blog run by Bartek Drozdz about web development with a focus on realtime 3d graphics. It's been around since 2007. First, it focused on Flash (remember?) then moved over to Unity3d, WebGL and eventually - Virtual Reality and 360°.

I hope you enjoy the articles and demos posted here. Most of what I write about, I thaught myself from good books. Here's a few I would recommend if you want to deepen your knowledge of creative coding, math and realtime graphics.