VTK/VES and emscripten?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

VTK/VES and emscripten?

Steve Pieper
Hi Folks - 

Has anyone tried VES/VTK and emscripten[1]?  Other OpenGL (ES) game platforms appear to compile to javascript and work with WebGL (even on a phone!) and you can even run complete, if simple, Qt applications in a browser.

I can already hear the purists scream about this being an 'ugly hack' which, I have to admit, it kind of is.  But it also shows some promise and for a certain subset of VTK functionality it might make sense to expose javascript bindings this way rather than rewriting something new in pure javascript.  See for example the zlib, python, sqlite, and other large C/C++ code bases that are automagically available now in the browser.

Thoughts?
-Steve

[1] https://github.com/kripken/emscripten/wiki

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: VTK/VES and emscripten?

Aashish Chaudhary-2
On Tue, Sep 24, 2013 at 9:16 PM, Steve Pieper <[hidden email]> wrote:
Hi Folks - 

Has anyone tried VES/VTK and emscripten[1]?  Other OpenGL (ES) game platforms appear to compile to javascript and work with WebGL (even on a phone!) and you can even run complete, if simple, Qt applications in a browser.

The last time we tried to compile VES using emscripten didn't work out (just pure VES (no VTK code). It was an effort with one of the Mozilla developer, however I must mention that we didn't spend a whole lot of time on it. 

I can already hear the purists scream about this being an 'ugly hack' which, I have to admit, it kind of is.  But it also shows some promise and for a certain subset of VTK functionality it might make sense to expose javascript bindings this way rather than rewriting something new in pure javascript.  See for example the zlib, python, sqlite, and other large C/C++ code bases that are automagically available now in the browser.

We are certainly interesting in trying this approach and will pursue it again. If you would like to contribute, then let us know. 

- Aashish
 
 

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers





--
| Aashish Chaudhary
| R&D Engineer        
| Kitware Inc.           
| www.kitware.com   

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: VTK/VES and emscripten?

Marcus D. Hanwell-2
In reply to this post by Steve Pieper
On Tue, Sep 24, 2013 at 9:16 PM, Steve Pieper <[hidden email]> wrote:
>
> Hi Folks -
>
> Has anyone tried VES/VTK and emscripten[1]?  Other OpenGL (ES) game platforms appear to compile to javascript and work with WebGL (even on a phone!) and you can even run complete, if simple, Qt applications in a browser.
>
> I can already hear the purists scream about this being an 'ugly hack' which, I have to admit, it kind of is.  But it also shows some promise and for a certain subset of VTK functionality it might make sense to expose javascript bindings this way rather than rewriting something new in pure javascript.  See for example the zlib, python, sqlite, and other large C/C++ code bases that are automagically available now in the browser.
>
I haven't had time to actually try it out yet, but have been thinking
about using it (and had some brief discussions with a friend at
Mozilla. I think it would be a great approach that could allow us to
share a lot of common code on mobile and web, although WebGL lacks
some features that are available on mobile as far as I can tell there
is a lot of commonality.

It is certainly something we should consider, and it seems like a good
candidate for the new rendering code in VTK too.

Marcus
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: VTK/VES and emscripten?

Yumin Yuan
Hi Steve,

emscripten was brought up (by David Thompson) during one of our group meetings yesterday. We were talking about a possible webclient based on a Qt/VTK application, and an emscripten type approach will be very appealing. We haven't investigated the possibility whether this will work yet, but it is on our radar, and would love to hear inputs regarding this too.

Thanks,
Yumin


On Tue, Sep 24, 2013 at 9:43 PM, Marcus D. Hanwell <[hidden email]> wrote:
On Tue, Sep 24, 2013 at 9:16 PM, Steve Pieper <[hidden email]> wrote:
>
> Hi Folks -
>
> Has anyone tried VES/VTK and emscripten[1]?  Other OpenGL (ES) game platforms appear to compile to javascript and work with WebGL (even on a phone!) and you can even run complete, if simple, Qt applications in a browser.
>
> I can already hear the purists scream about this being an 'ugly hack' which, I have to admit, it kind of is.  But it also shows some promise and for a certain subset of VTK functionality it might make sense to expose javascript bindings this way rather than rewriting something new in pure javascript.  See for example the zlib, python, sqlite, and other large C/C++ code bases that are automagically available now in the browser.
>
I haven't had time to actually try it out yet, but have been thinking
about using it (and had some brief discussions with a friend at
Mozilla. I think it would be a great approach that could allow us to
share a lot of common code on mobile and web, although WebGL lacks
some features that are available on mobile as far as I can tell there
is a lot of commonality.

It is certainly something we should consider, and it seems like a good
candidate for the new rendering code in VTK too.

Marcus
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers

Reply | Threaded
Open this post in threaded view
|

Re: VTK/VES and emscripten?

Marcus D. Hanwell-2
On Wed, Sep 25, 2013 at 8:45 AM, Yumin Yuan <[hidden email]> wrote:
> Hi Steve,
>
> emscripten was brought up (by David Thompson) during one of our group
> meetings yesterday. We were talking about a possible webclient based on a
> Qt/VTK application, and an emscripten type approach will be very appealing.
> We haven't investigated the possibility whether this will work yet, but it
> is on our radar, and would love to hear inputs regarding this too.
>
VTK's current rendering code is unlikely to work as they target GL
2.1+ translation on the desktop as far as I know. VES seems much more
likely to work with its GL ES code, the most notable demo I am aware
of is http://www.unrealengine.com/html5/ where they graphics and
interaction seem very smooth. I would love to get more details on what
was tried/didn't work with VES - I will try to get together with
Aashish.

Marcus
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtk-developers