Converting a Maya scene to JavaScript or WebGL

javascript, maya, webgl

Solution

You can try Three.js WebGL library for that. They have exporters from 3D models to JSON written in python here.

For example you can try to export your model in `obj` and then convert it using convert_obj_three.py.

Then you can load your model into canvas using `THREE.JSONLoader` method. There is a lot of examples on internet.

Problem

I have some time and I'd like to convert a Maya scene to WebGL or render it to a canvas if possible without WebGL. The model is of a desk lamp consisting of primitives and meshes, I've parented parts to the joints instead of binding them to the skeleton and now I want to use a JS library or WebGL to render, then animate with mouse movement and/or touch event. If I can get the model onto a canvas, or into a WebGL enabled application while conserving the parented relationships, I could then write a few functions to bind joint rotation to mouse movements, I just need a little help with actually exporting and importing my Maya scene while conserving relationships. Thanks in advance.

Original source