[chimerax-users] Flat transparency setting absent
Tom Goddard
goddard at sonic.net
Mon Sep 27 13:30:06 PDT 2021
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 <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 at 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 <https://www.dropbox.com/s/xrjyjnzegeeltap/transparency_comparison.png?dl=0>
>
> David
>
> ---
> David Kastner
> Ph.D. student | Bioengineering
> MIT | Kulik Lab
> kastner.io <http://kastner.io/>_______________________________________________
> ChimeraX-users mailing list
> ChimeraX-users at cgl.ucsf.edu <mailto:ChimeraX-users at cgl.ucsf.edu>
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users <https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimerax-users/attachments/20210927/a760cd3a/attachment.html>
More information about the ChimeraX-users
mailing list