[chimerax-users] lighting Flat + ambiant Occlusion ?
Tom Goddard
goddard at sonic.net
Thu May 26 17:09:39 PDT 2022
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 <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
>
>> On May 26, 2022, at 10:44 AM, Thibault TUBIANA via ChimeraX-users <chimerax-users at cgl.ucsf.edu <mailto: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
> ChimeraX-users at cgl.ucsf.edu
> Manage subscription:
> https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.rbvi.ucsf.edu/pipermail/chimerax-users/attachments/20220526/446e5324/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/20220526/446e5324/attachment-0001.png>
More information about the ChimeraX-users
mailing list