Dear Luke, Could you please show an example how to concatenate multiple spheres as a single GLMeshItem?
Thank you! On Wednesday, October 1, 2014 at 4:05:23 AM UTC+8, Luke Campagnola wrote: > > On Tue, Sep 30, 2014 at 10:05 AM, David Ragazzi <[email protected] > <javascript:>> wrote: > >> For network with small architecture, the simulation works very well.. but >> for big networks, it is terribly slow due to number of 3D objects increase >> exponentially. For example, if we have a region with 2048 columns wich each >> column having 32 cells, we will have 65536 objects! I'm using MeshItens to >> draw spheres (i.e. neurons), and even disabling "smoth" option, operations >> like zoom are very slow. >> >> The source code: >> >> cellMd = gl.MeshData.sphere(rows=10, cols=10) >> cell.tree3d_item = gl.GLMeshItem(meshdata=cellMd, shader='shaded', >> smooth=False, glOptions='opaque') >> cell.tree3d_item.translate(cell.tree3d_x, cell.tree3d_y, cell.tree3d_z) >> self.viewer.addItem(cell.tree3d_item) >> >> This said, what you guys suggest to improve performance? Is possible I >> have a column and its neurons as single object in order to I have better >> results?? >> > > Yes--to speed this up you just need to combine similar objects together. > For example, the mesh data for all of your nodes can be concatenated and > displayed as a single GLMeshItem. At that point, you should be limited only > by the capabilities of your graphics card. > -- You received this message because you are subscribed to the Google Groups "pyqtgraph" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pyqtgraph/0261c7a7-2da9-490f-a2e9-9193448312ad%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
