[chimerax-users] lighting Flat + ambiant Occlusion ?
Thibault TUBIANA
thibault.tubiana at i2bc.paris-saclay.fr
Fri May 27 02:56:26 PDT 2022
Thank you so much Tom for those really good explainations and this trick :)
Have a great day!
Thibault.
De: "Tom Goddard" <goddard at sonic.net>
À: "Thibault TUBIANA" <thibault.tubiana at i2bc.paris-saclay.fr>
Cc: "chimerax-users" <chimerax-users at cgl.ucsf.edu>
Envoyé: Vendredi 27 Mai 2022 02:09:39
Objet: Re: [chimerax-users] lighting Flat + ambiant Occlusion ?
Hi Thibault,
I guess what you want is that each sphere have a single uniform color, but buried spheres are darker. The example image you provide mostly achieves that but I can still see darkness variation over a single sphere, especially on the buried spheres.
ChimeraX cannot cast ambient occlusion shadows and at the same time color each atom sphere a single color. The shadowing varies across the surface of each sphere and that is what makes it look 3-dimensional. That said some tricks can at least make the shadowed lighting flatter. These commands combined
light flat
light multishadow 128 msDepth .1 ambientIntensity 3
produce a relatively flat look as in the attached image. It uses two tricks. First "msDepth .1" means don't have close spheres occlude each other (closer than 10% of molecule size). Then the "ambientIntensity 3" makes the colors very bright so they are saturated at maximum brightness on the surface of the molecule. That trick will only work nicely for colors red, green, blue, cyan, magenta, white because with those colors the red,green,blue color components saturate (achieve maximum brightness) at the same illumination level. Other colors will show color variation as they saturate.
If you really wanted to work hard you could get a flat ambient occlusion by figuring out somehow the brightness for every atom and assigning it a suitably bright color, instead of using the builtin lighting. This is sometimes called "baked-in" lighting since it really is just setting the color of each atom to a suitable darkness. Figuring out which atoms are buried and should be dark is the hard part. The ChimeraX graphics code can't do that in any easy way because it is being done at a per-pixel level, not a per-sphere level.
Tom
On May 26, 2022, at 1:43 PM, Elaine Meng via ChimeraX-users < [ mailto:chimerax-users at cgl.ucsf.edu | chimerax-users at cgl.ucsf.edu ] > wrote:
Hi Thibault,
I haven't been able to come up with a combination of ChimeraX settings to make an image like that.
Starting from flat (first image attached), as soon as I turn on multishadows (light multishadow 128), it looks 3D, not flat (second image attached).
So I also tried instead using depth-cueing (light depthcuestart 0.1 depthcueend .75 depthcuecolor black depthcue true -> third image attached), but that doesn't achieve a similar appearance either.
Maybe someone else can come up with how to make an image similar to yours, but as far as I can tell, it may not be possible.
Best,
Elaine
-----
Elaine C. Meng, Ph.D.
UCSF Chimera(X) team
Department of Pharmaceutical Chemistry
University of California, San Francisco
BQ_BEGIN
On May 26, 2022, at 10:44 AM, Thibault TUBIANA via ChimeraX-users < [ mailto:chimerax-users at cgl.ucsf.edu | chimerax-users at cgl.ucsf.edu ] > wrote:
Dear Chimera X community and developpers :)
I would like to create a flat representation for a protein but with ambiant occlusion, a little bit like on the example joined (made with [ https://3dproteinimaging.com/ | https://3dproteinimaging.com ] ).
Is it something that it is possible with ChimeraX ? I've been playing with the shaddows but the "flat effect" is disappearing then :/
Thank you :)
Thibault.
<flat.png> <multishadow128.png> <depthcue.png>
_______________________________________________
ChimeraX-users mailing list
[ mailto:ChimeraX-users at cgl.ucsf.edu | ChimeraX-users at cgl.ucsf.edu ]
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
BQ_END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220527/cee68452/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image1.png
Type: image/png
Size: 233020 bytes
Desc: not available
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220527/cee68452/attachment-0001.png>
More information about the ChimeraX-users
mailing list