Miguel, Oops, my mistake: You were on the right track: my Z scaling was exaggerated...I was mentally trying to achieve more precise depth buffering by using more Z bits, while forgetting that Z can't be scaled arbitrarily when you've got geometry with fixed Z dimensions...silly me!
That fixes the sphere intersection problem and also (to my surprise) greatly improves the surface quality -- presumably because the normals are now more correct. Here are two new comparison images in which I've fixed PyMOL's light source to match that of Jmol. Much better: http://delsci.com/jmol/pymol040104b.jpg http://delsci.com/jmol/jmol040104b.jpg The specular power is still mismatched but otherwise it looks as good as can be expected -- this can definitely work! As far as performace goes, this is a one-shot demo, so I don't have any sense of that yet. We'll need to for some code-level integration for that. However, it is clear to me that the existing JOGL-dependent PyMOL JNI extension will need some significant work in order to "if" or "#ifdef" out all the OpenGL call and then efficiently pass all the geometry back up to Java in an efficient manner (say for example, in a display list). Once that's done, PyMOL could simply feed a stream of integers that G3D or Jmol interprets as primitives for rendering. What fun! 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 . mailto:[EMAIL PROTECTED] > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Miguel > Sent: Tuesday, January 04, 2005 9:15 AM > To: [email protected] > Subject: Re: [Jmol-developers] PyMOL geometry in Jmol > > > > Miguel, > > > > Okay, with Sascha making it look so easy, I couldn't resist playing > > around with g3d a bit tonight in order to explore just how > feasible it > > would be to use PyMOL as an optional JNI extension to generate > > molecular geometry inside Jmol (or g3d). > > > > Here's what I've been able to accomplish in a few hours, simply by > > having PyMOL directly write out Java source code to message Jmol > > (contrived yes, but nevertheless a quick way to test the concept > > without creating any real glue). > > > >>From the original geometry in PyMOL... > > > > http://delsci.com/jmol/pymol040104.jpg > > > > The following can be obtained inside of Jmol (well, actually just > > org.jmol.g3d.Graphics3D inside a JPanel). > > > > http://delsci.com/jmol/jmol040104.jpg > > Very good! > > > No color yet, and the lighting is different, but otherwise it is > > remarkably close. However, the spheres aren't clipping each other > > quite right and the triangles are flat shaded. Questions: > > > > 1) I've set the slab and depth values to 1000 & 4000 respectively, > > which covers the full Z range of the scene, but still the spheres > > aren't intersecting one another correctly. The fillSphereCentered > > method is used to draw them one by one. If that's okay to > do, then what's missing? > > slab values in RasMol/Chiime/Jmol run from 100 to 0 > > 100'% visible, 0% visible > > > 2) Is there a way to provide a normal vector for each > triangle vertex? > > That's pretty much essential for HQ surface rendering. > Clearly Jmol > > can do smooth shading correctly with the ribbons, but unless I'm > > overlooking something obvious, that isn't possible right now for > > individual triangles. > > What's the outlook for this? > > There is currently no mechanism to handle this ... so don't > waste any time looking for it. > > I plan to implement some type of phong shading across the > faces of triangles some time with the next two weeks. > > I have been thinking about it for a few weeks and have a > high-performance design planned out. > > Q: How is performance? > > > By the way, when you said that g3d was clean and standalone...you > > weren't kidding! It took me just 15 minutes to get that first 3D > > sphere drawn in a simple Java app, sans OpenGL. Fantastic work! > > Excellent! > > > I've also discovered a convenient little coincidence: PyMOL's > > built-in ray tracer uses input geometry in almost exactly the same > > form as g3d. So while I am currently taking PyMOL ray tracing > > geometries into Jmol, the reverse should also be quite > easy: with just > > a few changes, PyMOL could be used as a photorealistic rendering > > engine for Jmol -- though of course only in cases where Jmol has > > access to native extensions, such as when running under WebStart. > > Very good. > > I must say that I am impressed and quite excited that you > were able to slap this quick-and-dirt-demo together so easily. > > > Cheers, > > Warren > > > > -- > > Warren L. DeLano, Ph.D. > > Principal Scientist > > This bodes well for potential collabaration between PyMOL and Jmol. > > Miguel > > > > > ------------------------------------------------------- > The SF.Net email is sponsored by: Beat the post-holiday blues > Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. > It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt > _______________________________________________ > Jmol-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/jmol-developers > ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
