WO1996019780A1 - Systeme de rendu d'un graphisme tridimensionnel - Google Patents

Systeme de rendu d'un graphisme tridimensionnel Download PDF

Info

Publication number
WO1996019780A1
WO1996019780A1 PCT/US1995/016423 US9516423W WO9619780A1 WO 1996019780 A1 WO1996019780 A1 WO 1996019780A1 US 9516423 W US9516423 W US 9516423W WO 9619780 A1 WO9619780 A1 WO 9619780A1
Authority
WO
WIPO (PCT)
Prior art keywords
renderer
quality control
rendering
scene
render
Prior art date
Application number
PCT/US1995/016423
Other languages
English (en)
Inventor
David Jevans
Philip J. Schneider
Original Assignee
Apple Computer, Inc.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Priority claimed from US08/362,118 external-priority patent/US5986667A/en
Priority claimed from US08/383,198 external-priority patent/US5561752A/en
Priority claimed from US08/482,016 external-priority patent/US5777621A/en
Application filed by Apple Computer, Inc. filed Critical Apple Computer, Inc.
Priority to GB9713246A priority Critical patent/GB2312818B/en
Priority to AU44714/96A priority patent/AU4471496A/en
Priority to JP51991596A priority patent/JP3763079B2/ja
Priority to DE19581872T priority patent/DE19581872B4/de
Publication of WO1996019780A1 publication Critical patent/WO1996019780A1/fr

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/005General purpose rendering architectures

