Saturday, January 18, 2014

To Three Or Not To Three?

That is the question!

I've been spending time evaluating Three.js as a potential export target for Mana Web. As a framework, Three is nicely organized and a great starting point for experimentation. Its renderer, however, is lacking some key features that I'd like to include in an online model viewer.

For one thing, there are no variance shadow maps. It wasn't as easy as I'd hoped, but I've managed to add them to my local copy. The screen shots below show the results of that effort. The code is messy right now, but once I'm finished I will see if I can get it added to Three officially. I've never used GitHub before, but I think it is time I learned!
webgl_viewer01 webgl_viewer02 webgl_viewer03 webgl_viewer04
Another thing I'd like to see is animation blending. At present, there is no way to upload multiple animations for the same character and intermix them. An animator can blend morph targets with skeletal animation, but cannot transition from an idle pose to walking to running.

As much as I like Three, it is tempting to start a Mana.js project. The features I need already exist, I'm very familiar with my own code, and I've done a partial port before. It would be more of a known quantity.

But Three.js already has quite a following and it is actively updated. Perhaps the best course is to do both. I can port Mana to JavaScript and provide a plugin that uses the Three.js renderer, but activates additional features.

No comments:

Post a Comment