Seth Harris
21 years ago
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')
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')