Definitions

  • the invention relates to graphics rendering systems, and more particularly, to software tools for assisting graphics application developers.
  • Graphics rendering is the process of computing a two-dimensional image (or part of an image) from three-dimensional geometric forms.
  • An object is considered herein to be three-dimensional if its points are specified with at least three coordinates each (whether or not the object has any thickness in all three dimensions).
  • a renderer is a tool which performs graphics rendering operations in response to calls thereto. Some renderers are exclusively software, some are exclusively hardware, and some are implemented using a combination of both (e.g. software with hardware assist or acceleration). Renderers typically render scenes into a buffer which is subsequently output to the graphical output device, but it is possible for some renderers to write their two-dimensional output directly to the output device.
  • a graphics rendering system refers to all of the levels of processing between an application program and a graphical output device.
  • the graphics rendering system is coextensive with the renderer; that is, the renderer is called directly by the application program without any intervening layers of processing.
  • Graphics rendering systems typically feature an immediate mode interface or a retained mode interface to the application program.
  • An immediate mode interface is a truly procedural interface in which the application program specifies each geometric primitive to the graphics rendering system every time the image is to be rendered. The rendering system does not maintain a model database from scene-to-scene, although the application program may do so. Immediate mode interfaces are highly attractive for rendering scenes where the model is changing at each frame, such as for visualization of simulations, previewing of animation sequences, or reading a series of models from a file.
  • an immediate mode interface requires that the entire scene be transmitted via procedure calls to the renderer at each frame, resulting in high data bandwidth between application program and renderer.
  • the file format for a model is often simply a stream of drawing commands rather than the model itself, restricting its usefulness as a data interchange format.
  • Immediate mode interfaces are also less conducive to providing toolkit modeling functionality to the application program, and they usually preclude a user interface toolkit that operates on objects in the scene.
  • a retained mode system sometimes called a display list system
  • the graphics rendering system maintains a database representation of the three dimensional model.
  • the rendering system traverses the retained model database and draws it. This can be instigated by a single call by the application program to the graphics rendering system, instead of a stream of drawing calls describing the entire scene.
  • the application program edits or updates the model database and again asks the rendering system to render the scene.
  • the benefits of a retained mode system include reduced bandwidth between the application program and any hardware accelerator.
  • the file format of the model database also can be used easily as a data interchange format since it is not merely a list of procedure calls.
  • the existence of an object database also provides an additional way of implementing a user interface toolkit and modeling functionality.
  • Retained mode renderers can also cache rendering information and can also cache information for optimization of scene traversal.
  • retained mode rendering systems have a higher overhead for editing the scene database, and they restrict application program design by forcing the scene into a system-defined data structure, usually a hierarchy, thus requiring many application programs to maintain a duplicate copy of the model in their own format.
  • GLTM Silicon Graphics' GL is an immediate mode renderer used primarily for interactive graphics. GL is described in "Graphics Library Programming Guide,” Silicon Graphics Computer Systems, 1991, incorporated by reference herein. It was designed as an interface to Silicon Graphics IRIS rendering hardware and does not provide a file format, hard copy output, modeling capability, or user interface tools. GL supports simple display lists which are essentially macros for a sequence of GL commands. The GL routines perform rendering operations by issuing commands to the IRIS hardware.
  • StarBaseTM Hewlett-Packard's StarBase is an immediate mode system that is very similar to GL, sharing most of its features and disadvantages. StarBase is described in "Starbase Graphics Techniques, Hewlett-Packard Company," 1991, incorporated by reference herein. Numerous device drivers are available for StarBase for outputting the rendered (i.e. two- dimensional) scene on different graphics output devices ranging from plotters to high-end 3-D graphics work stations.
  • RenderManTM RenderMan, by Pixar, is an immediate mode system designed primarily to support high quality rendering. RenderMan is described in Steve Upstill, "The RenderMan Companion,” Addison-Wesley, Reading, MA, 1990, incorporated by reference herein. As described in Tony Apodaca, “RenderMan Interface Specification Version 4.0 Beta," January, 1992, incorporated by reference herein, recent versions of the RenderMan specification provide new routines that bracket the existing RenderMan calls and allow different renderers to be used. The renderer is specified with a single call prior to rendering the scene, and it affects the entire scene. See also Pixar, "Quick RenderMan Interface and Implementation Specification," 1992, incorporated herein by reference.
  • PHIGS PHIGS.
  • PHIGS is described in PHIGS Committee, A. van Dam, chair, "PHIGS Functional Description, Revision 3.0," Computer Graphics, 22(3), 1988, pp. 125-218, incorporated by reference herein, and is a descendent of GKS-3D, described in International Standards Organization, "International Standard Information Processing Systems Computer Graphics - Graphical Kernel System for Three Dimensions (GKS-3D) Functional Description," ISO Document Number 8805:1988 (E), American National Standards Institute, New York, 1968, incorporated by reference herein.
  • PHIGS was a committee-designed system for interactive 3-D graphics display. In PHIGS, the entire model database resides in a single hierarchy. Application programmers must learn a host of editing and hierarchy manipulation calls in order to effectively use the system.
  • PHIGS employs a single renderer that supports all the rendering modes specified available in PHIGS, and does not support alternative renderers for photorealism or other effects.
  • PEX is an extension to the X-Windows system, defined by a serial protocol (for transmitting data between an application program and the X-Windows system) and a set of semantics which were originally derived from PHIGS.
  • PEX has several available APIs, all of which support retained-mode, immediate-mode, and mixed-mode function calls for drawing, changing state, etc.
  • PEX is described in "PEX Protocol Specification, Version 5.0P-X Public Review Draft," 14 September, 1990, Massachusetts Institute of Technology, incorporated by reference herein.
  • HOOPSTM HOOPS, by Ithaca Software, is described in Garry Wiegand and Bob Covey, "HOOPS Reference Manual, Version 3.0," Ithaca Software, 1991, incorporated by reference herein. It is a retained mode 3-D graphics system, which organizes the model in a hierarchy whose nodes are accessed through textual strings in much the same way that files in the UNIX file system are referenced. Like PHIGS, HOOPS supports a single renderer. However, HOOPS provides more extensive scene editing functionality than PHIGS.
  • DORÉTM DORE, by Kubota, is an example of a 3-D graphics system with an object-oriented design. It is described in "Dor4 Programmer's Guide,” Release 5.0, Kubota Pacific Computer Inc., 1991, incorporated by reference herein. DORÉ was designed so that scene data is renderable by many kinds of renderers, rather than a single monolithic renderer as provided by PHIGS. Renderers cannot be added dynamically to DORE, however, as the rendering methods are built into the system. In DORÉ, the choice of renderers is specified by setting the current rendering style in the DORÉ "view object". DORÉ then also requires the application program to attach the model to the view object before rendering. This restricts DORÉ to utilizing only one renderer at a time.
  • DORÉ design considerations in DORÉ that also restrict it to using only one renderer at a time; for example, only one set of global variables is provided for maintaining the rendering state.
  • DORÉ is a retained mode system. To relieve much of the hassle associated with editing the model hierarchy and to facilitate dynamic databases and user interaction, DORÉ supports application callback objects, whereby an application program defines a function to be called when the callback object is encountered during scene traversal.
  • InventorTM is an object oriented 3-D graphics user interaction toolkit that sits on top of the GL graphics system. Like DORÉ, Inventor supports multiple renderers by having a renderer-specific "render” method for each object type. Inventor is a retained mode system with the entire scene residing in a "scene graph”. Inventor has render action objects that take a model as a parameter. The renderer is selected by the rendering action that is used when drawing the model. The render action draws the entire model by traversing the model and calling the appropriate rendering method for each object. The usual render action is the GL rendering mode. Inventor is described in Weraecke, "The Inventor Mentor", Addi ⁇ on- Wesley (1994), incorporated by reference herein.
  • Venolia “Facile 3D Direct Manipulation,” to appear in Proceedings of CHI '93, ACM/SIGCHI, Amsterdam, May, 1993; Venolia, “Automatic Alignment in Two and Three Dimensions,” submitted to SIGGRAPH '93; and Wanger, “The Effect of Shadow Quality on the Perception of Spatial Relationships in Computer Generate Imagery,” Proceedings of the 1992 Symposium on Interactive 3D Graphics, Cambridge, MA, 1992, pp. 3942.
  • an application program which permits interactive editing of a three-dimensional model may benefit by using a high-speed, low-quality wire frame renderer to draw intermediate versions on a display, and by using a high- quality, low-speed Z-buffer renderer to draw the final version on a printer.
  • the interchangeability of renderers is awkward at best using the rendering systems described above.
  • some of the above rendering systems do not support more than one renderer, while those which do, such as DORÉ and Inventor, bind the chosen renderer into the system configuration. Accordingly, there is a need for a graphics rendering system which provides increased flexibility to use different renderers for different purposes on the same three-dimensional model.
  • Simultaneous rendering of a model is desirable in a number of situations including simultaneous output of an image on both a display and a printer.
  • Simultaneous rendering would be desirable primarily in immediate mode systems, in which an application program draws an image by making a sequence of calls to the rendering system.
  • many application programs would be able to execute more efficiently by interspersing calls for one renderer with the sequence of calls for another renderer. Prior systems precluded such interspersed calling sequences.
  • Yet another problem with the above rendering systems is that those systems which supported more than one renderer, required all renderers to support at least the same geometries.
  • the Inventor rendering system could support only renderers which were able to render points, lines, and certain other predefined shapes. Simpler renderers could not be used with Inventor. More capable renderers could be used, as long as they support at least the full set of Inventor's geometric primitives, but they could not be added dynamically. The application program would have to be aware of these renderers a priori .
  • the above rendering systems did not permit "plug-in" rendering of more or less capable renderers, with automatic detection and utilization of the renderer' s features.
  • a multipass renderer is one which is designed to require multiple traversals of a scene database.
  • a renderer might be designed for multiple passes on the scene database. For example, there may not be enough memory to render the entire frame buffer if rendering at very high resolutions.
  • a renderer might then separate the frame buffer into strips and render each strip via a separate pass through the scene database.
  • the renderer may render to each device in a separate pass.
  • a renderer that implements progressive refinement may make multiple passes on the scene database, continually refining the final image until the process is stopped by a user action or the image is of highest quality.
  • Still other examples include high quality rendering algorithms involving accumulation buffers, involving using texture mapping to create shadowing and lighting effects, and involving two-pass global illumination techniques.
  • the application program In a retained mode system, the application program usually does not need to know whether the renderer requires more than one pass to complete its rendering. This is because the application program makes only one call to cause the renderer to render the model, and the renderer can make as many passes as it requires before returning to the application program.
  • the application program plays a part in traversing the model, making multiple calls to the renderer to accomplish a single traversal. Thus for a multipass renderer, the application program would need to know how many times to traverse the model in order to complete the scene. This would require the application program to have an intimate knowledge of the renderer, and essentially would make it very difficult to support interchangeable renderers.
  • substitution of one renderer for another provides only gross control over the speed/quality trade-off continuum. It would be desirable to permit an application program to sacrifice a little quality in order to gain a little speed, or vice versa. It would be desirable to provide a plurality of gradations on the speed/quality trade-off continuum so that a user or application program may select exactly the desired position in the tradeoff.
  • a graphics rendering system which allows retained-mode building and editing of a model, independently of the choice of renderer.
  • Application program calls to the rendering system to draw an object specify not only the object to draw, but also the renderer to use to do so.
  • the renderer is specified as part of a more inclusive "view object" which is identified to the rendering system through the API. In this manner, switching to a different renderer at any time during the building or editing of a model becomes a trivial task for the application program.
  • a graphics rendering system in which more than one renderer can be active simultaneously. In an embodiment, this is accomplished by storing the current state of rendering for each renderer in a respective "view object" (or objects) which the application program specifies when calling the rendering system to draw a three-dimensional object.
  • a graphics rendering system which is extensible to support dynamically registered renderers.
  • a graphics rendering system which automatically detects when geometries are not supported by a chosen renderer, and automatically decomposes such geometries into a plurality of objects of simpler geometry. Such automatic decomposition may be performed recursively until objects are reached whose geometries are supported by the chosen renderer.
  • a graphics rendering system which allows an application program to make immediate or retained mode calls to render a model, without needing to know how many passes the renderer requires to complete the scene.
  • the application program invokes the rendering subsystem to draw the model, and the rendering subsystem returns a flag (referred to herein as a re-traverse flag) indicating whether the rendering of the model is complete. If the flag indicates that rendering is not yet complete, the application program can again invoke the rendering subsystem to draw the model.
  • the calls to the rendering subsystem are placed inside a loop in the application program, which repeats until the re-traverse flag indicates completion.
  • the technique supports immediate and mixed mode rendering because the loop can contain many calls to the rendering subsystem, all made by the application program in traversing the model itself.
  • the application program repeats the same sequence of calls, thereby effectively re-traversing the model.
  • application program calls to the rendering system to draw an object specify not only the object to draw, but also the renderer to use to do so. In this manner, switching to a different renderer at any time during the building or editing of a model becomes a trivial task for the application program. Because of the re-traverse flag, the application program does not need to make any additional allowances depending on whether the new renderer requires multiple passes to complete a rendering.
  • a graphics rendering system in which more than one renderer can be active simultaneously. In an embodiment, this is accomplished by storing the current state of rendering for each renderer in a respective "view object" (or objects) which the application program specifies when calling the rendering system to draw a three-dimensional object. Again, the re-traverse flag obviates any necessity for the application program to make special allowances if one or more of the simultaneously active renderers require multiple passes to complete a rendering.
  • a graphics rendering system which is extensible to support dynamically registered renderers. Again, because of the re-traverse flag, there is no restriction that the newly registered renderers be single or multi-pass renderers.
  • a graphics rendering system to accomplish this includes a continuum, or collection, of quality control data groups, each of which contains a plurality of quality control type variables.
  • Each of the type variables contains a value which selects among a plurality of options in a respective trade-off between rendering quality and rendering speed.
  • each of the quality control data groups may include a quality control type variable for "level of detail"; those groups at the lower end of the quality continuum may have those variables set to "low", whereas data groups at the higher end of the continuum may have this variable set to "high” .
  • each of the quality control data groups is associated with a respective quality index.
  • an application program can select a point on the overall rendering speed/quality rendering trade-off, merely by selecting a quality control index value.
  • the application program can make the quality control index accessible to a user, for example in such an intuitive form as an iconic "quality knob" .
  • the quality knob may have a number of settings, for example, ranging from 0.0 to 1.0, each of which corresponds to a respective one of the quality control data groups.
  • Fig. 1 is a simplified block diagram of a computer system implementing the present invention
  • Fig. 2 illustrates a software architecture employing the invention
  • Fig. 3 is a flowchart illustrating the overall flow of a program using the invention
  • Fig. 4 is a detail of step 308 in Fig. 3; Figs. 5, 7, 9, 11 and 12 illustrate object data structures in memory;
  • Fig. 6 illustrates a class hierarchy used in an embodiment of the invention
  • Fig. 8 illustrates a model hierarchy created by an example program using the invention
  • Fig. 10 is a flowchart illustrating the creation of a new object in memory
  • Fig. 13 is a flowchart of an application program procedure to set up a quality collection
  • Fig. 14 is a flowchart of an application program procedure for obtaining a desired quality index
  • Fig. 15 is an illustration of a display icon
  • Fig. 16 is a flowchart of a procedure in a renderer.
  • Fig. 1 is a simplified block diagram of a computer system implementing the present invention. Although certain types of computer architectures might take better advantage of the invention than others, the invention can be implemented on virtually any type of architecture.
  • a CPU 102, a memory 104, and an I/O subsystem 106 are all connected to a bus 108.
  • the CPU 102 issues signals over the bus 108 for reading and writing to the memory 104 or to the I/O subsystem 106, in order to manipulate data in the manner described herein.
  • the CPU issues such signals in response to software instructions that it obtains from the memory 104.
  • the I/O subsystem 106 may also be capable of issuing signals over the bus 108 in order to access memory 104 in a particular embodiment.
  • the system can also include a graphics coprocessor 110, which can offload from the CPU 102 many of the memory-intensive tasks required for rendering an image.
  • the display illustrated in Fig. l as 114, is often driven by the I/O subsystem 106.
  • a graphics accelerator 112 is connected to the bus 108 and to the display 114.
  • the display buffer is typically held inside the graphics accelerator 112 which can not only write specific attributes (e.g. colors) to specific pixels of the display 114 as requested by CPU 102, but can also draw more complicated primitives on the display 114 under the command of CPU 102.
  • the invention is implemented in the present embodiment in the form of a set of software tools referred to herein as Escher.
  • These software tools include a set of software procedures and a set of header files which define the variable names and data structures used by the procedures.
  • Escher is provided to an application program developer on a storage medium such as a magnetic or optical disk or disks.
  • the storage medium contains source code for Escher, while in another embodiment, the storage medium contains compiled object code for Escher. In yet another embodiment, the storage medium contains some source code and some object code for Escher.
  • the application developer compiles an application program with Escher and with one or more renderers and stores the resulting object code on a storage medium.
  • the combined object code is later read into memory 104, either entirely or in an overlaid manner, and executed by the CPU 102.
  • Fig. 2 illustrates the logical position of Escher in a software architecture.
  • the Escher procedures 202 are disposed between an application program 204 and a plurality of renderers 206, 208 and 210. That is, the application program,.204 makes procedure calls to Escher procedures via an application program interface (API), and certain procedures within Escher (specifically, certain renderer invocation procedures 212) make procedure calls to the renderers 206 , 208 and 210.
  • API application program interface
  • the application program 204 when making calls to the renderer invocation procedures 212, specifies which renderer the renderer invocation procedures should use.
  • the renderers communicate with other hardware components 214 of the platform, such as a display buffer memory, a graphics coprocessor 110 if present, and/or a graphics accelerator 112, if present.
  • the Escher procedures in addition to the renderer invocation procedures 212, also include renderer installation procedures 216, quality control management procedures 217, model building and editing procedures 218, view building and editing procedures 220, and several other kinds of procedures (not shown) which are not pertinent to an understanding of the invention.
  • Fig. 3 is a flowchart illustrating the overall flow of an example program which uses the invention.
  • the application program 204 calls an Escher initialization procedure (not shown) which, among other things, installs one or more renderers using the renderer installation procedures 216.
  • Escher initialization procedure (not shown) which, among other things, installs one or more renderers using the renderer installation procedures 216.
  • One of the advantages of Escher is that a variety of different kinds of renderers can be installed, including renderers which were not available at the time the application program was compiled.
  • the application program calls the quality control management procedures 217 of Escher in order to build one or more "quality collection objects", each of which can contain one or more "quality group objects".
  • a quality group object is an object created by the Escher system according to a predefined data structure, which collects in one place a number of quality control criteria such as line style, type of shaders, type of illumination, level of detail, antialiasing level, and so on.
  • a step 304 the application program calls the view-building/editing procedures 220 of Escher in order to build one or more "view objects".
  • a view object is an object created by the Escher system according to a predefined data structure, which collects in one place a number of viewing criteria such as a camera position, illumination, a hardware destination ("draw context") into which a two-dimensional image is to be rendered, as well as a choice of renderers, among other things.
  • 304 can also include a call to an Escher procedure to select a quality group for use in the rendering process.
  • a model is represented in Escher as a hierarchy of one or more objects, each of which describes a geometry (shape), a material attribute (describing the appearance of a surface), a style (such as filled surfaces, edges only or points only), a transform (describing the relative position, orientation and size of three-dimensional objects with respect to world space), or a group (which merely contains further objects at the next level down in the hierarchy).
  • a "model" can constitute only a single object, such as a geometry object, without any hierarchically-defined sub- objects.
  • the application program calls the renderer invocation procedures 212 in order to have Escher render one or more of the models created by the application program, to one or more of the views defined by the application program.
  • the API for the rendered invocation procedures 212 includes both immediate-mode calls as well as retained-mode calls.
  • immediate-mode calls the application program passes in only non-hierarchical data structures to render.
  • the Escher system passes the structures immediately to the specified renderer, without caching any intermediate results.
  • the Escher system merely adjusts the current "state" of the view, thereby affecting the rendering of subsequently received geometries.
  • the object passed by the application program 204 can be an entire hierarchically defined model; the renderer invocation procedures 212 automatically traverse this model, making appropriate calls to the specified renderer at appropriate points in the traversal.
  • the application program 204 specifies to the renderer invocation procedures 212 both the object to render and a view object.
  • the current "state" of rendering is always maintained within the data structure of the view object, so the application program can render the same model to more than one view at the same time merely by interspersing calls which specify one view object and calls that specify another view object. These calls will not interfere with each other (unless, of course, both view objects designate the same draw context).
  • the two view objects could specify the same or different renderers, and the draw context specified in the view objects can be for output to the same or different kinds of output devices (such as two different windows on a single display, or one for a display and one for a printer).
  • the application program 204 can intermix immediate-mode calls and retained-mode calls for the same view, thereby allowing the application developer to optimize the storage and/or traversal of different parts of a scene differently.
  • the application program calls the renderer invocation procedures 212 specifying a first model and a first view object.
  • the application program calls the renderer invocation procedures specifying the first model and a second view object.
  • the application program calls the renderer invocation procedures specifying a second model and the first view object.
  • the application program calls the renderer invocation procedures specifying the second model and the second view object.
  • the application program calls the renderer invocation procedures specifying a third model and the first view object, and so on.
  • step 304 until after a model is prepared (step 306).
  • an application program might build a model, or part of a model, and allow a user to select a renderer only afterwards.
  • Choice of renderer can be made using, for example, a pop-up browse window which offers a number of already installed renderers, and which also offers the user an ability to install yet another renderer at that time.
  • the application program can then render the model (or models) using the chosen renderer, subsequently edit the model or build new ones, and/or change the choice of renderers, and render the model (s) again, and so on.
  • Such flexibility is made possible because the choice of renderer is not bound up in the model as it is being built, but rather, the application program specifies the renderer in its calls to the renderer invocation procedures 212 of Escher.
  • a simple C-language application program 204 is set forth in Appendix A hereto.
  • the program first calls the Escher initialization routine, which installs both a wire frame renderer and a Z-buffer renderer.
  • an application routine BxSetupQualityCollection() is called to set up and initialize a quality collection object. This procedure is described in more detail hereinafter.
  • a view object (“view") is created and a particular renderer (the wire frame renderer) is associated with the view.
  • a camera object and a draw context object are also associated with the view object.
  • the program then creates a model ("group") and adds in a polygon object (“polygon”), a line object ("line”), a transform object ("transform”) and a group object (“subGroup”).
  • the application program then adds torus object ("torus", a form of geometry object), to the group object.
  • a user-specified quality index is established for the view object and the model is traversed and rendered using the renderer specified in the view object.
  • the renderer specified in the view object is then changed to the Z-buffer type renderer, and the same model is rendered again using the renderer specified in the view object.
  • names that begin with the prefix Et are data types defined in the Escher source code.
  • Names that begin with the prefix sc are constants defined in the Escher source code.
  • Names that begin with the prefix Br are procedure names which are callable by the application program.
  • Names beginning with the prefix Bi are names of internal Escher procedures which are called only by other Escher procedures. Many of these have counterpart Br procedures which are called by the application program, and which essentially do nothing more than call the corresponding Bi procedure. For this reason, Br and Ei procedure names are used interchangeably herein.
  • names having the prefix Eg are global variables.
  • Escher routines begin with Bi or Br, and are followed by subwords which begin with capital letters.
  • BrFoo_DoSomething The form of most Escher procedure names as used herein is BrFoo_DoSomething, where FOO is the type of data that the function is to operate on and DoSomething is the operation which the routine is to perform on that kind of data.
  • FOO is the type of data that the function is to operate on
  • DoSomething is the operation which the routine is to perform on that kind of data.
  • ErPolygon_New a procedure to create a new polygon object.
  • Other naming conventions will be mentioned as they arise.
  • the installation of renderers for Escher uses a generalized extension mechanism which is also used for installing other extensions such as shaders.
  • Extensions for Macintosh implementations are files, stored in mass storage in the hardware of Fig. 1, with a data fork and a resource fork.
  • the data fork contains the code to be loaded by the Escher system, and the resource fork identifies the code fragments in the data fork.
  • the Escher system looks for all extension files in an extension folder on the computer system. All files that are found and that contain appropriate resource information are then considered available for use by the application program.
  • the extension file specifies an initialization routine, which takes all the necessary steps to "register" the services that it provides with the Escher system, as well as a termination routine.
  • Escher extensions are loaded into a generalized object hierarchy in the Escher runtime environment.
  • Escher' s object hierarchy has an "open" architecture which allows any application to "plug in” a subclass at any of several levels in the hierarchy.
  • Renderers are one of the object classes that may be subclassed.
  • An object in the Escher system is identified by two handles, namely an object class and an object type.
  • the object class is a pointer of type EtobjectClassPrivate, and the object type is a longword.
  • Escher stores object private data and object classes in a layered manner.
  • a subclass of the renderer class is abstractly laid out in the manner illustrated in Fig. 5.
  • Fig. 5 shows an object "class" 502, which is a contiguous region of memory containing pointers to all the methods associated with the renderer, in this case a wire frame (WF) renderer.
  • WF wire frame
  • the method tables 502 first list the methods associated with the object class (region 504). These methods include dispose object, duplicate object and unregister object, among other things. All object class method tables point to the same set of Escher procedures in these entries, unless these entries have been overridden on initialization by one of the descendant classes represented in a particular method table 502. The class 502 next contains a region 506, containing pointers to a set of methods appropriate for all objects in a "shared object” class.
  • Region 512 stores all of the data for an instance of class 502. This region is organized in the same manner as region 502. Specifically, it contains first all of the data which is appropriate to any instance of an object class in region 514, followed by all the data appropriate for any instance of a shared object class in region 516, followed by all the data appropriate for any instance of a renderer object in region 518. Unlike the class data 502, the instance data 512 also contains a region 520 containing all the data appropriate for an instance of a wire frame renderer object.
  • the object data in region 514 contains merely a pointer to the method tables 502, which are common for all instances of wire frame renderer objects.
  • the shared object data in region 516 contains a reference count, and the renderer object data in region 518 and the wire frame renderer data in region 520 are described hereinafter.
  • a second instance of an object in the wire frame renderer class has all its data contained in region 522, in the same format as the data of the first instance in region 512.
  • the object data in region 524 of this data points to the same object class method table 502 as does the object data for the first instance.
  • the second instance in Fig. 5 is provided only to illustrate the relationship between classes and instance data in Escher' s object mechanism. It is unlikely that more than one instance of a wire frame renderer in particular would ever coexist in a single instantiation of an application program, but this is not precluded.
  • Fig. 6 it can be seen that the stobject class is the parent class to all classes in the hierarchy.
  • the EtSharedObject class is subclassed under ⁇ tobject, as are other classes not here pertinent.
  • Subclassed under the EtSharedObject class is an EtShapeObject class, an EtRendererObject class, an BtSetObject class, an EtDrawContext class, an EtviewObject class, an EtQualityCollection Object Class and an EtQualityGroupObject class.
  • Subclassed under the Etshapeobject class are an EtStyleObject class, an EtTransformObject class, an EtCameraObject class, an EtLightObject class, an EtGeometryObject class, an EtGroupObject class, and an EtshaderObject class, and subclassed under the EtRendererObject class are a ZBuffer class and a WireFrame class.
  • Subclassed under the EtstyleObject class is a Backfacingstyle class, among others.
  • Subclassed under the EtTransformObject class are a Rotate class, a Scale class and a Translate class, among others not shown.
  • Subclassed under the EtGeometryObject class are classes for Line, Point, Polygon, PolyLine, Torus and Triangle objects, among others.
  • EtGroupObject class Subclassed under the EtGroupObject class are an EtLightGroup class, an EtInfoGroup class and an EtDisplayGroup class, the last of which has subclasses EtOrderedGroup and EtListGroup.
  • This class hierarchy describes the storage of method tables and instance data for each of the classes included in the hierarchy.
  • the classes at the ends of the hierarchy i.e. the "leaves" of the tree structures) are known as "leaf" classes.
  • Escher builds its method tables dynamically at system start-up time using an extensions mechanism. Every object class in the system, including renderer object classes, is "registered" under the control of the ErInitialize procedure called by the application program so that their functionality is available when required. As each extension is loaded, Escher obtains the address of the extension's initialization function from the resource fork of the extension file. It then invokes that function.
  • ErWF_Register a C-language initialization procedure, called ErWF_Register, used by the wire frame renderer extension.
  • a metahandler is a function which maps Escher method types to function pointers. Escher asks the metahandler function to give it a method of a certain type, and if the metahandler knows the method type, it returns its corresponding method. If the metahandler does not know the method type being asked for, it returns NULL.
  • the first step of BrWF_Register registers the new wire frame subclass by calling the renderer class's registration method BrRendererClass_Register procedure with an identification of the wire frame renderer's metahandler, ErWF_MetaHandler, as an argument.
  • the wire frame Tenderer's metahandler is as follows:
  • the Escher will call the metahandler once for each entry in its method table, each time requesting the identification of a different wire frame method.
  • the EtRendererObject class includes a method table for rendering geometric shapes. Every renderer must provide a method to render at least three basic geometry types: point, line and triangle. The renderer can provide methods for rendering more complex geometry types as well.
  • the wire frame BrWF_Register procedure above calls the renderer class procedure ErRendererClass_OverrideGeometryTypeDrawMethod to establish the geometry draw methods that it supports.
  • the wire frame renderer registers procedures for rendering geometries of type polygon, triangle, line, polyline (sequence of connected lines) and points, among others.
  • the ErWF_Register procedure also overrides certain transform methods and attribute set methods in a method table of the renderer class.
  • a view object is a data structure which contains, among other things, camera information, lighting information, traverser or state information as well as an indication of a choice of renderers.
  • a view object is an instance of the class EtViewObject which, as indicated in Fig. 6, is a subclass of the class EtSharedObject, which is itself a subclass under the class EtObject. Accordingly, following the format of Fig. 5, a view object has the format of Fig. 7 in memory. Specifically, a region of memory 702 is allocated to contain pointers to the methods of EtViewObject class, and this region 702 contains pointers 704 to object methods and pointers 706 to shared object methods.
  • the EtViewObject class is a leaf class, so in accordance with the Escher convention, the class omits a method table specifically for view object methods. Note also that in the present embodiment, there are no shared object methods either.
  • the structure also includes instance data for the view object in region 710 of memory.
  • This region contains instance data specific to the object class in a portion 712 (pointing to the object class 702), instance data specific to the shared object class in a portion 714 (containing a reference count), and instance data specific to the view object class in a portion 716.
  • the view object data is a data structure of type EtViewPrivate which is set out below.
  • a view object includes, among other things, a pointer (*rendererClass) to the methods of a current chosen renderer, a pointer (*renderer) to the instance data of the current renderer, a draw context object, a camera object, lighting objects (lights), several shader objects, and a quality group object.
  • the EtRendererPrivate structure is defined as follows:
  • This structure contains pointers to a series of stacks which indicate the current state of a traversal. As described in more detail below, these state stacks are pushed each time Escher's traverser opens a "group" object in a model and begins traversing the next level of the hierarchy. These stacks are popped up to the prior state when the traverser completes its work at all lower levels of the model hierarchy and closes a "group" object.
  • the EtRendererClass data structure is defined as follows:
  • the initialization procedure of the wire frame renderer set forth above establishes a metahandler which Escher can call to override certain methods of the renderer class. Escher places the pointers returned by the metahandler in the EtRendererClass structure fields defined above for the corresponding methods. It will also be recalled that the wire frame renderer initialization procedure overrides some methods, in particular certain geometry drawing methods, using a
  • ErRendererClass_OverrideGeometryTypeDrawMethod procedure This procedure writes the pointer to the specified renderer procedure into the method table pointed to by *geometryDrawMethods, thereby overriding default methods set up by the Escher system originally on initialization.
  • the EtMethodTable data structure is merely a list of pointers; for *geometryDrawMethods, each entry in the table points to the procedure for rendering a corresponding geometry type, for example point, line, triangle, etc. The correspondence between locations in this table and geometry types is fixed at compile time.
  • the geometryDrawMethod field contains a pointer a procedure which Escher will call if it has been asked to draw a geometry type which the current renderer does not support (i.e. the method table entry in *geometryDrawMethods for the geometry is NULL). That procedure decomposes the specified geometry into similar geometries as described in more detail hereinafter. In the present embodiment, the decomposition procedure cannot be overridden. In another embodiment of the invention, however, a renderer can override this decomposition method in order to optimize the process.
  • the EtQualityGroupObject structure is described hereinafter.
  • step 304 The process of building a view object in step 304
  • FIG. 3 is basically the process of writing desired information into the view object data structure.
  • the example application program in Appendix A will be used to illustrate the process.
  • a renderer can be attached to a view object by calling an Escher procedure Erview_setRenderer and passing in the view object and the renderer object. This call will increment the reference count of the renderer passed in. If a renderer object is already set, its reference count is decremented.
  • a renderer can also be set by renderer type without first having to obtain an instance of a renderer object.
  • the application program calls the Escher routine Erview_SetRendererByType, and this is the procedure which is called by the example program in Appendix A.
  • the parameters passed to this procedure are the view object and a type designation, which is a four- character code designating a type of renderer (for example, wire frame or Z-buffer).
  • the Escher procedure Erview_setRendererByType determines what renderer has been registered of the type specified and if such a renderer has been registered, writes a pointer to the renderer instance data into the appropriate entry of the specified view object.
  • a camera object Before setting the camera, a camera object must be created and initialized.
  • the example program in Appendix A accomplishes this by writing the camera perspective data into an appropriate perspectiveData data structure and assigning it to a camera object using the Escher procedure ErviewAngleAspectCamera_NewData.
  • ErviewAngleAspectCamera_NewData Once a camera object is obtained, it can be associated with the view object by calling Erview_SetCamera passing in the view object and the camera object. This call will increment the reference count of the camera object passed in. If the camera object was already set, its reference count will be decremented.
  • the example program in Appendix A then disposes of the camera object using the Escher function ErObject_Dispose since the camera object is no longer separately needed.
  • a draw context object Before setting the draw context, a draw context object must be created and initialized. In the example program in Appendix A, this is accomplished by setting up an appropriate data structure pixmapData and passing it to the Escher procedure ErPixmapDrawContext_NewData. The draw context object is then associated with the view object using the call Erview_setDrawContext and passing in the view object and the draw context object. The application program example in Appendix A then disposes of the draw context object by passing it to the Escher function ErObject_Dispose.
  • the modeling paradigm used in Escher can be best understood by comparison to the modeling paradigms used in two existing products available from Apple Computer:
  • QuickDraw and QuickDraw GX are described in Apple Computer, "QuickDraw GX Programmer's Overview"
  • QuickDraw and QuickDraw GX perform two-dimensional graphics processing rather than three-dimensional processing.
  • the QuickDraw two dimensional graphics system features a procedural interface and a global graphics state which defines the color, transfer mode and pattern of the shapes that it draws.
  • QuickDraw shape drawing routines When the QuickDraw shape drawing routines are called, QuickDraw draws the shape according to the variables in its graphics state.
  • An application program can manipulate the graphics state through the use of other calls to QuickDraw.
  • QuickDraw GX differs from QuickDraw in that rather than a procedural interface with a system-maintained graphics state, shapes are represented as objects that encapsulate all information needed to draw them. There is no system-maintained graphics state. Because shapes are objects, QuickDraw GX can provide utilities to operate on such shapes that QuickDraw cannot, because QuickDraw's routines only draw images to a pixel map. QuickDrawGX provides functionality to operate on shapes, such as "hit" testing and geometric intersection.
  • the main data type in QuickDraw GX is a "shape", which encapsulates geometry and other drawing information. Shapes are drawn through a “view port” which transforms the shapes into “view device” coordinates. When a shape is passed to QuickDraw GX for drawing, the shape is drawn through each view port that is attached to the shape. A view port may overlap several view devices, in which case the shape is drawn to each view device at its correct resolution.
  • QuickDraw GX shapes can be organized into hierarchies through the use of the "picture shape". Each shape has a "type” associated with it that indicates whether it is a line, polygon, curve, etc. Access to shapes is through a procedural interface and handle.
  • QuickDraw GX's shape drawing procedure can be called at any time to draw a shape.
  • the ordering of shapes being drawn on top of each other is dependent on the order in which they are drawn. No state information is retained between drawing commands, except for internal caching information, since each shape encapsulates all the information needed to draw that shape including the view port, view device, color, transfer mode and drawing style.
  • the Escher system differs significantly from QuickDraw and QuickDraw GX due to the nature of three-dimensional rendering algorithms and the typically larger volumes of data required to describe a three-dimensional model.
  • Escher shapes do not encapsulate all information required to draw themselves. Rather, Escher maintains a "state" that provides additional information on how a shape is to be rendered, much as the original QuickDraw maintains a drawing state for the foreground color in the graphics port.
  • Escher' s state mechanism allows hierarchical models to be built which specify information such as color or drawing style that is inherited by shapes at lower levels of the hierarchy. The mechanism provides increased flexibility in instancing a model to be used several times in a scene but with varying attributes without respecifying the geometry.
  • Escher also differs from QuickDraw GX in that the drawing area for rendering is specified in Escher prior to the rendering of the image, through attachment to a view object, rather than being attached to every shape as in QuickDraw GX.
  • Escher provides several data types to encapsulate geometry and appearance in a model hierarchy.
  • the general classes of data types are geometry, "attribute set", style, transform and group. It is advantageous to separate appearance into several types of data in this manner due to the typical complexity of three- dimensional models. Even simple three-dimensional shapes may require hundreds or thousands of geometric shapes in order to produce any semblance of realism. To create a realistic-appearing scene of any complexity, such as a room in a house, may require hundreds of thousands or even millions of geometric shapes. When dealing with models of this magnitude, it is often advantageous to apply a single appearance characteristic to a large group of geometric shapes, thereby saving memory and simplifying the building and editing of such a model. The above data types facilitate these goals.
  • transform mappings of a "picture shape” are considered concatenated with those of the shapes that they encompass. This provides a means of referencing the same shape more than once, and using transform mappings to move or transform the shape without having a second copy of it stored in memory. Such concatenation is accomplished in QuickDraw GX through a state mechanism which keeps a record of the "current transformation mapping" as a model hierarchy is traversed.
  • GX picture hierarchies are traversed from top to bottom, left to right. As shapes lower in the hierarchy are traversed, their transform mappings are concatenated with the current transform mapping. After all shapes inside a picture shape have been drawn, the traversal returns to the previous picture, if any, and resumes traversal of its shapes. This is called “top-down traversal”. When returning from a traversal, the current transformation mapping is restored to what it was before the picture shape was entered. This mechanism can be thought of as stack of mappings that is pushed and popped during traversal . When the root picture shape is finished drawing, the current mapping is NULL. Escher provides a similar traversal mechanism, although due to increased complexity of three-dimensional models, more than merely a transform mapping is inherited. Appearances and styles are inherited as well.
  • Fig. 8 is a graph of a simple model hierarchy which is built by the example application program in Appendix A. It includes two levels, the first (root) level encapsulated by the BtDispiayGroupObject called "group” and the second encapsulated by the BtDispiayGroupObject called "subGroup”. Each EtDisplayGroupObject can be thought of as a node in the hierarchy. Each node can have associated therewith style objects, geometry objects, transform objects and other group objects (as in Fig. 8), as well as shader objects and attributes set objects.
  • Escher supports two kinds of EtDisplayGroupObjects, namely those in the subclass EtorderedGroup and EtListGroup. Objects attached to an instance in the EtListGroup class have no order except the order in which they were added to the group.
  • EtDisplayGroupObjects namely those in the subclass EtorderedGroup and EtListGroup. Objects attached to an instance in the EtListGroup class have no order except the order in which they were added to the group.
  • each object in the list is processed ("executed") in the sequence in which it was added to the group originally.
  • Escher will execute backfacingstyle, then polygon, then line, then transform, then subGroup, in that sequence, since that was the sequence with which they were added to group.
  • the Escher API includes calls which permit the application program to add objects to the beginning of the list, to the end of the list, or between objects already on the list.
  • a group object of subclass EtorderedGroup is similar to a list group object, except that the traverser sorts the object attached to a group according to type before they are executed.
  • objects are executed in the following sequence: transform objects, style objects, attribute set objects, shaders, geometries and additional groups.
  • the then-current state of the renderer is inherited.
  • Objects in the subgroup can change any characteristic of the state for subsequently executed objects in the subgroup (or in subgroups of the subgroup), but upon return to the parent group, the state is restored to its condition before the traverser entered the subgroup.
  • Group objects also have a "state” associated with them, although this is not to be confused with the "state” of the traverser.
  • the state of a group is merely a collection of flags that define aspects of how the group is to behave. Most of the flags are not important for an understanding of the present invention, but it may be helpful to understand one such flag, namely "in-line”.
  • the application program can set the "in-line" flag of the group object, thereby specifying that entry to the group and exit from the group are not to push or pop the state of the traverser.
  • the Escher API provides procedure calls to set, clear and get the current value of this flag.
  • the groups group and subGroup are ordered display group objects. They have a type EtDisplayGroup, which in the class hierarchy of Fig. 6, has a class ancestry of EtGroupObject, EtShapeObject, EtSharedObject, and ultimately Etobject. Accordingly, they are represented in memory with data structures as shown in Fig. 9. Specifically, the ordered display group class method table is contained in a block of memory 902, and the instance data for group and subGroup are contained in blocks 904 and 906, respectively.
  • the ordered display group class 902 begins with the region 908 containing pointers to object methods, similarly to region 504 in Fig. 5. Region 908 is followed by region 910, which contains pointers to all methods specific to shared objects (there are none in the present embodiment).
  • EtGroupciass has the following typedef:
  • it includes entries for pointers to several methods, including, among other things, a method to add an object to the end of the group (add) , and methods to add an object at a specific location within the list of objects already assigned to a group (addBefore and addAfter).
  • the ordered display group class method table 902 contains pointers to the methods specific to display groups in a region 916.
  • This data structure, EtDispiayGroupCiass is defined as follows:
  • EtDisplayGroupClass The methods in the EtDisplayGroupClass are not pertinent to an understanding of the invention, except to note that the class does not contain pointers to any drawing methods. As previously explained, these methods are identified in a view object rather than a group object, so that they can be overridden by a renderer. Any drawing method which is identified in the class for an object would become part of the model being built, would become intertwined with the model itself, and would be difficult to change when an application program desires to render the model using a different renderer. Such an arrangement would also make it difficult to have more than one renderer active simultaneously as previously described.
  • the table 902 contains no methods specific to ordered display groups.
  • the data structure of the instance data for subGroup is the same for that of group, so only the data structure for group will be described.
  • the block 904 begins with object data in region 920, specifically a pointer to the ordered display group class block 902. This is followed by a region 922, containing the shared object data, specifically a reference count. This is followed by a region 924, containing the shape object data (which is also very short) .
  • the shape object data region 924 is followed by a region 926 containing the object data for group objects, of which there is none in the present embodiment.
  • the region 926 is followed by a region 928 containing the instance data for display group objects. Such data includes only the "state" flags described above. Region 928 is followed by a region 930, which contains the data specific to an instance of an ordered display group object. This data has a format defined as follows, where BtDLList is a typedef for a doubly linked list:
  • the region 930 contains pointers to six doubly linked lists, one for each of the types of objects which can be added to a display group object.
  • region 930 which would have a structure defined as EtListDispiayGroupPrivate, would contain only a pointer to a single doubly linked list for all the objects which are added to the display group.
  • the example application program in Appendix A also uses an BtStyleObject data structure, an EtGeometryOject data structure, and an EtTransformObject data structure.
  • EtGroupObject are subclassed from the EtshapeObject class (see Fig. 6).
  • EtGroupObject is subclassed from the EtshapeObject class (see Fig. 6).
  • EtGroupObject is subclassed from the EtshapeObject class (see Fig. 6).
  • EtGroupObject As with other objects described herein, they each refer to a method table like 902 in Fig. 9, and contain private instance data, like region 904 or 906 in Fig. 9.
  • the leaf class (Backfacingstyle) actually used in the example program in the BtstyleObject class is a subclass of the BtstyleObject class, so the fourth and last layer of the class methods for that object will contain pointers to the methods specific to style objects.
  • the fourth layer of the instance data contains private data appropriate to all style objects, if any, and the fifth and last layer contains data appropriate to backfacing style objects.
  • the leaf class (translate) actually used in the example program in the EtTransformObject class is a subclass of the EtTransformObject class (see Fig. 6), so the fourth and last layer of the class methods for the transform object contains pointers to methods specifically for transform objects.
  • the fourth layer of instance data for the transform object contains data specific to transform objects, and the fifth and last layer contains data specific to translate transform objects.
  • the example program creates three objects (polygon, line, torus) which are geometry objects, and all of them are in leaf classes which are subclasses of the BtGeometryObject class (see Fig. 6).
  • the fourth and last layer of the class method table for each of these objects contains pointers to methods specifically for geometry objects.
  • the fourth layer of the instance data for each of these objects contains data specifically for any geometry object, and the fifth and last layer of the instance data for each of these objects contains data specifically for polygon, line and torus objects, respectively.
  • style objects tell a renderer how to draw a geometric shape. For example, a polygon can be rendered as a solid filled shape, or with its edges only. Another example is that surfaces can be rendered smoothly or with a faceted appearance. Yet another example, indicated by a backfacing style object (subclass of BtstyleObject), determines whether or not shapes that face away from the camera are to be displayed. EcBackfacingStyle_RemoveBackfacing, the characteristic used in the example program in Appendix A, specifies that shapes that face away from the camera are not to be drawn.
  • the private data for a backfacing style object contains a longword which contains a constant indicating whether both front and backfacing surfaces are to be drawn, whether backfacing surfaces are to be removed, or whether backfacing surfaces that do not have two-sided attributes are to have their normals flipped so that they always face toward the camera.
  • An application program specifies style characteristics in a model by creating an appropriate style object and adding it at a desired position in a group object of the model.
  • the private data in the last layer of instance data contains information necessary to describe a particular geometry.
  • the private data in the last layer of a polygon object specifies the number of vertices, the vertices and certain attributes not here relevant.
  • the private data in the last layer of a line object contains the locations of the two end points of the line, as well as some attribute data, and the private data in the last layer of a torus object contains an origin, an orientation, a major radius and a minor radius, as well as some attribute data.
  • a transform, object allows the coordinate system containing geometric shapes to be changed, thereby allowing objects to be positioned and oriented in space. Transforms are useful because they do not alter the geometric representation of objects (the vertices or other data that describe the shape), rather they are applied as matrices at rendering time, temporarily "moving" an object in space. This allows a single object to be referenced multiple times with different transformations in a model, providing the ability to have an object placed in many different locations within a scene.
  • An application program specifies a transform by creating an appropriate transform object, from a subclass of the BtTransfoxmObject class (Fig. 6), and adding it at an appropriate position in an appropriate group in a model.
  • a transform specified by an application program remains in the form specified until the time of rendering, at which point Escher converts the transformation to a temporary matrix that is applied to subsequent objects in the group.
  • Matrices are pre- multiplied to vectors of an object.
  • Escher transformations pre-multiply the current transformation matrix; therefore, application programs specify transformations that are to be concatenated in reverse order. This is consistent with the application of matrices in a hierarchy. That is, matrices that are specified at the top of the hierarchy are applied last, and matrices specified just prior to an object are applied first.
  • Escher supports a number of different kinds of transforms, each of which is specified to Escher by using an object from a respective subclass of BtTransformObject. Three such subclasses are illustrated in Fig. 6 (Rotate, Scale and Translate).
  • the Escher API provides procedures for creating and disposing of transform objects, drawing them in immediate mode, setting their contents to new data, getting the private data of a transform object, writing a transform object to a file, and so on.
  • the private data in the lowest layer of instance data for a translate transform object which is the leaf class used in the example program in Appendix A, specifies the x, y and z coordinates of translation.
  • the example application program begins building the model of group 802 by first creating the new ordered display group
  • Escher's object creation mechanism is a recursive mechanism which is illustrated generally in the flowchart of Fig. 10. Note that the class method table for the ordered display group class was created during initialization upon registration of the ordered display group class, so only a block of instance data needs to be created and initialized in the new object mechanism.
  • the leaf class's 'New' procedure calls its parent class 'New' procedure with: (a) the static variable which, when the leaf class was registered, points to the top of that leaf class's method table, and (b) the size of the leaf class's Private data structure.
  • each higher class's 'New' procedure then calls its respective parent class's 'New' procedure with: (a) the object class pointer passed to it, and (b) the size needed by all descendent classes so far plus the size needed by the current class's private data structure.
  • a step 1006 the ultimate parent class's 'New' procedure (EiObject_New()) (a) allocates memory space for the private data structures needed for its own Private data plus the Private data for all descendent classes. This space will contain the entire block of instance data for the newly created object. It then (b) initializes its own Private data structure (by writing the Object Class pointer passed to it into the top of the newly allocated memory block), and (c) returns to its caller (which is the next lower class's 'New' procedure), returning a pointer to the newly allocated memory block.
  • each lower class's 'New' procedure then: (a) calls its own Get procedure to get a pointer to the current class's own private data structure within the newly allocated instance data block; (b) initializes its own Private data structure; and (c) returns to its caller (which is the next lower class's 'New' procedure), returning a pointer to the newly allocated memory block.
  • the Leaf class's 'New' procedure does the same, except that the caller is typically the application program rather than a subclass's 'New' procedure.
  • the 'New' procedure for an ordered display group object which is the routine called by the application program, is as follows:
  • this routine first calls the 'New' procedure of its parent class, EiDisplayGroup_New() with the pointer to the ordered display group class method tables EgOrderedDisplayGroupClass and the size of the private data structure BtOrderedDisplayGroupPrivate needed in the lowest layer of the instance data for the object being created.
  • the EiOrderedDisplayGroup_New() procedure gets a pointer (ordered) to the ordered display group private data structure of the allocated block, and initializes all of the doubly linked lists to NULL. The procedure then returns to the application program, returning the pointer to the newly created instance data block.
  • the 'New' procedure of the display group class is as follows:
  • this procedure first calls its own parent class ' s ' New' procedure EiGroup_New, passing the pointer to the object class and a data size given by the size of private data needed by the parent class plus the amount of memory space needed for the private data of objects in the group class (EtDisplayGroupPrivate) .
  • EiDispiayGroup_Nsw() gets a pointer groupPrivate to the group obj ect ' s private data and initializes it .
  • the procedure then returns to its caller, BiOrderedDisplayGroup_New () .
  • the above procedure follows the same outline as the 'New' procedures for the display group class and the ordered display group class, with the variation that there is no private data specifically for the class EtGroupObject.
  • the EiGroup_New() procedure does not initialize any private data, and the data size which it passes to the 'New' procedure of the parent class, siShape_New() , is the same as the data size which is passed by the display group class's 'New' procedure to
  • Escher uses the same recursive mechanism to create objects in every class of the class hierarchy. Moreover, it will be appreciated that Escher uses similar recursive techniques to perform the functions of a large number of the Escher API calls.
  • the example program creates a polygon object polygon using the Escher procedure ErPolygon_New() .
  • This procedure operates similarly to the 'New' procedures described above with respect to the creation of an ordered display group object, and need not be described again.
  • the example program then adds polygon to group using the Escher API call ErGroup_AddObject() .
  • the latter procedure is as follows:
  • this procedure receives as arguments the object to add to the group, and the group to which it is to be added.
  • the procedure calls EiGroup_AcceptObject(), an Escher procedure, in order to determine whether the specified object is of a type which can be added to the specified kind of group object. For example, if the specified object is a light object, it cannot be added to an ordered display group. In the present case, the result is valid, since a polygon can be added to an EtOrderedDisplayGroup object.
  • the procedure then obtains a pointer groupClass to the EtGroupObject class method table for the specified ordered display group object, by calling the "get subclass methods" procedure of EtGroupObject's parent class, EtshapeObject.
  • the procedure than calls the "add object” procedure pointed to in that method table and returns to the application program.
  • the pointer in the method table to the "add object" procedure for the specified kind of group object was written there during initialization when the EtorderedGroup class registered itself.
  • the specified "add object” procedure is as follows:
  • the procedure first uses the ordered display group class's "get" procedure to obtain a pointer groupData to the private data of the specified ordered display group object.
  • the procedure then obtains the type of the specified object to add (which is a geometry object) and, after some error Checking, calls BiOrderedDisplayGroup_GetObjectList() to obtain a pointer, theList, to the particular doubly linked list of the ordered display group object for geometry objects.
  • the procedure calls BiGroupPosition_New() to create a new list "position" object, and calls EiDLList_insertNodeLast() to insert the new "position" object at the end of the doubly linked list.
  • the procedure then returns to its caller, EiGroup_AddObject().
  • Escher's API also includes procedures to add an object after a specified position in the list of the group, add an object before a specified position in a list of the group, remove an object from a specified position in a list of the group, iterate forward and backward through a list of the group, as well as other procedures.
  • the example program in Appendix A next creates a new line object line, adds it to the ordered display group object group, and then "disposes" of the line object line.
  • the Escher procedure calls to accomplish this are similar to those described above with respect to the polygon object polygon, and need not be repeated here.
  • the example program in Appendix A After placing a style object and two geometry objects into the ordered display group group, the example program in Appendix A creates a translate transform object and adds it to the group.
  • the transform object transform is created by calling the Escher procedure BrTranslateTransform_New() , which operates in a recursive manner similarly to ErOrderedDispiayGroup_New() as described above.
  • the example program's subsequent calls to ErGroup_AddQbject (group, transform) and ErObject_Dispose (transform) operate as described above. Note that although the example program adds the transform object to the ordered display group object after it has already added two geometry objects, the nature of an ordered display group calls for transform objects to be executed prior to geometry objects.
  • Escher ensures this characteristic by placing the transform object on a separate doubly linked list within the ordered display group object group exclusively for transforms, and placing the geometry objects in a doubly linked list exclusively for geometry objects. Upon rendering, as described hereinafter, Escher will traverse the transform object list before it traverses the geometry object list.
  • the example program in Appendix A After adding the transform object to the ordered display group object group, the example program in Appendix A creates a new ordered display group subGroup by calling ErOrderedDisplayGroup_New(). This procedure is described above. The example program then adds subGroup to the previously created ordered display group object group, using the ErGroup_AddObject() Escher procedure also described above. The example program has thus now created the hierarchy illustrated in Fig. 8 . The example program then creates a new geometry object, specifically a torus geometry object torus using an Escher procedure ErTorus_New() , which operates similarly to BrPolygon_New() described above. It then adds torus to subGroup using ErGroup_AddObject() , and disposes of both torus and subGroup using ErObject_Dispose(). At this point, the entire model illustrated in Fig. 8 has been built and the example program moves on to step 308 (Fig. 3), rendering the model to the view.
  • Escher supports multi-pass rendering in which Escher traverses the model more than once, calling appropriate renderer procedures each time.
  • Escher indicates that a re-traverse is required by returning a status flag, EcViewStatus_ReTraverse, from the ErView_EndRendering ⁇ ) procedure.
  • Erview_EndRendering() that procedure in turn calls the renderer's end-rendering procedure.
  • this procedure is called ErWF_End() .
  • the renderer returns the re-traverse flag to Escher's Brview_EndRendering() procedure, which in turn returns the same to the application program as Ecviewstatus_ReTraverse.
  • the preferred technique is for the application program to place the model drawing calls inside a do loop which repeats for as long as SrView_EndRendering() returns Ecviewstatus_ReTraverse. This is the format used in the example program in Appendix A.
  • an application program can make calls to either immediate mode Escher drawing procedures or retained mode Escher drawing procedures, or both.
  • the immediate mode routines take data structures (such as a polygon data structure) as parameters, whereas retained mode routines take objects (such as an BtGecmetryObject) as parameters.
  • Immediate mode routines do not instigate a traversal of any model, whereas certain retained mode routines, such as ErDispiayGroup_Draw(), do instigate a traversal of a model.
  • Appendix A makes a single call to Escher' s renderer invocation procedures 212 (Fig. 2), specifically a call to ErDisplayGroup_Draw().
  • the application program passes in the model to render (represented by the ordered display group object group which forms the root node of the model hierarchy) and the view to which the model is to be rendered (by passing the view object view).
  • the application program could at this time also make additional calls to Escher' s renderer invocation procedures 212, to render additional objects (including additional models) into the same view.
  • the procedure first determines that group is an ordered display group by passing group to an Escher EiDisplayGroup_GetTypeindex() procedure. It then obtains a pointer func to the drawing method which the ordered display group class registered during initialization with the EtDisplayGroup class method tables for ordered display group objects. If the "in-line" flag is set for the object group, then the procedure next calls the procedure pointed to by func, passing in group and the view object to which the group is to be rendered.
  • the EiDisplayGroup_Draw() procedure "pushes" the traversal state before calling the procedure identified by func and "pops” the traversal state afterwards.
  • the state of traversal is represented as the current position in a stack which may be pushed and popped, and which contains at each level a concatenation of all of the transform matrices prior to that level, the current style characteristics, the current shader characteristics and the current attribute sets.
  • a new level is created and all of this information is copied from the prior level to the current level of the stack.
  • the concatenation of transform matrices takes place by actually performing each matrix pre-multiplication as the transform object is encountered in the traversal.
  • the current transform, the current style characteristics, the current attribute sets and the current shader characteristics are stored in a plurality of stacks, each of which is pushed only when necessary.
  • a master "state" stack maintains a record at each level of which of the component stacks need to be popped when the overall traversal state is popped from that level.
  • the current transform state is represented using several component stacks, such as a current "local-to-world” matrix stack, an inverse matrix stack, and so on. But instead of calculating these matrices on each push of the overall traversal state, only the sequence of transformation matrices, from the last- calculated matrix to the current position in traversal of the model, is recorded. The actual calculation is not performed unless and until it is actually needed. In this manner, a large number of matrix computations are avoided.
  • EiDisplayGroup_Draw() the procedure pointed to by func is EiView_OrderedDisplayGroup () , which is as follows :
  • the above procedure calls a generalized display group list drawing function EiDisplayGroupList_Draw () six times , each time passing in a reference to a different one of the six doubly linked lists in the private data of the ordered display group object group.
  • the procedure calls the list drawing procedure with a reference first to the list of transforms, then with the reference to the list of styles, then with the reference to the list of attribute sets, then with a reference to the list of shaders, then with a reference to the list of geometries in the group, and then with a pointer to the list of subgroups in the group.
  • the procedure also passes to the list drawing procedure a reference to the particular procedure which draws the kind of objects which are on the list.
  • this procedure merely loops through all of the objects on the doubly linked list which was specified by the caller, and for each such object, passes the object to the drawing procedure specified by the caller.
  • Eiview_OrderedDisplayGroup() identifies to the list drawing routine for geometry obj ects.
  • EiGeometry_Draw ( )
  • This routine after error checking, first obtains a pointer func to the method which the current view's renderer has registered for geometry objects of the type to be rendered (in this case, polygons). If func is NULL, then a decomposition of the geometry object takes place in a manner hereinafter described. In the present case, however, the wire frame renderer has registered BrWF_Geometry_Polygon() as the procedure to render polygon objects. (See the discussion above with respect to ErWF_Register().) That procedure is set out in Appendix B. D. Drawing Geometry Objects Which Require
  • Escher causes a geometry object in a display group to be rendered in the situation where the view's renderer has a routine specifically for the geometry object's type (i.e., polygon).
  • Renderers to be used with Escher must at least support routines which will render points, lines and triangles, and may also support routines which will render higher level geometries.
  • the renderer need not support all geometry types which Escher supports in the building of a model. Rather, Escher will automatically detect the absence of a rendering method for a particular geometry type, and decompose the geometry into less complex parts. It then resubmits them to the renderer in this less complex form.
  • the wire frame renderer of the present embodiment supports polygon objects, but for purposes of illustration, it will now be assumed that it does not.
  • This illustration is hypothetical also because the wire frame renderer' s method for rendering triangles, which as will be seen is the geometry to which Escher decomposes polygons, is the same wire frame renderer procedure which renders polygons. That is, the renderer procedure ErWF_Geometry_Polygon() takes either a triangle or a polygon as an argument, determines which it is, and renders it using the same code. Nevertheless, the hypothetical will serve to illustrate Escher' s decomposition technique.
  • This routine creates the class method tables for an object in the polygon leaf class.
  • the block of memory is allocated and initialized using a layered technique, with each class's class registration procedure first passing the size required for its own method tables to its parent class's class registration procedure.
  • the polygon class is a leaf class, so the size of its method table is zero.
  • each procedure adds on the size of its own method table and recursively calls its parent class's class registration procedure.
  • the ultimate parent class's class registration procedure allocates memory for the entire block of method tables, initializes its own portion with pointers to its default methods and returns to the calling subclass's class registration procedure.
  • each class's class registration procedure initializes its own method table with its own default methods.
  • each class's class registration procedure can specify methods to override those of its parent class, but only at the option of the parent class. This is accomplished by, when calling the parent class's class registration procedure, specify a metahandler and, for some classes, a virtual metahandler, as arguments to the call.
  • These metahandlers can be called by the parent class's class registration procedure, if it so desires, specifying a method type, and if called, the metahandler returns a pointer to the procedure desired to override the parent class's default method of the type specified. If a class does not have a procedure to override the parent class's default method of a particular type, the metahandler returns NULL.
  • metahandler In the case of the polygon class registration procedure, only a metahandler is identified to the parent class's class registration procedure.
  • the metahandler is as follows:
  • this procedure calls its own parent class's class registration procedure, EiShapeCiass_Register(), specifying a metahandler and a virtual metahandler.
  • EiShapeCiass_Register() specifying a metahandler and a virtual metahandler.
  • the procedure continues by initializing its own method table with pointers to default procedures. It obtains these pointers using an Escher procedure, EiObjectciassData_GetMethod(), which among other things, asks the subclass's metahandler to provide the pointer to each desired method.
  • One of the methods which the procedure asks the polygon class's metahandler to identify is a decomposition method, and as previously pointed out, the method which it identifies is BiPolygon_Decompose().
  • the decomposition method is identified in the class method tables for each type of geometry, not for each renderer.
  • the decomposition methods are included as part of the model to be rendered, not as part of the view to which it will be rendered or as part of the renderer.
  • a renderer can be permitted to override the decomposition methods for geometry which it cannot draw directly.
  • the decomposition methods can be attached to the renderer subclass rather than to the geometry subclass.
  • EtshapeObject class's class registration procedure it will return a pointer to EiGe ⁇ metry_Draw() as an object drawing procedure.
  • the above procedure uses an Escher procedure EiPolygon_Triangulate() to decompose the polygon into a bundle of triangles.
  • the triangulation procedure could create a new EtGroupObject to hold all of the new triangles.
  • the triangulation procedure places all of the new triangles in an object of class BtGe ⁇ metrysundie.
  • a geometry bundle is an internal-only geometry object which can hold only a list of geometries.
  • the above procedure can operate either in immediate mode or in retained mode.
  • immediate mode it calls the triangulation procedure with a flag that tells the triangulation procedure not to save the result of the decomposition, but rather to simply have it drawn.
  • retained mode the above procedure calls the triangulation procedure with a flag indicating that the decomposition should be saved, as well as with a reference to a field in which to save it.
  • the field into which the triangulation procedure writes a reference to the resulting geometry bundle object is polyPriv-decomposition, which the above procedure then passes to BiGeometry_Draw() .
  • EiGeometry_Draw() has been set out above, and in the manner previously described, after error checking, it merely calls the method identified in the method table of the geometry object passed to it, for drawing that type of geometry. Usually these will be methods registered by the renderer, but geometry bundle objects are not public. Renderers do not register routines to draw these objects. Instead, the method table will contain a pointer to Escher' s default drawing method for geometry bundles, which is as follows:
  • this procedure merely iterates through the list of geometry objects in the geometry bundle object provided to it, and passes each one in turn to EiGeometry_Draw(). These are all triangles, so BiGeometry_Draw() will call the renderer' s triangle drawing procedure for each triangle in the decomposition.
  • EiView_OrderedDisplayGroup() identifies to the list drawing routine for transform objects.
  • EiTransform_Draw() which is as follows:
  • This routine after error checking, first obtains a pointer func to the method which the current view's renderer' s method table has for executing transform objects of the type to be executed (in this case, translations).
  • Escher' s default procedure for executing translation transforms is as follows:
  • a quality collection object is a data structure which contains a linked list of quality group objects.
  • a quality collection object is an instance of the class EtQualityCollectionObject which, as indicated in Fig. 6, is a subclass of the class EtSharedObject, which is itself a subclass under the class Etobject. Accordingly, following the format of Fig. 5, a quality collection object has the format in memory as illustrated in Fig. 11. Specifically, a region of memory 1102 is allocated to contain pointers to the methods of the EtQualityCollectionObject class, and this region 1102 contains pointers 1104 to object methods and pointers 1106 to shared object methods (of which there are none).
  • EtQualityCollectionObject class is a leaf class, so the class omits a method table specifically for quality collection object methods.
  • the structure also includes instance data for the quality collection object in region 1110 memory.
  • This region contains instance data specific the object class in a portion 1112 (pointing to the object class 1102), instance data specific to the shared object class in a portion 1114 (containing a reference count), and instance data specific to the quality collection object class in a portion 1116.
  • the quality collection object data is a data structure of type EtQualityCoiiectionPrivate, which begins a linked list of quality group objects.
  • a quality group object is a data structure which contains a group of quality control type variables, each containing a value which itself selects among two or more options in a respective trade-off between rendering quality and rendering speed.
  • a quality group object is an instance of the class EtQuaiityGroupObject which, as indicated in Fig. 6, is a subclass of the class EtSharedObject.
  • a quality group object has the format illustrated in Fig. 12. Specifically, a region of memory 1202 contains pointers to the methods of the EtQualityGroupObject class, and this region 1202 contains pointers 1204 to object methods and pointers 1206 to shared object methods (of which there are none).
  • the structure also includes instance data for the quality group object in region 1210 of memory.
  • This region contains instance data specific to the object class in a portion 1212 (pointing to the object class 1202), instance data specific to the shared object class in a portion 1214 (containing a reference count), and instance data specific to the quality group object class in a portion 1216.
  • the quality group object data is a data Structure of type EtQualityGroupObjectPrivate, which includes the fields set forth in Table I.
  • the quality group object includes a field for storing a quality index value associated with the particular group.
  • the quality index is of type float and can range from 0.0 to 1.0, but in other embodiments the quality index value can be, for example, an integer.
  • the quality index value is stored in a field in the quality group object, in another embodiment, the quality index associated with a particular quality group may be simply a calculated value such as, for example, n/N, where n is the position of the particular quality group in the collection's linked list, and N is the total number of quality groups in the collection.
  • the quality index associated with a particular quality group is merely n, where the particular quality group is the n'th quality group in a collection's list of quality groups.
  • Many other techniques can be used in different embodiments for associating a quality index value with respective quality groups.
  • each quality group object also includes a list of quality type entries.
  • the quality type entries are a set of variables, each containing a value which selects among at least two options in a respective trade-off between rendering quality and rendering speed.
  • Table II sets forth the different quality control variables and the different options which are available for that parameter.
  • the example application program establishes a quality collection by calling a procedure ExSetupQualityCollection(&qualityCollection) .
  • This procedure which is part of the application program, uses Escher-provided procedures to build a collection of quality groups in a desired manner.
  • Fig. 13 is a flow chart of an ExSetupQualityCollection() procedure which establishes a quality collection having four quality groups, with quality indices 0.2, 0.4, 0.6 and 0.8, respectively.
  • the routine first creates a new quality collection object. This is accomplished with a call to an Escher procedure ErQualityCollectionObject_New(), which allocates space and initializes the data structures in the same manner as described above with respect to Fig. 10. ErQualityCollectionObject_New() returns a pointer to the new quality collection object, which the procedure of Fig. 13 stores in a variable qualityCollection.
  • This routine allocates memory space for the new quality group object using the technique of Fig. 10, and initializes the quality index field of the quality group to 0.2.
  • the call to procedure ErQualityGroupObject_New() sets the quality index for the new group permanently.
  • the Escher procedure which does so places the new group in the collection's linked list in the appropriate sequence determined by the quality index of the quality group. If the quality index of the group to be added duplicates the quality index of a group already in the collection, then an error is returned.
  • ErQualityGroupObject_New() does not take an argument, but rather initializes the quality index field of the new group at a null value.
  • Escher routines are provided for the application program to set the quality index of the group subsequently as desired.
  • each of the quality type parameters set forth in Table II above is assigned a unique four-character code of type EtQualityType.
  • application programs do not read and write the parameter values directly, but rather do so only through certain Escher routines.
  • application programs can use the Escher routines to determine which quality parameters are supported by the particular version of Escher.
  • Quality type codes are registered with Apple Computer, Inc., are available to application program developers, and are consistent through subsequent upgrades of Escher.
  • the Escher routines set forth in Table III are used by the application program to manage the contents of a quality group.
  • the routine to get the quality index associated with a particular quality group is provided as an independent routine because the quality index value is not one of the quality types which are accessible using ErQualityGroup_GetTypeData() and ErQualityGroup_SetTypeData(). In another embodiment, however, the index value associated with a particular quality group can be included as one of the quality types which are accessible using these routines.
  • step 1308 the procedure of Fig. 13 adds the first quality control group object to the quality collection object created in step 1302. This is accomplished using an Escher procedure ErQualityCollection_AddGroup() procedure, which is one of several quality collection maintenance procedures described in Table IV.
  • ErQualityCoiiection_AddGroup() automatically adds the new quality group to the collection in sorted order according to the quality index. If the quality index of the new group is already associated with another group in the collection, an error is returned.
  • the Escher routines may be written to accommodate the possibility of two or more quality groups having the same quality index in a single quality collection.
  • the application program can change the quality index associated with a group as desired. In such an embodiment, if the quality index is already assigned to a group in one or more quality collection objects, it will be appreciated that certain bookkeeping functions may need to be performed in order to maintain each affected quality collection in sorted order, and/or in order to handle duplicate quality indices in the same quality collection.
  • the procedure creates a second new quality group object in step 310, this time using a quality index of 0.4.
  • the procedure sets the parameters in the second quality group object as desired, and in step 1314, it adds the second quality group object to the quality collection object in the manner previously described.
  • a third quality group object with a quality index of 0.6, is created, modified as desired and added to the quality group object, respectively.
  • a fourth new quality group object is created, using a quality index of 0.8, the parameters are set appropriately in the fourth quality group object, and it is added to the quality collection object in the manner previously described.
  • the Escher routines may provide a procedure merely for creating a default quality collection.
  • Such a default quality collection may be predefined to include four or five quality groups, each filled with quality type values such that the overall progression from the quality group with the lowest quality index to the quality group with the highest quality index, follows a monotonically increasing overall quality and a monotonically decreasing overall speed in the overall quality/speed trade-off continuum.
  • a first quality group having a first set of quality type values may render with a higher quality and lower speed than it would with a second group having a second set of quality type values, whereas a different image may be rendered at lower quality and higher speed with the first quality group and at higher quality and lower speed with the second quality group.
  • Renderings performed with different renderers may also experience this same kind of reversal. Because of these possibilities, the Escher routines do not enforce any arbitrary conception of which permutations of quality type values should be associated with a lower or higher quality index.
  • the application program is free to establish any desired set of quality type values in a given quality group, regardless of the quality index value associated with such quality group. It will be appreciated that in another embodiment, such a relationship may in fact be enforced.
  • Fig. 14 is a flow chart illustrating the major steps in such procedure. Referring to Fig. 14, in a step 1402, the procedure displays a quality knob icon. Such an icon is illustrated in Fig. 15, and as can be seen, it looks like a knob.
  • the knob has a needle which is currently pointing to a quality index value 0.0, and the user can click on the point of the needle and drag the needle rotationally around the circle to choose any desired quality index from 0.0 through almost 1.0.
  • the available positions on the knob are continuous, allowing the user to select a quality index with the full granularity of the binary register in which it is stored. In another embodiment, only discrete values may be selected.
  • step 1404 the procedure accepts the user's quality index selection.
  • step 1406 the desired quality index is returned to the calling routine.
  • the renderer is made aware of the selected quality group by having it attached to either the renderer object in one embodiment, or to the view object, in another embodiment. In the presently described embodiment, it is attached to the view object. Escher provides the routines in Table V for selecting and getting a quality group object.
  • the example application program in Appendix A uses the Escher routine Erview_seiectQuaiityGroup() to select to the view object, the quality group whose quality index matches, or is nearest to, that specified by the user. It will be appreciated that different embodiments can use different rounding functions for the situation where the desired quality index does not match that associated with any of the quality groups in the quality collection. In the present embodiment, the quality collection with the nearest quality index value is selected; if the quality indices associated with two quality groups are equally different from the desired quality index, then the group with the higher quality index is selected. In another embodiment, the desired quality index is always rounded up, and in yet another embodiment, the desired quality index is already rounded down.
  • Fig. 16 is a flow chart of pertinent aspects of a ErRT_Geometry_Triangle() procedure of a ray-tracer renderer for rendering a triangle.
  • step 1602 the procedure uses the above-identified Escher procedure ErView_GetQualityGroup(), or one like it, to obtain a pointer to the quality group currently assigned to the view.
  • step 1604 the procedure obtains the data for the triangle to be rendered to the view.
  • steps 1606, 1608 and 1610 the procedure looks up the values of two different quality type parameters in the current quality group in order to determine which variation of the triangle rendering procedure should be used. Specifically, in step 1606, using the Escher procedure BrQualityGroup_GetTypeData() , the procedure obtains the value for the quality type parameter, "compute reflections". If the value is "on", which represents a higher- quality/lower-speed choice, then control passes to step 1608.
  • Step 1608 next determines the value of the "compute shadows" quality type parameter in the current quality group. If “compute shadows” is “on”, then in a step 1612, the procedure renders the triangle using the value for the quality type parameter "ray depth”, using reflections and using shadows. If “compute shadows” is “off”, then the procedure renders the triangle using the specified ray depth, using reflections, but no shadows (step 1614).
  • step 1610 the procedure makes a similar determination to step 1608. If “compute shadows” is “on”, then in step 1616, the procedure renders the triangle using the specified ray depth, computing shadows, but not computing any reflections. If “compute shadows” is "off” in step 1610, then in step 1618, the procedure renders the triangle using the specified ray depth, but without computing any shadows or reflections.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Generation (AREA)
  • Processing Or Creating Images (AREA)

