[PyMOL] CGO shading

2004-03-25 Thread Gareth Stockwell
Hi there,

Does anyone know how to get CGO objects to be properly shaded?

For example, if I create two triangles which lie in perpendicular
planes...

obj = [

BEGIN, TRIANGLES,

COLOR, 1, 0, 0,
VERTEX, 0, 0, 0,
VERTEX, 1, 0, 0,
VERTEX, 1, 1, 0,

COLOR, 1, 0, 0,
VERTEX, 0, 0, 0,
VERTEX, 1, 0, 0,
VERTEX, 1, 0, 1,

END
]

cmd.load_cgo(obj,'triangles')


... the colour of both triangles looks identical, in either OpenGL or
ray-traced rendering.  

I want to use CGOs to create 'floor' and 'walls' as a backdrop to
ray-traced images, to give better perspective.  At the moment, I have to
manually set the shade of each wall in order to get it to look right.

Details of my setup:
  PyMOL version 0.95 beta, running on Linux
  GL_VENDOR: 2d3D, Inc
  GL_RENDERER: Mesa DRI Intel(R) 845G 20021115 
  GL_VERSION: 1.2 Mesa 4.0.4

Cheers,
Gareth


-- 
---
 Gareth Stockwell
 EMBL - European Bioinformatics Institute
 Wellcome Trust Genome Campus
 Hinxton
 Cambridge CB10 1SD gar...@ebi.ac.uk
 Tel 01223 492548   http://www.ebi.ac.uk/~gareth




RE: [PyMOL] CGO shading

2004-03-25 Thread Warren DeLano
Gareth,

You need to provide normal vectors too.  Otherwise OpenGL  the
raytracer won't be able to light them correctly.

Cheers,
Warren
 

 -Original Message-
 From: pymol-users-ad...@lists.sourceforge.net 
 [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
 Gareth Stockwell
 Sent: Thursday, March 25, 2004 10:04 AM
 To: pymol-users
 Subject: [PyMOL] CGO shading
 
 
 Hi there,
 
 Does anyone know how to get CGO objects to be properly shaded?
 
 For example, if I create two triangles which lie in 
 perpendicular planes...
 
 obj = [
 
 BEGIN, TRIANGLES,
 
 COLOR, 1, 0, 0,
 VERTEX, 0, 0, 0,
 VERTEX, 1, 0, 0,
 VERTEX, 1, 1, 0,
 
 COLOR, 1, 0, 0,
 VERTEX, 0, 0, 0,
 VERTEX, 1, 0, 0,
 VERTEX, 1, 0, 1,
 
 END
 ]
 
 cmd.load_cgo(obj,'triangles')
 
 
 ... the colour of both triangles looks identical, in either 
 OpenGL or ray-traced rendering.  
 
 I want to use CGOs to create 'floor' and 'walls' as a 
 backdrop to ray-traced images, to give better perspective.  
 At the moment, I have to manually set the shade of each wall 
 in order to get it to look right.
 
 Details of my setup:
   PyMOL version 0.95 beta, running on Linux
   GL_VENDOR: 2d3D, Inc
   GL_RENDERER: Mesa DRI Intel(R) 845G 20021115
   GL_VERSION: 1.2 Mesa 4.0.4
 
 Cheers,
 Gareth
 
 
 --
 --
 -
  Gareth Stockwell
  EMBL - European Bioinformatics Institute  Wellcome Trust 
 Genome Campus  Hinxton
  Cambridge CB10 1SD 
 gar...@ebi.ac.uk
  Tel 01223 492548   
 http://www.ebi.ac.uk/~gareth
 
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users