<div dir="ltr"><div dir="ltr">Hi Tom, <div><br></div><div>Thank you for your information. That's very helpful.</div><div>The cmd to produce the image at offscreen mode is like this</div><div>open test.map format ccp4<br>volume #1 style surface expandSinglePlane True<br>volume #1 step 1 level 660.<br>set bgColor white<br>lighting full <br>view cofr True <br>save image test.map_z.jpeg supersample 1 width 1200 height 1200<br></div><div><br></div><div>Based on your suggestion, I have increased the threshold with supersample 1. </div><div>It works but not showing what I expect and working around in a different way.<br></div><div><br></div><div>King regards,</div><div>Zhe</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 16, 2021 at 6:40 PM Tom Goddard <<a href="mailto:goddard@sonic.net" target="_blank">goddard@sonic.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Hi Zhe,<div><br></div><div>  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><br></div><div>  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><br></div><div>  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><br></div><div><span style="white-space:pre-wrap">     </span>Tom</div><div><br><div><br><blockquote type="cite"><div>On Feb 16, 2021, at 9:18 AM, Zhe Wang <<a href="mailto:anchorwz@googlemail.com" target="_blank">anchorwz@googlemail.com</a>> wrote:</div><br><div><div dir="ltr"><div style="border-left-style:none;padding:0px;display:flex;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:inherit"><div style="margin:0px;padding:0px 0px 20px;width:1169px"><div><div id="gmail-m_2752415920526111460gmail-m_-7745585471973961572gmail-:64r" style="font-size:0.875rem;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="gmail-m_2752415920526111460gmail-m_-7745585471973961572gmail-:64s" 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">Hi, <div><br></div><div>I am trying to generate an image for a tomogram (1.6G).</div><div>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>(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><br></div><div><br></div><div>Many thanks,</div><div>Zhe</div><div><br></div><div>PS: MacOS 11.01.1 with ChimeraX 0.9</div><div><br></div><div>Executing: save image test.map_z.jpeg supersample 3 width 1200 height 1200<br>Traceback (most recent call last):<br>  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>    commands.run(sess, 'open %s' % arg)<br>  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>    results = command.run(text, log=log)<br>  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>    result = ci.function(session, **kw_args)<br>  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>    path_models = session.models.open(paths, format=format, name=name, **kw)<br>  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>    session, filenames, format=format, name=name, **kw)<br>  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>    models, status = open_data(session, fspec, format=format, name=name, **kw)<br>  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>    models, status = open_func(*args, **kw)<br>  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>    run(session, text)<br>  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>    results = command.run(text, log=log)<br>  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>    result = ci.function(session, **kw_args)<br>  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>    fmt.export(session, filename, fmt.nicknames[0], **kw)<br>  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>    result = self.export_func(session, path, **kw)<br>  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>    transparent_background=transparent_background)<br>  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>    self.draw(c, drawings, swap_buffers = False)<br>  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>    self._draw_scene(camera, drawings)<br>  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>    shadow, multishadow = self._compute_shadowmaps(opaque_drawings + transparent_drawings, camera)<br>  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>    shadow_enabled = r.shadow.use_shadow_map(camera, drawings, self._shadow_bounds)<br>  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>    draw_depth(r, sdrawings, opaque_only = not r.material.transparent_cast_shadows)<br>  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>    draw_opaque(r, drawings)<br>  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>    _draw_multiple(drawings, renderer, Drawing.OPAQUE_DRAW_PASS)<br>  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>    d.draw(renderer, draw_pass)<br>  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>    self.draw_self(renderer, draw_pass)<br>  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>    self._draw_geometry(renderer, opaque_only = any_transp)<br>  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>    ds.draw(self.display_style)<br>  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>    eb.draw_elements(etype, ni)<br>  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>    GL.glDrawElementsInstanced(element_type, ne, GL.GL_UNSIGNED_INT, eo, ninst)<br>  File "src/latebind.pyx", line 32, in OpenGL_accelerate.latebind.LateBind.__call__<br>  File "src/wrapper.pyx", line 318, in OpenGL_accelerate.wrapper.Wrapper.__call__<br>  File "src/wrapper.pyx", line 311, in OpenGL_accelerate.wrapper.Wrapper.__call__<br>  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>    return self( *args, **named )<br>  File "src/errorchecker.pyx", line 53, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError<br>OpenGL.error.GLError: GLError(<br>err = 1281,<br>description = b'invalid value',<br>baseOperation = glDrawElementsInstanced,<br>pyArgs = (<br>GL_TRIANGLES,<br>2475821538,<br>GL_UNSIGNED_INT,<br>None,<br>1,<br>),<br>cArgs = (<br>GL_TRIANGLES,<br>2475821538,<br>GL_UNSIGNED_INT,<br>None,<br>1,<br>),<br>cArguments = (<br>GL_TRIANGLES,<br>2475821538,<br>GL_UNSIGNED_INT,<br>None,<br>1,<br>)<br>)<div></div><div><br></div></div></div><div></div></div></div><div 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 style="clear:both"></div></div><div 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 style="border-top:0px;padding:0px"><div style="clear:both;margin:0px;padding:16px 0px;border-top:none"><div id="gmail-m_2752415920526111460gmail-m_-7745585471973961572gmail-:64q"><table style="border-collapse:collapse"><tbody><tr><td style="padding:0px 16px;vertical-align:top;width:44px"><img id="gmail-m_2752415920526111460gmail-m_-7745585471973961572gmail-:vc_118" name="m_2752415920526111460_m_-7745585471973961572_:vc" src="https://ssl.gstatic.com/ui/v1/icons/mail/no_photo.png" style="display: block; width: 40px; height: 40px; border-radius: 50%;"></td><td style="padding:0px;width:1169px"><div style="box-sizing:border-box;border-radius:1px;padding:0px;border:none;margin:0px"><div style="color:inherit;height:auto;padding:0px;display:flex;line-height:20px"><span id="gmail-m_2752415920526111460gmail-m_-7745585471973961572gmail-:64x" 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-m_2752415920526111460gmail-m_-7745585471973961572gmail-:64v" 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>ChimeraX-users mailing list<br><a href="mailto:ChimeraX-users@cgl.ucsf.edu" target="_blank">ChimeraX-users@cgl.ucsf.edu</a><br>Manage subscription:<br><a href="https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users" target="_blank">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users</a><br></div></blockquote></div><br></div></div></blockquote></div>
</div>