Abstract

Système de rendu d'un graphisme permettant de construire et d'éditer un modèle selon un mode conservé en mémoire, indépendamment du choix de l'outil de création. Des appels du programme d'application envoyés au système de rendu pour qu'il dessine un objet ne désignent pas uniquement l'objet à dessiner, mais spécifient également l'outil de création à utiliser. Le passage à un outil différent à tout moment pendant la construction ou l'édition d'un modèle ne présente pas de difficultés pour le programme d'application. Plusieurs outils peuvent être actifs simultanément. Le système de rendu de graphismes peut être adapté de façon qu'il puisse accepter des outils de création enregistrés dynamiquement. Le système détermine automatiquement si des géométries ne sont pas prises en charge par un outil sélectionné et les décompose en une pluralité d'objets présentant une géométrie plus simple. Ce système permet à un programme d'application d'effectuer des appels en mode immédiat ou conservé en mémoire au système afin qu'il effectue le rendu d'un modèle, sans qu'il lui soit nécessaire de savoir combien de passages l'outil requiert pour terminer la création graphique. Quand le programme d'application appelle le sous-système de rendu pour que celui-ci dessine le modèle, le sous-système de rendu renvoie un indicateur en retour indiquant si le rendu du modèle est terminé. Si l'indicateur indique que le rendu n'est pas terminé, le programme d'application demande à nouveau au sous-système de rendu de dessiner le modèle.
PCT/US1995/016423 1994-12-22 1995-12-15 Systeme de rendu d'un graphisme tridimensionnel WO1996019780A1 (fr)

