Tom,

Thank you for the fast reply! Disabling the angle dependent transparency is exactly what I was looking for; however, when I commented the specified line in fragmentShader.txt on my Mac install of ChimeraX1.2.5, it throws an OpenGL error. The error is long, but the first line is:

 

('Shader compile failure (0): b"ERROR: 0:355: \'\' : Invalid Directive: a\\n"', [b'#version 330 core\n#define USE_LIGHTING 1\n#define USE_LIGHTING_NORMALS 1\n#define USE_DEPTH_CUE 1\n#define USE_SHIFT_AND_SCALE 1\n#define USE_VERTEX_COLORS 1\n#define MAX_SHADOWS 1024\n\n/*\n *

 

---

David Kastner

Ph.D. student | Bioengineering

MIT | Kulik Lab

kastner.io

 

From: Tom Goddard <goddard@sonic.net>
Date: Monday, September 27, 2021 at 4:30 PM
To: David William Kastner <kastner@mit.edu>
Cc: ChimeraX Users Help <chimerax-users@cgl.ucsf.edu>
Subject: Re: [chimerax-users] Flat transparency setting absent

 

Hi David,

ChimeraX does not have the flat transparency option.  I have made a feature request for it

 

https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/5294

 

We plan to freeze the ChimeraX code in preparation for the ChimeraX 1.3 release this week, so I will not add this right now, but it should be pretty easy to add.

  I see you are trying to use transparency to achieve fading of the ribbon. So you don't want the angle dependent transparency where edge on transparent surfaces appear opaque, giving a more 3-dimensional appearance. You just want it all equally faded.

  If you want to edit your ChimeraX distribution you can make it use flat transparency. The file to edit is (on Mac)

ChimeraX-1.2.5.app/Contents/lib/python3.8/site-packages/chimerax/graphics/fragmentShader.txt

and you should add a "#" character in front of the following line using a text editor

a = (a >= 1 ? 1.0 : 1.0 - pow(max(1.0-a,0.0), 1.0/max(abs(dot(v1,N1)),0.01)));

so it becomes

# a = (a >= 1 ? 1.0 : 1.0 - pow(max(1.0-a,0.0), 1.0/max(abs(dot(v1,N1)),0.01)));

This is the line in the graphics shader program that applies the angle dependent transparency. With this change, all transparency will be flat.

Tom



On Sep 27, 2021, at 12:43 PM, David William Kastner via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

 

ChimeraX community,

I noticed that in ChimeraX, the “flat” transparency option that was present in Chimera has been either moved or renamed in ChimeraX. This setting made it so the transparency setting wasn’t overwhelming/distracting when focusing on details. In Chimera, it is accessed with Tools > Viewing controls > Effects > transparency > flat. Does anyone know how to achieve this effect in ChimeraX? I find the default ChimeraX transparency option to be disorienting when visualizing details. Here is a rendering comparing the two rendering styles with and without “flat” option. I look forward to your thoughts!

 

https://www.dropbox.com/s/xrjyjnzegeeltap/transparency_comparison.png?dl=0

 

David

 

---

David Kastner

Ph.D. student | Bioengineering

MIT | Kulik Lab

kastner.io

_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
https://plato.cgl.ucsf.edu/mailman/listinfo/chimerax-users