Re: 15000 spheres

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 05/08/2000 02:20:38


Bram Stolk wrote:
>
> 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.

If the sphere's are bilboarded correctly there will be no spatial
distortion, the only issue will be intersections in z, and minor
lighting issues.

>
> 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"
> ------------------------------------------------------------------------------
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"In the middle of difficulty lies opportunity." --Albert Einstein


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon May 08 2000 - 02:21:53 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.