Priority Applications (4)

Application Number Priority Date Filing Date Title
GB9713246A GB2312818B (en) 1994-12-22 1995-12-15 Three-dimensional graphics rendering system
AU44714/96A AU4471496A (en) 1994-12-22 1995-12-15 Three-dimensional graphics rendering system
JP51991596A JP3763079B2 (ja) 1994-12-22 1995-12-15 三次元グラフィックス・レンダリング・システム
DE19581872T DE19581872B4 (de) 1994-12-22 1995-12-15 Dreidimensionales Graphikaufbereitungssystem

Applications Claiming Priority (6)

Application Number Priority Date Filing Date Title
US08/362,118 US5986667A (en) 1994-12-22 1994-12-22 Mechanism for rendering scenes using an object drawing subsystem
US08/362,118 1994-12-22
US08/383,198 1995-02-03
US08/383,198 US5561752A (en) 1994-12-22 1995-02-03 Multipass graphics rendering method and apparatus with re-traverse flag
US08/482,016 US5777621A (en) 1994-12-22 1995-06-07 Quality control mechanism for three-dimensional graphics rendering
US08/482,016 1995-06-07

Publications (1)

Publication Number Publication Date
WO1996019780A1 true WO1996019780A1 (fr) 1996-06-27

Family

ID=27408547

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US1995/016423 WO1996019780A1 (fr) 1994-12-22 1995-12-15 Systeme de rendu d'un graphisme tridimensionnel

