DGPSL: a distributed graphics processing support ...

4 downloads 347 Views 274KB Size Report
SUPPORT LIBRARY FOR GRAPHICS AND IMAGE 0 ... to different machines with a remote shell. ... allel computer to accelerate the generation of image. There.
IEEE TENCON'93 / Beiinn

DGPSLt A DISTRIBUTED GRAPHICS PROCBSlNG SUPPORT LIBRARY FOR GRAPHICS AND IMAGE 0 Zhigeng PAN Zhiqiang LAO Wenting ZHENG Jiaoying SHI ( State Key Lab. of CAD&CG, Zhejiang Univ. , 310027 ,Hangzhou, P. R. china)

,AfKTRAcr In UIiS paper lue presetrt 0'2PSL(Lhtduted GTaphics Processing Sup@ Libra~y)which is me of major compotlerats of om air, b W graphics p r ~ ~ ~ ~support i t l genvironment. It is a faddy for impknmtinq graphics applications which TBpuire azperasive ampdins p m hiat is not am&& 011 ~hgkwA&&mt. The pper &scr&s in &tnil the techniques it& desiqnitcg and imp& mentiscg DGPSL. Keywwds, Distributed Graphics, Computing Paradigm, Graphics Library,Parallcl Ray Tracing,Parallel Radiosity

2. DESIGN CONSIDERATION AND CALLING MECHANISM

