Hi Sean, On Fri, 09 Jul 2010 11:05:09 -0400 Sean Law <magic...@hotmail.com> wrote:
> I have been tackling this problem (on and off) for quite some time now but > without any luck. I have been trying to create CGO triangles using the > following simple sample script: > > > ################################### > > from pymol.cgo import * > from math import * > from pymol import cmd > > def triangle (): > name="test"; > obj=[ BEGIN, TRIANGLES ] > obj.extend([COLOR,1.0,0.0,0.0,VERTEX,0.0,0.0,0.0]) > obj.extend([COLOR,1.0,0.0,0.0,VERTEX,2.0,0.0,0.0]) > obj.extend([COLOR,1.0,0.0,0.0,VERTEX,0.0,2.0,0.0]) > obj.extend([END]) > cmd.delete("test") > cmd.load_cgo(obj,"test") > > return > cmd.extend("triangle",triangle) > > ################################### > > > This creates a nice red triangle for me in the viewing window. However, > when I move it around and then ray trace the image, I end up getting either > a triangle with the original bright red color, a black triangle, or a dark > red triangle. What I'm looking for is to be able to get the same bright > red triangle no matter how I manipulate the object. I've tried playing > around with the "NORMAL" value but, if I recall correctly, ray tracing > produced a blank image. > > Any help or suggestion would be greatly appreciated. Thanks! I can't find any way to have a CGO object that is not "lit" in the normal sense especially when ray traced. When you leave out the NORMAL vector, then your triangle is fully lit no matter it's orientation, until you ray trace it. If you do include a normal vector then its brightness will vary with orientation both in normal viewing and when ray traced. You can at least avoid the problem of having one side completely black when ray traced by turning on two-sided lighting (in the "Display" menu). I guess this doesn't really answer your question, though! Cheers, Rob -- Robert L. Campbell, Ph.D. Senior Research Associate/Adjunct Assistant Professor Botterell Hall Rm 644 Department of Biochemistry, Queen's University, Kingston, ON K7L 3N6 Canada Tel: 613-533-6821 Fax: 613-533-2497 <robert.campb...@queensu.ca> http://pldserver1.biochem.queensu.ca/~rlc ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ PyMOL-users mailing list (PyMOL-users@lists.sourceforge.net) Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users Archives: http://www.mail-archive.com/pymol-users@lists.sourceforge.net