SceneJS, Three.js and PhiloGL – WebGL performance test

UPDATED POST HERE: http://granular.cs.umu.se/browserphysics/?p=7

SceneJS, Three.js and PhiloGL are three great scenegraphs for WebGL. But how well do they perform?

I did a small test to get some ideas on how well these softwares scale. What I did was a small application rendering N cubes, moving in a circle.

We can see that the FPS drops down below 60 around 600 cubes for Three.js and SceneJS. The corresponding number for WebGL without a scenegraph is 1000, and for the non-browser OpenSceneGraph (C++) it’s 3000.

Conclusions: We get a performance drop (~66 percentage units) when moving from OpenGL to WebGL. When using a scenegraph, we drop even more (80). I guess the web is not ready for heavy 3D graphics yet.

Usage notes: All of the scenegraph libraries have nice APIs. I like SceneJS the most because of its JSON-like API, it is very easy to learn because you can acutally see the scenegraph tree in the code. Three.js has got another type of API which is similar but uses no JSON. PhiloGL seems to me like some extra functions that helps you use native WebGL, the WebGL interface is not 100% encapsulated which makes it a bit harder to learn.

Tech notes: The tests were made using a desktop machine with an Intel i7 quadcore 2.8 GHz processor and 8Gb RAM. The operative system used was Ubuntu 10.04 (Lucid). The web browser used was Chromium 15 (I tried Firefox 6.0 also, its performance was about the same). When making these tests, I tried to cut down on the instanciations as much as I could to get more performance. The non-scenegraph test was made with pure WebGL with the support from webgl-utils.js and glMatrix.js.

Share Button

7 thoughts on “SceneJS, Three.js and PhiloGL – WebGL performance test”

    1. I used v0.8. Thanks for the input – I will probably remake this test with v2.0 and also include a couple of other WebGL scenegraph libs. I’m impressed by SceneJS, it’s great! Good job 🙂

Leave a Reply

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


*