[comp.graphics] making Hoops fast

carl (Carl Bass) (12/20/90)

From: hart@blackjack.dt.navy.mil (Michael Hart)
>> My question is:  Is this a good idea?  What is PHIGS?  (I 
>> believe it to be a graphics library that has been ported to
>> several different hardware families.  So flame me if I'm wrong :-)

>Good idea? Yes. Better than a proprietary interface? Yes.  Better than
>HOOPS? Probably depends on you portability vs. performance priorities.
>Although portability is a key goal of PHIGS there are many allowable
>differences between implementations, especially in initialization.  I've
>heard a lot of good things about HOOPS but it is hard to believe that
>Ithica can write code to drive the high end graphics devices as well
>the vendors.  If you are more focused on affordable graphics systems
>then Ithica could do a better job - since vendors tend to get carried
>away with the high end to the detriment of other graphics systems.

. . . sections deleted . . .

>-Jan "YON" Hardenbergh       jch@stardent.com            (508)-287-0100
>Stardent Computer, 6 N.E. Tech Center, 521 Virginia Rd, Concord, MA 01742

As one of the unidentified co-conspirators, I feel obliged to respond. One of 
the great misunderstandings about portable, device-independent graphics
libraries is that they are inherently slow. While I would be the first to 
agree that many graphics packages in the past sacrificed performance in 
order to achieve portability, my experience suggests that this does not 
have to be so.

Consider HOOPS running on an SGI workstation. Using the exagerratedly simple
cases that people often use to benchmark graphics (for example, the number 
of short random 3D lines that can be drawn in a second), HOOPS runs at about 
96% (a colleague attributes the remaining 4% to "heat") of the speed of the GL 
version of the same program. 

Although this has taken a large amount of work on our part, when you
look closely it is not very mysterious. Whether we are talking about HOOPS
driving GL, an application driving GL or a GL display list ( I have heard
rumors that the implementation of GL objects may change), there is a collection
of graphics data, primitives and attributes, that must be walked by the CPU 
and fed to the graphics pipeline. In any piece of software the efficiency
of this small portion of code (often a very tight loop) can be easily 
optimized and none of the three choices have a built-in advantage.The 
trick is mainly in being able to isolate a small portion of code that 
can be optimized on the particular machine. 

Having lauded HOOPS' abilities, let me point out that the shape of the 
segment hierarchy, the number of primitives per segment and the size of 
the tree influences (sometimes in not so obvious ways) the overall performance.

What is often sacrificed in using a package like HOOPS is the ability to have 
ultimate and exact control (similarly, it's very hard to precisely control the 
code your compiler generates). But it's possible for HOOPS to drive graphics 
hardware at close to its maximum speed, it just takes a lot of work on our part.

Carl Bass
Ithaca Software

uunet!ithaca!carl