Discussion:
[PyMOL] transparency cross-fading
Andreas Forster
2007-04-10 11:12:04 UTC
Permalink
Hey all,

I've run into the following problem while making some movies with MacPyMOL
0.99rc6.

I have a protein in surface representation that I start with transparency =
0 and a cavity (voidoo-created map) as surface with transparency = 1. In
other words, the protein surface is visible, the cavity is not. When I
cross-fade the transparencies, like so:

for i in range (1, 41):
cmd.set ("transparency", i*0.025, "protein")
cmd.set ("transparency", 1-(0.016*i), "cavity")
cmd.ray
cmd.png ("fadeOut_%02d" %i)

the protein disappears and the cavity appears gracefully. However, those
parts of the cavity hidden behind a wall of protein don't fade in as the
protein surface disappears. They only appear when the protein surface
transparency has reached 1, and there is a sudden jerk between the
second-to-last and the last image created by above script as the cavity
becomes fully visible. I remember that this issue has come up before but
don't remember if there is a solution. Could someone enlighten me please?

Thanks.


Andreas
Harry M. Greenblatt
2007-04-10 13:52:50 UTC
Permalink
BS"D

Dear Andreas

I ran into a similar problem more than two years ago when I wanted
to fade one surface and bring in another one. *But*, I thought the
problem did not appear when you ray trace the image; are you implying
the problem exists even in the ray traced image? Below is the query I
I wanted to slowly fade in one surface while fading out
another. In other words, make one progressively less
transparent, while the other is made more transparent. It
turns out, unfortunately, that during the transition, the two
transparent surfaces affect each other adversely, and one
essentially blocks the other, even though they should be
transparent. This is shown on the second picture. The gray
surface is 20% transparent, and the salmon surface is 80%
transparent. The gray surface is fine by itself, but seems
"covered" in certain regions when the (mostly transparent)
salmon surface is present. In ray tracing, this seems not to
be a problem (see first picture...).
Harry,
You've hit a limitation with PyMOL's OpenGL renderer: it can't
currently do
a global Z-sort of all transparent triangles in a scene...just
within a
single object. This will be addressed eventually, but not soon.
Ray tracing with transparency_mode=1 is the only way to get proper
intersections of transparent surfaces.
Sorry!
Warren
Hey all,
I've run into the following problem while making some movies with
MacPyMOL 0.99rc6.
I have a protein in surface representation that I start with
transparency = 0 and a cavity (voidoo-created map) as surface with
transparency = 1. In other words, the protein surface is visible,
cmd.set ("transparency", i*0.025, "protein")
cmd.set ("transparency", 1-(0.016*i), "cavity")
cmd.ray
cmd.png ("fadeOut_%02d" %i)
the protein disappears and the cavity appears gracefully. However,
those parts of the cavity hidden behind a wall of protein don't
fade in as the protein surface disappears. They only appear when
the protein surface transparency has reached 1, and there is a
sudden jerk between the second-to-last and the last image created
by above script as the cavity becomes fully visible. I remember
that this issue has come up before but don't remember if there is a
solution. Could someone enlighten me please?
Thanks.
Andreas
----------------------------------------------------------------------
---
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to
share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?
page=join.php&p=sourceforge&CID=DEVDEV________________________________
_______________
PyMOL-users mailing list
https://lists.sourceforge.net/lists/listinfo/pymol-users
------------------------------------------------------------------------
-
Harry M. Greenblatt
Staff Scientist
Dept of Structural Biology ***@weizmann.ac.il
Weizmann Institute of Science Phone: 972-8-934-3625
Rehovot, 76100 Facsimile: 972-8-934-4159
Israel
DeLano Scientific
2007-04-10 14:27:20 UTC
Permalink
By default, PyMOL only shows the front-most transparent surface.

set transparency_mode, 1

and

ray

to reliably combine all transparent surfaces in all displayed objects.


DeLano Scientific LLC
Subscriber Support Services
mailto:***@delsci.info

"Not yet a PyMOL Subscriber, but want to support the project? Email
***@delsci.com to quote your lab, school, or employer. Thank you for
sponsoring this open-source endeavor!" -WLD



_____

From: pymol-users-***@lists.sourceforge.net
[mailto:pymol-users-***@lists.sourceforge.net] On Behalf Of Andreas
Forster
Sent: Tuesday, April 10, 2007 4:12 AM
To: pymol-***@lists.sourceforge.net
Subject: [PyMOL] transparency cross-fading


Hey all,

I've run into the following problem while making some movies with MacPyMOL
0.99rc6.

I have a protein in surface representation that I start with transparency =
0 and a cavity (voidoo-created map) as surface with transparency = 1. In
other words, the protein surface is visible, the cavity is not. When I
cross-fade the transparencies, like so:

for i in range (1, 41):
cmd.set ("transparency", i*0.025, "protein")
cmd.set ("transparency", 1-(0.016*i), "cavity")
cmd.ray
cmd.png ("fadeOut_%02d" %i)

the protein disappears and the cavity appears gracefully. However, those
parts of the cavity hidden behind a wall of protein don't fade in as the
protein surface disappears. They only appear when the protein surface
transparency has reached 1, and there is a sudden jerk between the
second-to-last and the last image created by above script as the cavity
becomes fully visible. I remember that this issue has come up before but
don't remember if there is a solution. Could someone enlighten me please?

Thanks.


Andreas

Loading...