Am 09.10.2013 09:20, schrieb Torsten Spieldenner: > >> Also a question for the DFKI guys about possibility of using the same >> scene for multiple view areas (may be impossible due to how webgl >> works, I’m not sure, hence asked). > > WebGL is the limitation here, indeed, as it only allows one (active) > viewport per renderer instance. What is possible, is to have several > XML3D elements and clone the scenegraph in every of the XML3D > elements. In order to keep memory overhead low here, one could store > shader, transformation and vertex data for meshes in external files > and reference them from within the scene graph. Experiments we have > done have shown, that compared to the actual scene graph (the tree of > group- and mesh-nodes), this externalized data makes the majority of > all data. But still: group nodes would have to be duplicated for every > XML3D element, and scene graph states synchronized between different > XML3D elements. To go a little more into detail: All WebGL resource are bound to one context and there is no mechanism to share them across. There is a ongoing discussion to have a sharing mechanism for exactly this use case but also to be able to run e.g. passes in Worker Threads. In XML3D we can share data elements between multiple XML3D contexts. Then the WebGL contexts do not share the buffers, but the TypedArrays the buffers get constructed from. Also all intermediate results form Xflow graphs get shared. As Rorsten explained, then it's required to synchronize the grou/mesh structure of two scenes, but all data for meshes and shaders can be reused. Having said that, we didn't really test this to a large extend ;) An alternative approach would be to use our new Renderpipline mechanism to render the scene from a different view to a FBO, read back the content and store it in a canvas or image. Though this approach is better memory-wise, the readback is very expensive in terms of run-time. Best, Kristian -- _______________________________________________________________________________ Kristian Sons Deutsches Forschungszentrum für Künstliche Intelligenz GmbH, DFKI Agenten und Simulierte Realität Campus, Geb. D 3 2, Raum 0.77 66123 Saarbrücken, Germany Phone: +49 681 85775-3833 Phone: +49 681 302-3833 Fax: +49 681 85775–2235 kristian.sons at dfki.de http://www.xml3d.org Geschäftsführung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes Amtsgericht Kaiserslautern, HRB 2313 _______________________________________________________________________________
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy