Discussion:
[PyMOL] RE: wire mesh spheres?
Seth Harris
21 years ago
Permalink
Continuing on the transparency aspects of the original
question...
When I ray trace Warren's recent example of transparent
CGO's, it seems that of the objects behind a given
transparent one, only those that are fully opaque show
through the front one. That is, the spheres in the back
get blocked from showing through if they themselves have
any transparency setting. This gives a somewhat
inconsistent appearance as the front sphere, in this case,
will look selectively transparent or opaque in different
regions. In case the words aren't clear, I took the
example and put the blue sphere in front so that the other
three spheres, white, red, and green are all partially
hidden behind it, then do "ray". For me, only the white
sphere (which is opaque) shows through the blue one. I
think I had noticed this before, with non-CGO's too, so I
was curious if it's a known problem or has a fix?

I was going to test povray, but this reminded me that
sphere transparencies currently aren't passed on via
make_pov to the povray input script, but I know
transparencies are honored by make_pov for other types of
objects. Perhaps a simple fix to have sphere transparency
respected as well? Once I manually edit the povray file
to include the "transmit" keyword in the pigment line the
spheres do render as expected, with all three showing
through the front one regardless of each one's
transparency.

-Seth

Warren's sample cgo code:

from pymol.cgo import *
from pymol import cmd

obj = [

ALPHA, 1,
COLOR, 1.0, 1.0, 1.0,
SPHERE, 0.0, 0.0, 0.0, 0.5,

ALPHA, 0.66,
COLOR, 1.0, 0.0, 0.0,
SPHERE, 1.0, 0.0, 0.0, 0.5,

ALPHA, 0.33,
COLOR, 0.0, 1.0, 0.0,
SPHERE, 0.0, 1.0, 0.0, 0.5,

ALPHA, 0.11,
COLOR, 0.0, 0.0, 1.0,
SPHERE, 0.0, 0.0, 1.0, 0.5,
]

cmd.load_cgo(obj,'cgo01')
Michael George Lerner
21 years ago
Permalink
I think you're talking about the same thing I noticed .. if so, I asked
Warren about it and he said that it's on purpose; PyMOL only shows the
first transparent surface in order to make transparent protein surfaces
look less confusing/cluttered/distracting. If that's what you're seeing,
try

set ray_transparency, 1

and raytracing again.

-michael

--
This isn't a democracy;| _ |Michael Lerner
it's a cheer-ocracy. | ASCII ribbon campaign ( ) | Michigan
-Torrence, Bring It On| - against HTML email X | Biophysics
...
Warren DeLano
21 years ago
Permalink
Actually, the setting is

set transparency_mode = 1

It's a long story, but if you start using transparency a lot, you'll find
that there are times when you prefer not to see multiple layers of
transparent objects, such as convoluted surfaces, for the sake of clarity.
PyMOL defaults to that behavior. To change it so that all transparent
layers are visible, use the setting above.

Cheers,
Warren

--
Warren L. DeLano, Ph.D.
Principal Scientist

. DeLano Scientific LLC
. 400 Oyster Point Blvd., Suite 213
. South San Francisco, CA 94080
. Biz:(650)-872-0942 Tech:(650)-872-0834
. Fax:(650)-872-0273 Cell:(650)-346-1154
...
Michael George Lerner
21 years ago
Permalink
Post by Warren DeLano
Actually, the setting is
set transparency_mode = 1
oops! sorry!

-michael
...
Continue reading on narkive:
Loading...