igneous icon indicating copy to clipboard operation
igneous copied to clipboard

Why is the browser stuck when visualizing the generated surface mesh?

Open HHHit opened this issue 10 months ago • 7 comments

I have been trying to visualize a large volume, with 2000x2000x1000 voxels. I created a configuration file using CloudVolume.create_new_info, which I set the chunk to be 100x100x50 voxels. And then I use the following code to create downsampled data and visualizing in neuroglancer. However, when I tried to visualize the mesh in the neuroglancer, it become very laggy, which is almost impossible to interact with. I am wondering if there were ways to make it faster for visulization? I tried downsample the image with --mip-level 4 added, but still it was not helping.

igneous image downsample file://./ --mip 0 --queue ./ds-queue 
igneous --parallel 20 execute -x ./ds-queue
igneous mesh forge file://./ --mip 0 --queue ./mesh-queue 
igneous --parallel 20 execute -x ./mesh-queue
igneous mesh merge file://./ --queue ./mesh-queue 
igneous --parallel 20 execute -x ./mesh-queue
igneous view ./ --port 6220

HHHit avatar Oct 06 '23 17:10 HHHit

I think i see what the problem is. Try meshing from a higher mip level, that will radically simplify the meshes.

Usually I try to pick a near isotropic mip level.

On Fri, Oct 6, 2023, 1:02 PM HHHIT @.***> wrote:

I have been trying to visualize a large volume, with 2000x2000x1000 voxels. I created a configuration file using CloudVolume.create_new_info, which I set the chunk to be 100x100x50 voxels. And then I use the following code to create downsampled data and visualizing in neuroglancer. However, when I tried to visualize the mesh in the neuroglancer, it become very laggy, which is almost impossible to interact with. I am wondering if there were ways to make it faster for visulization? I tried downsample the image with --mip-level 4 added, but still it was not helping.

igneous image downsample file://./ --mip 0 --queue ./ds-queue igneous --parallel 20 execute -x ./ds-queue igneous mesh forge file://./ --mip 0 --queue ./mesh-queue igneous --parallel 20 execute -x ./mesh-queue igneous mesh merge file://./ --queue ./mesh-queue igneous --parallel 20 execute -x ./mesh-queue igneous view ./ --port 6220

— Reply to this email directly, view it on GitHub https://github.com/seung-lab/igneous/issues/160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATGQSKOVZGJCD2K47XO2S3X6A2T5AVCNFSM6AAAAAA5WDGROCVHI2DSMVQWIX3LMV43ASLTON2WKOZRHEZTANRSGYYTENA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

william-silversmith avatar Oct 07 '23 20:10 william-silversmith

Thank you. Now, with the mip-level 4 as the input for generating the mesh, I can visualize in the browser more smoothly. However, the quality is really bad due to the low resolution. I am wondering if I can generate more levels of mesh? so that when I zoom in, the finer details of the mesh will be displayed.

HHHit avatar Oct 08 '23 21:10 HHHit

Yes, you can do that by generating the sharded multi-resolution meshes.

william-silversmith avatar Oct 08 '23 21:10 william-silversmith

Is the parameter nlod used to decide how many levels of mesh to generate?

HHHit avatar Oct 08 '23 21:10 HHHit

Yes, it sets the max number to generate though not the precise number.

On Sun, Oct 8, 2023, 5:42 PM HHHIT @.***> wrote:

Is the parameter nlod used to decide how many levels of mesh to generate?

— Reply to this email directly, view it on GitHub https://github.com/seung-lab/igneous/issues/160#issuecomment-1752169354, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATGQSO36PGTFFPLPGW6373X6MM5PAVCNFSM6AAAAAA5WDGROCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONJSGE3DSMZVGQ . You are receiving this because you commented.Message ID: @.***>

william-silversmith avatar Oct 08 '23 22:10 william-silversmith

Thanks a lot! I have tried using the shared format, but I still found it only displays the mesh with only one resolution. Are there any issues in my following command? Thanks,

igneous image downsample file://./ --mip 0 --num-mips 4 --queue ./ds-queue
igneous --parallel 20 execute -x ./ds-queue/
igneous mesh forge file://./ --mip 4 --queue ./mesh-queue --sharded 
igneous --parallel 20 execute -x ./mesh-queue
igneous mesh merge-sharded file://./ --queue ./mesh-queue --nlod 4
igneous --parallel 20 execute -x ./mesh-queue  
igneous view ./ --port 6220

HHHit avatar Oct 09 '23 18:10 HHHit

I think you'll want to forge from a lower mip level for meshing if you want the multi-res stuff to be usable. The mip level sets the floor on the resolution you can obtain.

william-silversmith avatar Oct 09 '23 18:10 william-silversmith