Country Status (5)

Country Link
JP (3) JP3763079B2 (fr)
AU (1) AU4471496A (fr)
DE (1) DE19581872B4 (fr)
GB (1) GB2312818B (fr)
WO (1) WO1996019780A1 (fr)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998006067A1 (fr) * 1996-08-01 1998-02-12 Intergraph Corporation Rendu photographique accelere par machine
KR100962920B1 (ko) * 2003-03-27 2010-06-10 마이크로소프트 코포레이션 비주얼 및 장면 그래프 인터페이스
KR101137187B1 (ko) 2003-10-23 2012-04-20 마이크로소프트 코포레이션 비주얼 및 장면 그래프 인터페이스
CN104463846A (zh) * 2014-11-04 2015-03-25 浙江捷尚视觉科技股份有限公司 一种用于数字图像处理中的参数调整方法

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6636224B1 (en) * 1999-08-31 2003-10-21 Microsoft Corporation Method, system, and computer program product for overlapping graphics data collection and transmission using a single processor
US8134561B2 (en) 2004-04-16 2012-03-13 Apple Inc. System for optimizing graphics operations
US8704837B2 (en) 2004-04-16 2014-04-22 Apple Inc. High-level program interface for graphics operations
EP2141651B1 (fr) * 2008-04-08 2018-06-13 Avid Technology, Inc. Cadre pour intégrer et traiter des domaines multiples de matériel, de types de données et de format
KR20100132605A (ko) * 2009-06-10 2010-12-20 삼성전자주식회사 하이브리드 렌더링 장치 및 방법
KR101585998B1 (ko) * 2009-11-10 2016-01-15 삼성전자주식회사 영상 처리 장치 및 방법
US8982136B2 (en) 2011-05-16 2015-03-17 Qualcomm Incorporated Rendering mode selection in graphics processing units
KR101862562B1 (ko) 2017-03-24 2018-05-30 넷마블 주식회사 입체 영상 내 객체의 텍스처 사이즈를 계산하는 방법 및 장치

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5181162A (en) * 1989-12-06 1993-01-19 Eastman Kodak Company Document management and production system
DE69231923T2 (de) * 1991-09-26 2002-04-04 Mitsubishi Electric Corp System mit Annäherungsmittel zur Erkennung von graphischen Elementen in einer Zeichnung

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"MULTIPLE TYPES OF GRAPHICAL CONTEXTS ON A GRAPHIC ADAPTER", IBM TECHNICAL DISCLOSURE BULLETIN, vol. 34, no. 7B, NEW YORK US, pages 29 - 30, XP000282492 *
ASTHEIMER E.A.: "INTERACTIVE MODELING IN HIGH-PERFORMANCE SCIENTIFIC VISUALIZATION - THE VIS-A-VIS PROJECT", COMPUTERS IN INDUSTRY, vol. 19, no. 2, AMSTERDAM NL, pages 213 - 225, XP000270072 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998006067A1 (fr) * 1996-08-01 1998-02-12 Intergraph Corporation Rendu photographique accelere par machine
KR100962920B1 (ko) * 2003-03-27 2010-06-10 마이크로소프트 코포레이션 비주얼 및 장면 그래프 인터페이스
KR101137187B1 (ko) 2003-10-23 2012-04-20 마이크로소프트 코포레이션 비주얼 및 장면 그래프 인터페이스
CN104463846A (zh) * 2014-11-04 2015-03-25 浙江捷尚视觉科技股份有限公司 一种用于数字图像处理中的参数调整方法
CN104463846B (zh) * 2014-11-04 2017-05-17 浙江捷尚视觉科技股份有限公司 一种用于数字图像处理中的参数调整方法

