MetaCell / NetPyNE-UI

NetPyNE User interface
23 stars 7 forks source link

3D viewer cannot load larger detailed models #748

Open sanjayankur31 opened 1 year ago

sanjayankur31 commented 1 year ago

It looks the 3D viewer fails with larger models.

I have a model here with 10 detailed human cells. The model will load, and one can use the various controls, but the 3D viewer remains blank. If I reduce the model to 8 cells, the 3D viewer loads.

So, we need to:

Data:

ddelpiano commented 9 months ago

Hi @sanjayankur31 , this topic is part of the new contract, it's a limitation that currently requires further work in order to allow this to be supported. I will report back here once we have an update on this

sanjayankur31 commented 9 months ago

Thanks @ddelpiano , sounds good. We recently implemented a viewer for NeuroML that can manage really large models. We used some heuristics to reduce the amount of detail to be visualised as the number of segments to show increased. Something like that could be done for the NetPyNE viewer too---so that if it's fewer than say N segments, they're shown in full detail, but if they're more, the detail drops by a level and so on. Another heuristic was to show some cells in full detail, but show others as single cylinders---that way users still get to see what the cells look like, but they also get a good idea of a full network.

I haven't had a look at the NetPyNE UI implementation, but for us, the "InstancedMesh" bit in vispy was critical in implementing this. Basically, as long as there are a small number of meshes, having thousands of instances for each mesh did not cause a performance drop (based on my very little understanding of OpenGL, this is because mesh instances get handled directly by the GPU and don't need it to re-communicate with the CPU)

References:

pgleeson commented 9 months ago

FYI this is relevant too, as there is uncertainty about how NPUI handles large morphologies... https://github.com/MetaCell/NetPyNE-UI/issues/617

sanjayankur31 commented 9 months ago

@salvadord ^includes explanation/links to the pyneuroml vispy viewer