home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!ames!sgi!fido!krypton!gavin
- From: gavin@krypton.asd.sgi.com (Gavin Bell)
- Newsgroups: comp.sys.sgi
- Subject: Re: Inventor Question
- Date: 15 Dec 1992 05:05:23 GMT
- Organization: Silicon Graphics, Inc. Mountain View, CA
- Lines: 50
- Message-ID: <1gjp2jINN8t9@fido.asd.sgi.com>
- References: <1992Dec14.204933.14551@erenj.com>
- NNTP-Posting-Host: krypton.asd.sgi.com
-
- In <1992Dec14.204933.14551@erenj.com> ram@ramsgi.erenj.com (ram rajagopalan) writes:
- >Hi,
- > I am trying to use Inventor to draw about 800 spheres. I find the
- > performance to be very slow. I am not sure why this is happening.
- > I am using transforms to position the sphere and scale the sphere
- > and then creating the node sphere. All these are done under a
- > separator node so that the transforms are not cumulated.
- > My question is this. Is there a better way of doing this to increase
- > performance. Thanks.
- >Ram Rajagopalan
-
- Some things to try:
-
- -- Put a complexity node at the top of your scene graph, and turn down
- the complexity (its default is 0.5). Inventor will then use fewer
- polygons to render your spheres.
-
- -- Make sure render caching is turned on at the separator node if you
- aren't changing the sphere's transformations or geometry. Viewers
- turn on caching automatically, but if you know what parts of your
- scene graph will change and what parts won't, you can do a better job
- of it by turning caching on and off at particular separators. Caching
- is particularly important at node (like spheres) that calculate their
- geometry on the fly; every time a sphere is traversed it recomputes
- its geometry (turn on caching to get the geometry saved!).
-
- -- It would be faster to 'flatten' your scene graph to pre-transform
- all of the geometry and get rid of all of the transformations. Every
- transformation sends GL commands to manipulate the GL's transformation
- matrix; the time used to do that could (potentially) be used to draw
- polygons. There is no easy way of doing this; with OpenGL's
- non-editable display lists, OpenGL display lists should be
- able to flatten out all of the GL transformation matrix commands
- (Inventor doesn't do this for you).
- The fastest scene graph would have one SoIndexedTriangleMesh that
- represented the polygons in all of your spheres, pre-transformed into
- world space. But eventually you will probably want to move or scale
- just one sphere, or show all of the spheres bouncing around (if they
- represent atoms in a chemical reaction or something...), or add new
- spheres, and flattening everything into one IndexedTriangleMesh will
- make those kinds of operations a lot harder.
-
- -- Inventor relies on GL, so don't do things that cause the GL to
- render things more slowly. Don't turn on texturing, don't use
- multiple light sources, don't use semi-transparent blended surfaces,
- etc (unless of course you really need to and can live with the
- performance hit).
-
- --
- --gavin (gavin@sgi.com, (415)390-1024)
-