Also Published As

Publication number Publication date
GB2312818B (en) 1999-11-03
JP4188962B2 (ja) 2008-12-03
JP2007257661A (ja) 2007-10-04
GB2312818A8 (en) 1999-01-18
GB9713246D0 (en) 1997-08-27
JP3763079B2 (ja) 2006-04-05
JPH10511485A (ja) 1998-11-04
DE19581872T1 (de) 1998-01-22
GB2312818A (en) 1997-11-05
DE19581872B4 (de) 2006-11-16
AU4471496A (en) 1996-07-10
JP2006079638A (ja) 2006-03-23
JP4129039B2 (ja) 2008-07-30

Similar Documents

Publication Publication Date Title
US5561752A (en) Multipass graphics rendering method and apparatus with re-traverse flag
US5986667A (en) Mechanism for rendering scenes using an object drawing subsystem
US5777621A (en) Quality control mechanism for three-dimensional graphics rendering
JP4129039B2 (ja) 三次元グラフィックス・レンダリング・システム
CA2147847C (fr) Systeme de rendu oriente objet
US8379035B2 (en) Systems and methods for providing intermediate targets in a graphics system
US6091422A (en) System for editing complex visual data providing a continuously updated rendering
EP1594091B1 (fr) Système et méthode pour améliorer un pipeline graphique
US5894310A (en) Intelligent shapes for authoring three-dimensional models
US8106904B2 (en) Shader program generation system and method
Naylor Interactive solid geometry via partitioning trees
US20130120418A1 (en) Web-Based Graphics Rendering System
US20100289804A1 (en) System, mechanism, and apparatus for a customizable and extensible distributed rendering api
US7170511B2 (en) Creating a parallel structure for scene-based rendering
KR20070011062A (ko) 모델 3d 구성 애플리케이션 프로그램 인터페이스
CA2315302A1 (fr) Systeme d'imagerie tridimensionnelle
US20040169671A1 (en) Effects framework pipeline integration with programmable shader
GB2334870A (en) Three dimensional graphics rendering system
Reiners Scene graph rendering
Bauchinger Designing a modern rendering engine
Beier Issues on Hierarchical Graphical Scenes
Haber et al. Enhanced automatic creation of multi-purpose object hierarchies
Hubbold et al. GKS-3D and PHIGS—Theory and Practice
Kaplan The design of the Doré graphics system
Mech et al. Przemyslaw Prusinkiewicz

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AL AM AT AU BB BG BR BY CA CH CN CZ DE DK EE ES FI GB GE HU IS JP KE KG KP KR KZ LK LR LS LT LU LV MD MG MK MN MW MX NO NZ PL PT RO RU SD SE SG SI SK TJ TM TT UA UG UZ VN

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): KE LS MW SD SZ UG AT BE CH DE DK ES FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN ML MR NE SN TD TG

DFPE Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 9713246.8

Country of ref document: GB

RET De translation (de og part 6b)

Ref document number: 19581872

Country of ref document: DE

Date of ref document: 19980122

WWE Wipo information: entry into national phase

Ref document number: 19581872

Country of ref document: DE

122 Ep: pct application non-entry in european phase
NENP Non-entry into the national phase

Ref country code: CA

REG Reference to national code

Ref country code: DE

Ref legal event code: 8607