From: Bram Stolk (bram++at++sara.nl)
Date: 05/08/2000 00:49:01
Hugh Fisher wrote:
>
> Vieri Di Paola wrote:
> >
> > 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.
15000 spheres is indeed too much of a burden for todays standards.
Personally, I would optimize this by using billboarded textures.
If you draw QUADs, with an image of a sphere with alpha channel
for the mask, you could draw your 15000 spheres using only 30000
triangles! Low enough for responsive fps numbers on an Onyx or GeForce.
The image will not look as good as real spheres due to less realistic
lighting and some spatial distortion. However, the billboarded spheres
will show no facets at all, whereas the real 3d spheres are probably
very low resolution to keep to polycount down. Also textures quads are
likely to be hw accelerated, whereas with the antialiased points you're
never sure: some PC based gfx cards do not accelerate lines/pts.
Bram
-- ------------------------------------------------------------------------------ Bram Stolk, VR Specialist. SARA Academic Computing Services Amsterdam, PO Box 94613, 1090 GP AMSTERDAM email: bram++at++sara.nl Phone +31-20-5923059 Fax +31-20-6683167"I heard if you play the NT-4.0-CD backwards, you get a satanic message." "Thats nothing, if you play it forward, it installs NT-4.0" ------------------------------------------------------------------------------
This archive was generated by hypermail 2b29 : Mon May 08 2000 - 00:49:10 PDT