From: Hugh Fisher (Hugh.Fisher++at++act.cmis.CSIRO.AU)
Date: 05/07/2000 16:50:04
Vieri Di Paola wrote:
>
> Hello performer-list,
>
> I am a Biology student and wish to make a simple program for viewing pdb
> molecules. As a small project, I would
> like some information on the following matter. My project consists in
> drawing spheres for each atom. My problem is that I cannot find any help
> anywhere on the Internet that explains an algorithm for efficient >15000
> spheres drawing. I suppose "hidden" spheres (according to a
> certain view angle) shouldn't be drawn, etc... Does IRIS-performer provide
> an efficient algorithm for the "spatial" model representation of
> molecules?
> Can anybody tell me exactly where to look at in the "performer" source
> code examples?
> Or can anybody tell me where (if) I can find a simple, to-the-point
> tutorial that handles this rendering problem?
>
I happen to be working with PDB files and molecular models at
the moment.
Displaying 15,000 or more spheres at the same time is too much
for an O2 and a bit sluggish (couple of seconds redraw time)
even for our mighty Onyx.
If you only want to look at a few thousand atoms at a time,
you'll need to add some hierarchy to the scene graph so that
Performer can clip the spheres more efficiently. I think that
PDB files have pretty good spatial coherence, in that atoms
are listed next to the atoms they bond with, so you can cluster
them together into groups that can be culled.
The solution I used was to draw antialiased points. Set the
point size to 8, enable antialiasing in your graphics state,
and you get nice little circles. Obviously they are not lit,
so I added fog to the gstate for a depth cueing effect. Looks
good, especially in stereo.
Hope this helps - email me if you want to compare notes.
Hugh Fisher
ACSYS/CSIRO Virtual Environments Lab
This archive was generated by hypermail 2b29 : Sun May 07 2000 - 16:50:13 PDT