Displaying silhouette around specific visual elements
Dear all,
I wonder if it's possible to display silhouettes selectively in the same figure; for instance, displaying silhouettes only on structure representation (around sticks, spheres, cartoons and so on), but not around the maps or volumes that surround them. Many thanks in advance,
Andre
Hi Andre,
It is not currently possible to display silhouettes on some models and not others.
Several people have wanted this but I think it is complex to achieve. The silhouettes show boundaries where the depth in the entire scene changes abruptly. In order to have per-model silhouettes the ChimeraX GPU shader programs would need to compute an additional depth buffer separately for each model. Also the silhouette edges are not currently drawn at a specific depth. If per-model silhouettes were supported a stick model with silhouettes beneath a transparent surface needs to draw the silhouettes under the transparent surface so knowing the depth of the silhouette edge becomes important. When not using silhouettes the shader programs need to not compute the extra per-model depth buffers otherwise it would slow down rendering even when not being used. Adding these additional complexities to already complex graphics rendering shader programs have so far made this feature out of reach for our one graphics rendering developer (me).
I made a feature request for per-model silhouette edges and perhaps in the future we will find a simpler way to implement it that makes it feasible.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/4420
Tom
On Mar 25, 2021, at 10:09 PM, Andre LB Ambrosio andre@ifsc.usp.br wrote:
Dear all,
I wonder if it's possible to display silhouettes selectively in the same figure; for instance, displaying silhouettes only on structure representation (around sticks, spheres, cartoons and so on), but not around the maps or volumes that surround them. Many thanks in advance,
Andre _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
Hi Andre, Sometimes you can approximately "fake" this effect by using the selection outline. It is not the same, however, as silhouettes; it will only go around the outside perimeter of the selected item(s). For example, if I have a molecule inside a map surface, I can make the surface transparent, select the atomic structure, and make the selection outline color black etc. as in these commands, resulting in the appearance in the attached image.
open 2gbp molmap protein 8 trans 70 view set bgColor white select @* graphics selection color black
I hope this helps, Elaine ----- Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 25, 2021, at 8:23 PM, Tom Goddard goddard@sonic.net wrote:
Hi Andre,
It is not currently possible to display silhouettes on some models and not others.
Several people have wanted this but I think it is complex to achieve. The silhouettes show boundaries where the depth in the entire scene changes abruptly. In order to have per-model silhouettes the ChimeraX GPU shader programs would need to compute an additional depth buffer separately for each model. Also the silhouette edges are not currently drawn at a specific depth. If per-model silhouettes were supported a stick model with silhouettes beneath a transparent surface needs to draw the silhouettes under the transparent surface so knowing the depth of the silhouette edge becomes important. When not using silhouettes the shader programs need to not compute the extra per-model depth buffers otherwise it would slow down rendering even when not being used. Adding these additional complexities to already complex graphics rendering shader programs have so far made this feature out of reach for our one graphics rendering developer (me).
I made a feature request for per-model silhouette edges and perhaps in the future we will find a simpler way to implement it that makes it feasible.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/4420
Tom
On Mar 25, 2021, at 10:09 PM, Andre LB Ambrosio andre@ifsc.usp.br wrote:
Dear all,
I wonder if it's possible to display silhouettes selectively in the same figure; for instance, displaying silhouettes only on structure representation (around sticks, spheres, cartoons and so on), but not around the maps or volumes that surround them. Many thanks in advance,
Andre _
Dear Elaine, that is excellent! It is the visual effect I was looking for indeed. Thank you very much for this and thank you Tom for the very detailed response and for the feature request ticket. Andre.
Em ter., 30 de mar. de 2021 às 15:59, Elaine Meng meng@cgl.ucsf.edu escreveu:
Hi Andre, Sometimes you can approximately "fake" this effect by using the selection outline. It is not the same, however, as silhouettes; it will only go around the outside perimeter of the selected item(s). For example, if I have a molecule inside a map surface, I can make the surface transparent, select the atomic structure, and make the selection outline color black etc. as in these commands, resulting in the appearance in the attached image.
open 2gbp molmap protein 8 trans 70 view set bgColor white select @* graphics selection color black
I hope this helps, Elaine
Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 25, 2021, at 8:23 PM, Tom Goddard goddard@sonic.net wrote:
Hi Andre,
It is not currently possible to display silhouettes on some models and not others.
Several people have wanted this but I think it is complex to achieve. The silhouettes show boundaries where the depth in the entire scene changes abruptly. In order to have per-model silhouettes the ChimeraX GPU shader programs would need to compute an additional depth buffer separately for each model. Also the silhouette edges are not currently drawn at a specific depth. If per-model silhouettes were supported a stick model with silhouettes beneath a transparent surface needs to draw the silhouettes under the transparent surface so knowing the depth of the silhouette edge becomes important. When not using silhouettes the shader programs need to not compute the extra per-model depth buffers otherwise it would slow down rendering even when not being used. Adding these additional complexities to already complex graphics rendering shader programs have so far made this feature out of reach for our one graphics rendering developer (me).
I made a feature request for per-model silhouette edges and perhaps in the future we will find a simpler way to implement it that makes it feasible.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/4420
Tom
On Mar 25, 2021, at 10:09 PM, Andre LB Ambrosio andre@ifsc.usp.br wrote:
Dear all,
I wonder if it's possible to display silhouettes selectively in the same figure; for instance, displaying silhouettes only on structure representation (around sticks, spheres, cartoons and so on), but not around the maps or volumes that surround them. Many thanks in advance,
Andre _
Hi Andre,
If you are willing to go to a little trouble you can get silhouettes on an atomic model beneath a transparent surface that has no silhouettes. You first save an image of the atomic model with silhouettes with no surface, then save an image of the transparent surface with no atomic model and no silhouettes, then overlay the second image on the first in a photo editor like Gimp. Below is Elaine's example done this way. The command to save the surface image with transparency for overlaying is "save transpsurf.png transparentBackground true".
Tom
Overlay of two images.
Atomic model image
Transparent surface image
On Mar 30, 2021, at 3:11 PM, Andre LB Ambrosio andre@ifsc.usp.br wrote:
Dear Elaine, that is excellent! It is the visual effect I was looking for indeed. Thank you very much for this and thank you Tom for the very detailed response and for the feature request ticket. Andre.
Em ter., 30 de mar. de 2021 às 15:59, Elaine Meng <meng@cgl.ucsf.edu mailto:meng@cgl.ucsf.edu> escreveu: Hi Andre, Sometimes you can approximately "fake" this effect by using the selection outline. It is not the same, however, as silhouettes; it will only go around the outside perimeter of the selected item(s). For example, if I have a molecule inside a map surface, I can make the surface transparent, select the atomic structure, and make the selection outline color black etc. as in these commands, resulting in the appearance in the attached image.
open 2gbp molmap protein 8 trans 70 view set bgColor white select @* graphics selection color black
I hope this helps, Elaine
Elaine C. Meng, Ph.D. UCSF Chimera(X) team Department of Pharmaceutical Chemistry University of California, San Francisco
On Mar 25, 2021, at 8:23 PM, Tom Goddard <goddard@sonic.net mailto:goddard@sonic.net> wrote:
Hi Andre,
It is not currently possible to display silhouettes on some models and not others.
Several people have wanted this but I think it is complex to achieve. The silhouettes show boundaries where the depth in the entire scene changes abruptly. In order to have per-model silhouettes the ChimeraX GPU shader programs would need to compute an additional depth buffer separately for each model. Also the silhouette edges are not currently drawn at a specific depth. If per-model silhouettes were supported a stick model with silhouettes beneath a transparent surface needs to draw the silhouettes under the transparent surface so knowing the depth of the silhouette edge becomes important. When not using silhouettes the shader programs need to not compute the extra per-model depth buffers otherwise it would slow down rendering even when not being used. Adding these additional complexities to already complex graphics rendering shader programs have so far made this feature out of reach for our one graphics rendering developer (me).
I made a feature request for per-model silhouette edges and perhaps in the future we will find a simpler way to implement it that makes it feasible.
https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/4420 https://www.rbvi.ucsf.edu/trac/ChimeraX/ticket/4420
Tom
On Mar 25, 2021, at 10:09 PM, Andre LB Ambrosio <andre@ifsc.usp.br mailto:andre@ifsc.usp.br> wrote:
Dear all,
I wonder if it's possible to display silhouettes selectively in the same figure; for instance, displaying silhouettes only on structure representation (around sticks, spheres, cartoons and so on), but not around the maps or volumes that surround them. Many thanks in advance,
Andre _
-- Andre LB Ambrosio Associate Professor, IFSC/USP - Brazil www.ifsc.usp.br/alba http://www.ifsc.usp.br/alba _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu mailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
participants (3)
-
Andre LB Ambrosio
-
Elaine Meng
-
Tom Goddard