<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Zhe,<div class=""><br class=""></div><div class="">  Rendering an 800 million triangle surface is asking for trouble.  Each triangle takes about 24 bytes (3 integer vertex indices, vertex coordinate and normal vector  float values), so 19 Gbytes of memory.  Today's high-end graphics cards have 8 or 11 Gbytes of memory.  But the triangle data does not have to go on the graphics card.  The error might be a bug in the PyOpenGL library we use.  The exact error is "invalid value" in  glDrawElementsInstanced() with 2.5 billion vertices (= 3 * 800 milion).  That number of vertices argument might be a signed 32-bit integer in which case its range is only -2 to 2 billion.  It is supposed to be unsigned, but it could be PyOpenGL handles it as signed.  You might try increasing your threshold a bit to get below 667 million triangles so you have less than 2 billion triangle vertices and see if that works.</div><div class=""><br class=""></div><div class="">  I am particularly puzzled by why you get the error saving the image, but apparently you do not get it when rendering to screen.  Maybe it is the "supersample 3" option somehow.  You might try "supersample 1"</div><div class=""><br class=""></div><div class="">  I have a hard time imagining how an 800 million triangle surface is useful to look at -- your tomogram only has twice that many voxels!  Possibly the solution is to change how you are trying to show it.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre">   </span>Tom</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 16, 2021, at 9:18 AM, Zhe Wang <<a href="mailto:anchorwz@googlemail.com" class="">anchorwz@googlemail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail-adn gmail-ads" style="border-left-style: none; padding: 0px; display: flex; font-family: Roboto, RobotoDraft, Helvetica, Arial, sans-serif; font-size: inherit;"><div class="gmail-gs" style="margin:0px;padding:0px 0px 20px;width:1169px"><div class="gmail-"><div id="gmail-:64r" class="gmail-gt gmail-ii" style="font-size:0.875rem;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-:64s" class="gmail-a3s gmail-aiL" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr" class="">Hi, <div class=""><br class=""></div><div class="">I am trying to generate an image for a tomogram (1.6G).</div><div class="">It can run through if I use a value that produces 33651412 triangles. But if I use my target level value, it will need 825273846 triangles and it threw the following error:</div><div class="">(I am wondering if this is an edge case and how should that be dealt with if I want the image at my target level value?)</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Many thanks,</div><div class="">Zhe</div><div class=""><br class=""></div><div class="">PS: MacOS 11.01.1 with ChimeraX 0.9</div><div class=""><br class=""></div><div class="">Executing: save image test.map_z.jpeg supersample 3 width 1200 height 1200<br class="">Traceback (most recent call last):<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/ChimeraX_main.py", line 734, in init<br class="">    commands.run(sess, 'open %s' % arg)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/commands/run.py", line 31, in run<br class="">    results = command.run(text, log=log)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/commands/cli.py", line 2632, in run<br class="">    result = ci.function(session, **kw_args)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/commands/open.py", line 64, in open<br class="">    path_models = session.models.open(paths, format=format, name=name, **kw)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/models.py", line 604, in open<br class="">    session, filenames, format=format, name=name, **kw)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/io.py", line 477, in open_multiple_data<br class="">    models, status = open_data(session, fspec, format=format, name=name, **kw)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/io.py", line 431, in open_data<br class="">    models, status = open_func(*args, **kw)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/scripting.py", line 115, in open_command_script<br class="">    run(session, text)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/commands/run.py", line 31, in run<br class="">    results = command.run(text, log=log)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/commands/cli.py", line 2632, in run<br class="">    result = ci.function(session, **kw_args)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/commands/save.py", line 61, in save<br class="">    fmt.export(session, filename, fmt.nicknames[0], **kw)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/io.py", line 213, in export<br class="">    result = self.export_func(session, path, **kw)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/image.py", line 150, in save_image<br class="">    transparent_background=transparent_background)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 434, in image<br class="">    self.draw(c, drawings, swap_buffers = False)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 162, in draw<br class="">    self._draw_scene(camera, drawings)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 192, in _draw_scene<br class="">    shadow, multishadow = self._compute_shadowmaps(opaque_drawings + transparent_drawings, camera)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/view.py", line 541, in _compute_shadowmaps<br class="">    shadow_enabled = r.shadow.use_shadow_map(camera, drawings, self._shadow_bounds)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/opengl.py", line 1272, in use_shadow_map<br class="">    draw_depth(r, sdrawings, opaque_only = not r.material.transparent_cast_shadows)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/drawing.py", line 1413, in draw_depth<br class="">    draw_opaque(r, drawings)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/drawing.py", line 1394, in draw_opaque<br class="">    _draw_multiple(drawings, renderer, Drawing.OPAQUE_DRAW_PASS)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/drawing.py", line 1405, in _draw_multiple<br class="">    d.draw(renderer, draw_pass)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/drawing.py", line 698, in draw<br class="">    self.draw_self(renderer, draw_pass)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/drawing.py", line 705, in draw_self<br class="">    self._draw_geometry(renderer, opaque_only = any_transp)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/drawing.py", line 770, in _draw_geometry<br class="">    ds.draw(self.display_style)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/drawing.py", line 1575, in draw<br class="">    eb.draw_elements(etype, ni)<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/chimerax/core/graphics/opengl.py", line 2483, in draw_elements<br class="">    GL.glDrawElementsInstanced(element_type, ne, GL.GL_UNSIGNED_INT, eo, ninst)<br class="">  File "src/latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.__call__<br class="">  File "src/wrapper.pyx", line 318, in OpenGL_accelerate.wrapper.Wrapper.__call__<br class="">  File "src/wrapper.pyx", line 311, in OpenGL_accelerate.wrapper.Wrapper.__call__<br class="">  File "/nfs/public/rw/pdbe/httpd-em/software/chimerax/opt/UCSF/ChimeraX/lib/python3.7/site-packages/PyOpenGL-3.1.3b2-py3.7.egg/OpenGL/platform/baseplatform.py", line 409, in __call__<br class="">    return self( *args, **named )<br class="">  File "src/errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError<br class="">OpenGL.error.GLError: GLError(<br class="">err = 1281,<br class="">description = b'invalid value',<br class="">baseOperation = glDrawElementsInstanced,<br class="">pyArgs = (<br class="">GL_TRIANGLES,<br class="">2475821538,<br class="">GL_UNSIGNED_INT,<br class="">None,<br class="">1,<br class="">),<br class="">cArgs = (<br class="">GL_TRIANGLES,<br class="">2475821538,<br class="">GL_UNSIGNED_INT,<br class="">None,<br class="">1,<br class="">),<br class="">cArguments = (<br class="">GL_TRIANGLES,<br class="">2475821538,<br class="">GL_UNSIGNED_INT,<br class="">None,<br class="">1,<br class="">)<br class="">)<div class="gmail-yj6qo"></div><div class="gmail-adL"><br class=""></div></div></div><div class="gmail-adL"></div></div></div><div class="gmail-hi" style="border-bottom-left-radius:1px;border-bottom-right-radius:1px;padding:0px;width:auto;background:rgb(242,242,242);margin:0px"></div></div></div><div class="gmail-ajx" style="clear:both"></div></div><div class="gmail-gA gmail-gt gmail-acV" style="font-size:0.875rem;padding:0px;width:auto;border-bottom-left-radius:0px;border-bottom-right-radius:0px;border-top:none;margin:0px;background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif"><div class="gmail-xu gmail-gB" style="border-top:0px;padding:0px"><div class="gmail-ip gmail-iq" style="clear:both;margin:0px;padding:16px 0px;border-top:none"><div id="gmail-:64q" class=""><table class="gmail-cf gmail-wS" style="border-collapse:collapse"><tbody class=""><tr class=""><td class="gmail-amq" style="padding:0px 16px;vertical-align:top;width:44px"><img id="gmail-:vc_118" name=":vc" src="https://ssl.gstatic.com/ui/v1/icons/mail/no_photo.png" class="gmail-ajn gmail-bofPge" style="display: block; width: 40px; height: 40px; border-radius: 50%;"></td><td class="gmail-amr" style="padding:0px;width:1169px"><div class="gmail-nr gmail-wR" style="box-sizing:border-box;border-radius:1px;padding:0px;border:none;margin:0px"><div class="gmail-amn" style="color:inherit;height:auto;padding:0px;display:flex;line-height:20px"><span id="gmail-:64x" tabindex="0" class="gmail-ams gmail-bkH" style="border:none;display:inline-flex;font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:0.875rem;letter-spacing:0.25px;background:none;border-radius:4px;box-sizing:border-box;color:rgb(95,99,104);height:36px;outline:none;padding:0px 16px 0px 12px;min-width:104px;margin-right:12px">Reply</span><span id="gmail-:64v" tabindex="0" class="gmail-ams gmail-bkG" style="border:none;display:inline-flex;font-family:"Google Sans",Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:0.875rem;letter-spacing:0.25px;background:none;border-radius:4px;box-sizing:border-box;color:rgb(95,99,104);height:36px;outline:none;padding:0px 16px 0px 12px;min-width:104px;margin-right:12px">Forward</span></div></div></td></tr></tbody></table></div></div></div></div></div>
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></body></html>