CubeBrowser / cube-explorer

browser based exploration of iris cubes
BSD 3-Clause "New" or "Revised" License
8 stars 12 forks source link

3D fields #32

Open niallrobinson opened 8 years ago

niallrobinson commented 8 years ago

To be clear - this is not a wish for this project. Its a ahem blue sky ahem idea for project X in the future.

Is there any scope for rendering 3D fields of data in the browser using notebooks and holoviews? I made a browser-based 3D volume rendered version of atmospheric data a few months ago. I've always dreamed of being able to look at animated 3D fields of data.

Demo: http://demo.3dvis.informaticslab.co.uk/ng-3d-vis/apps/desktop/ Blog post about it: http://www.informaticslab.co.uk/technical/2015/11/27/projectone-retrospective.html

philippjfr commented 8 years ago

That's a really cool demo and is definitely worth looking into. Could you comment a bit on what libraries you're using to render that plot?

I've looked into this a little bit myself and the only thing which I think could easily be adapted as a HoloViews backend is the CesiumJS library, which also has Python bindings. Shouldn't be too hard to get a prototype running but you'd have to tell us whether that's within the scope of the project.

jlstevens commented 8 years ago

Yes, that is a really neat demo!

This sort of visualization is definitely within the scope of HoloViews and we have prototyped interactive 3D visualizations using HoloViews in the past. In general we find that 3D functionality often has a lot of domain specific requirements making it hard to come up with a general approach that keeps everyone happy.

I would say something like this would require a lot of effort to implement and polish but it certainly wouldn't be out of scope for a possible HoloViews extension in future.

philippjfr commented 8 years ago

I've looked at some of the source code now and it looks like you're just using ThreeJS, which is something we've actually played with for another project in the past. Writing a small HoloViews backend that works by generating some HTML+JS to render ThreeJS plots should be fairly straightforward to prototype, but as Jean-Luc points out might take a considerable amount of time to polish.

niallrobinson commented 8 years ago

Hi guys - sorry for being lax and not replying sooner. Yup - three.js is the bottom line. When we made this it required a surprising about of bespoke shader code but I hope three.js will fold this kind of functionality in natively at some point.

Ultimately, all the rendering knows is that its plotting a regularly spaced orthogonal 3D array (of course, that spatial atmospheric fields are non of these things so there is quite a lot of processing to get to something that represents physical space). But obviously this could three (+animation) dimensions which are physical space. Something to tackle in the future, maybe.