1. IhTRODUCTION The availability of high capacity local networks such as Ethernet has led to the provision of general computing facilities as clusten of workstation which share common resources such as file stores and printers. The average workstation is perhap only 30 % used during the course of a n o r m working day[']. Often these workstation are on network and so provide an enormous untapped resources of unused CPU time. How to use these resource to accelerate the generation of complex graphics is becoming an important problem for us. As we know,toda.y more and more graphics application fields need more storage and powerful computing power[*]. Therefore, in field of computing graphics many researches about distributed processing have been done. Many ViSC, multimedia and Virtual Reality systems are built on top of distributed computer system. apE['l is a scientific visualization toolkit from Ohio University. It exploits the remote shells feature of W. A simple mechanism is used to achieve a degree of distributed processing by directing a pipe to different machines with a remote shell. Ferold Blakows and et IC'] has designed a distributed chject- oriented sjrStem which supports distributed processing of multimedia information. VERNcsl is an object-oriented testbed for the interconnection of environment over a network of graphics workstation. It allows multiple participants to interact in an environment, sharing ideas and solving problems. To facilitate the design and implementation of distributed graphics application , we have implemented a distributed graphics 0 d

Ihu pro-

U wr-

processing support environment called DGPSEL8Jin 1992. An important component of DGPSE is its graphics library. The graphics library is referred as DGPSL which includes two kinds of library:sequential graphics library and parallel graphics library. The organization of this paper is as follows:Section 2 discusses the design consideration and DGPSL-s d i n g mechanism. Section 3 is about implementing techniques. Section 4 is conclusion.

by Natrand Natural SNnO

FWdatlon

P.R.(;hw(NOz69173313)

-201

2. 1 Related Works X and News['] put window system further into heterogeneous network,making window system be resource which can be shared over the network. Program running on any machine can access window system in the same network. In X and NeWS, the graphics support capability is not strong enough. Neither of them support 3D graphics. PEX[sl is an extension to the X Window System. It provides 3D graphics support in the X environment. DGL['I is a facility that allows a process on one workstation to use the graphics resources of any other IRIS- 4D Series workstation on the network. One important aspects of distributed system is its computing paradigm. There are several kinds of distributed computing paradigms : Client - Server, Master - Slave and Supervisor - Worker - Collector[*]. Client - Server paradigm has been widely used in distributed computing system. The famous X and N e w s window system provide Client-Server paradigm to users. The DGL is also based on Client -Server paradigm. Researches indicate that the Client -Server paradigm have some obvious limitation on i m p l s menting distributed systemC21.

2. 2 Design Consideration Interactive graphics application incorporating shaded renderings of 3D scenes are extremely demanding computation tasks. Ordinarily,these applications require dedicated use of expensive , special - purpose graphics hardware. Usually such graphics hardware is not available to common users. To tack this problem we use a network of computers as parallel computer to accelerate the generation of image. There

-

fore, distributed programming is required. But the programming on distributed system is far more difficult thanthat on single machine. To faclitate the development of distributed graphics application, we provide DGPSL in DGPSE It is implemented on a collection of general-purpose workstations. One of the machines on the network must have a graphics controller, which could be an inexpensive device with only 8 bits per pixel. An example of appropriate hardware is a collection of Sun 3 or Sun Sparc workstation, one with a color console ,connected by a 10M baud ethernet. On designing the DGPSL, the following goals are set: ( 1) Flexibility. The graphics library should not have any restriction on thedistributed computing paradigm which the application may employ. ( 2 ) Parallelism. Efficient use of distributed computer system require algorithm where the same computation is performed repeatedly or where separate tasks are performed with little or no coordination, and most computer graphics tasks fit these well. on the other hand, most graphics applications have an insatiable appetite for raw computational power,and parallelism is a good way to provide this power. To make the distributed graphics application support procedure-level parallelism[8] we provide a parallel graphics library. (3) Transparency By transparency we mean that the interface between the programmer and DGPSE is just like single machine Even though there are that on more than one workstation in the network, they n A 3 to specify the machines to execute the graphics function in DGp s ~ TO . do this ,an idle processor finding mechanism is im plemented. With this mechanism , the idle processors (or near idle pr-ors ) are found out and we use this Prto execute the graphics algorithm in pardel. 2.3 Call Mechanism DGPSL is a facility that allows a procesp on one machine to use graphics resources of other machine on the network It has four mapr parts : a calling interface linked with application program that serve as the API between DGPSL and programers. distributed graphics server which services requsest made by the user graphics program. . SGL in which there are a set of sequential graphics algorithms. PGL in which there are a set of parallel graphics Agorithns. into The calling interface convert the graphics library messages and send them to the distributed graphics server Over the Ethernet with the communication facility provided by underlying DGPSE environment. The distributed gramits server decode the messages, finding appropriate idle processors if necessary , calls the graphics routines in SGL or DGL to display the graphics on the specified raster subsys . tem. The whole call mechanism is shown in ~ i g 1.

The graphics rountines implemented in SGL and DGL include clipping, hidden-line and surface removal, 3D scan conversion:shading ,ray tracing , Radiosity. For example , if one need use ray tracing routine in SGL, he can use the call of the following form: , displaysgl-raytrace (scene-description-file .) processor-name,. If one need use the ray-tracing routine in DGL, the call may looks as follows : pgl-ray-trace (scene-description-file , display ) -processor-name,. The model supported in DGFSL is simple CSG and polyhedra exprresrion. Users may use either of them to describe the scene according to the format specified by DGPSL and call the graphics generation function in SGL and DGL. The display- processor-name above is used to specify the machine on which the generated picture is displayed.

.

....

.... .

3. IMPLFMFNTATION

3.1 Communication The communication facility of DGPSL is provided by the underlying environment DGPSE, we implement prcommunication by message passing. Every workstation on the network has a daemon providing communication services. This daemon is used to manage two mailbox, one is system mailbox, the other is user mailbox. while system mailbox is used to store mesages with explicitly specifid destinationprocessor and source processor, user mailbox is used to store messages with implicitly specified destination processor and source pr-or. Communication service daemon provide two basic primitive for system mailbox and user mailbox(GET and PUT) which are implemented as remote procedure. DGPSE provides another 11 functions to facilitate development of distributed .. ) . s s - ~ programs. They include q a - - a a l ( . ..

.

.

.

.

.

(...).~--(...),uar--sal(...),--~~(...),IM.-M(...), w-(...),**--(...). w-~(...),lcm-p” (. ),.Detailed information about these functions are includ-

..

ed in Reference k21 3 . 2 Idle Machine Finding Method To support the execution of graphics routine in parallel, we need first implement an algorithm for finding idle workstation (on near idle) in the network. The distributed graphics server keeps a processor information table which lists prsor information of each machine that the communication daemon is running. On each machine an internal list is created when the communication daemon is started to store current statemf the machine It contains entries such as prso01 genus and species , MIPS rating for each processor, presence or absence of floating-point accelerators ,and (if they are present ) their MFLOPS rating , presence or absence of graphics accelerator , and current load average. The communication daemon reports its current state to the distributed graphics server when its state changes , so as to keep the information in the procesror information up to date. when a call to PGL is made , the distributed graphics server choose one or more best fitted workstations from the

- 202 -

.

available pr-ors according to the availability policy. Of course , these chosen machine may communicate to each other. Finally the result is transmitted tb the local machine and the generated picture is displayed.

3.3 SGL and PGL The implementation of SGL is straight foreword , so it is omitted here. Below we first describe two kinds of space dethen compition methods used in our graphics library briefly describe the implementation of parallel version of two algorithm(ray tracing and radiosity ) which is compute expensive. (1) Two kinds of space decomposition To design parallel version of graphics algorithm, we first need partition the whole image-generated task. Two con mon methmh may be usxi in implmenling the graphics routines in PGL. One is image -space based subdivision, as shown in the left side of figure 2. The other is object-space based suMvision,as shown in the right side of figure 2.

.

on each processor) , and have each processor handle its own generated seconding rays. our parallel ray tracing algorithm is implemented on DGPSE running on the Sun SparcStation network. It use Supervisor-Worker-GUcctm paradigm to compute the image. The experiment result of the implemented pardel algorithm is promising[*]. ( 3 ) Parallel radiosity rendering Radiosity is an increasingly popular methd for determining global illumination for architectural models. The radiosity method is attractive to architects and interior designers bocause it accurately portrays illumination effects such as shadows and interreflections in diffuse environments , Unfortunately, using the original radidty algorithmq, the computation of the radiosity solution is far from interactive , with these algorithm , the entire O(N2) form factor matrix has to be generated and solved before the environment can be viewed. To reduce the execution time of radiosity dgorithm, we are implementing a parallel radidty alsorithm. The Supervisor -Worker -Collector paradigm is also used to implement the parallel radidty algorithm. But here the supervisor and the collector is the spne workstation. The sw pervisor do the tasks as follows : production the hemi-cube item-buffers while the worker do tasks as follows: conversion of hemi-cube item-buffers to form distribution of light energy factors shooting patch selection To partition the processing of item-buffers amass a number of processoIs,wedivide item-buffers into a large number of equal sized blocks. By the method presented abve,we hope the execution time of parallelradidty rendering on a network of workstations will be greatly "i.

. .

.

4. CONCLUSION

~ 2 1 I ~ d c a ~ s p o e l a a n p a l i a

(2) Parallel ray tracing algorithm Ray tracing produces fascinating images, but it need astonishing computation power. At the time it was invented it has been considered too expensive to be practical. Much work has been done to speed up ray tracing. In the original alge rithm over 95% of the time was spent calculating ray /ob pct interactions, leading to two basic speedup strategy: either reduce the number of intersection tests made, or speed up the testsCB3. An obvious way to speed up the intersection tests is to use parallelism to perform many ray test in parallel. In our parallel ray tracing algorithm, we divide up in space into 2D blocks and assigned each block to a different processor. Primary rays ( from the viewpoint through the screen ) is statically assigned to a specific processor , but secondary ( r s flected) rays will usually traverse space assigned to a different processor. To solve this problem we make the entire o b kCt database accessible to each processor (by making a copy

Compared with M ; L , X P S L has features as follows8 ( 1) more parallelism may be exploited 3 ( 2 ) supporting non graphics communication; ( 3 ) paradigm besides Client Server can be used. Currently the DGPSL is being implemented at State Key Lab. of CAD & CG ,Zhejiang University. Futures work includes extend it to heterogeneous network which consists of machines of various typescsuch as

HP,SGI,PC). We certainly don t' advocate purchasing a network of general-purpose computers to support applications such as interactive 3D graphics. However, such hardware is increasingly common,and our mthod allows that hardware to support demanding graphics applications that would otherwise r e quire additional, specialized graphim equipment. Ahcnr*dgmn@ 8

Tk &s

UUJ lo L h k

M* Xa,A&q

ZAwd d.

fm Up affmb U 6m-

in9 pmuddpribh. I EL.

REFERENCES:

-203-

[l] Rober1 D. Silmmm el al. " A Distributing Balchkg Pm Parall$ Rocessiag"Softwore-Ractice md &perinCS V d 1 9 ( 2 ) , 1 1 6 3 1174(&. 1989) [Z] migag PAN,J&+g SHI "DCPSE: A Eiatrtbnled &aphics F%ccssi.s Supprl Emvironmerl"R o d i a g e of Pird ICon-

- 204 -