home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sgi / 18021 < prev    next >
Encoding:
Internet Message Format  |  1992-12-15  |  2.9 KB

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