ANNOUNCE : A 3 dimensional scene description language & parser for computer graphics. This is an announcement of the availability of a language and parser for use in computer graphics for the representation of 3 dimensional scenes. The language has been developed at the University of Manchester for use in graphics research. The language was developed for our own internal use, but now that it has reached a certain stage of maturity we felt it may be of use to others. Consequently the parser, documentation, and several sample scenes have been made available through our anonymous ftp site. The rest of this document outlines the language, and how a graphics researcher might use it in his or her own application. Further information on the language, together with some of the work it has been used for, is available from the WWW page at http://info.mcc.ac.uk/CGU/MSDL/MSDL-intro.html. The Manchester Scene Description Language (MSDL) ------------------------------------------------ Over the years the University of Manchester Computer Graphics Unit has developed many novel graphics packages. However each application programmer has had to cobble together some way of telling their application what it is they want a picture of. In an attempt to reduce the amount of duplicated effort the CGU research group has developed a scene description language, which allows graphics researchers to describe 3 dimensional scenes in a standard manner. Hopefully this will enable scenes to be shared amongst applications, to allow different solutions to rendering problems to be compared. A scene designer would define a 3D scene in MSDL by preparing a text file, which describes the scene in terms of a number of objects primitives, surface properties and lights. The MSDL language allows polygons, triangles, spheres,cylinders, cones, discs, boxes, NURBS and polyhedra to be used as object primitives. Surface properties can be associated with primitives, and lights defined to enable the scene to be illuminated. In addition the user may include an optional camera in the scene to assist users. An application would then read the MSDL file, creating a representation of the scene in its internal database. As MSDL is intended to be used for research it does not prescribe an internal representation, it is assumed the application program will use an efficient storage format. This document describes the basics of MSDL, and includes some sample pictures, generated here from MSDL files. MSDL is available by anonymous ftp, together with some scenes, documentation, and useful utilities. (See below). A Sample MSDL scene ------------------- An extract of an MSDL file might look like : /* An example of a complex composite */ compobj coffee_table /* position the whole thing where we want it in the scene */ shift 10.0 20.0 15.0 /* The table top */ cylinder 0.0 0.0 0.0 capped 0.0 0.0 1.0 capped 1.0 scale 10.0 10.0 0.1 shift 0.0 0.0 10.0 instprops dark_wood end /* The leg */ cylinder 0.0 0.0 0.0 0.0 0.0 1.0 1.0 scale 2.0 2.0 9.8 shift 0.0 0.0 0.2 instprops metallic_grey end /* The base */ box -2.0 -2.0 0.0 2.0 2.0 0.2 instprops metallic_grey end end /* coffee table */ MSDL relies heavily on the concept of defined objects. The scene designer can `define' an object, and then make many instances of it in the scene. For example in the example scene of an X-terminal sat on a desk, the designer modelled a single key, and repeated it many times to form the keys on a keyboard. In complicated scenes this can save a great deal of time, especially if changes need to be made to the scene! Making the programmers life easy -------------------------------- To encourage the use of MSDL at Manchester we have developed a parser. This consists of a C or C++ library which the programmer would link into her application. Your program then calls a function msdl(FILE *) to begin processing a scene. The parser then loads the scene in, and processes it to determine what objects will actually appear. (This stage is where we instance previously defined objects). Then the parser goes through each object in the scene in turn, calling a function to create the object in the applications database. The applications programmer provides these routines (actually all he or she does is fill in the skeleton routines we provide). The MSDL parser passes objects, lights and surface properties in its own simple format. The application will need to copy this data into its own structures. This makes adding MSDL reading capabilities to an existing graphics application very easy. All the user has to do is - make the parser (libmsdl.a) - copy the skeleton routines into wherever your main app is stored, and rename it to something meaningful, e.g ReadMSDL.c - Fill in that file with meaningful create_* routines - Inside your application call something like FILE *fp; ... fscanf(stdin, "Enter filename : %s\n", filename); fp = fopen(filename, "r"); msdl(fp); .. This parses the file and calls the skeleton routines. - Link in your application with the parser. Who might want to use MSDL -------------------------- MSDL was developed primarily as a tool for graphics research. We feel that a graphics researcher trying to quickly develop a way of describing scenes to her application will find MSDL of use. In addition users of existing systems may find the parser a useful addition to their system, as it will enable them to read existing scenes. Example Scenes -------------- MSDL has been in use for some time at Manchester, in areas as diverse as radiosity, animation, NURBS research, physical surface models and path tracing. Some example scenes are available at the Manchester ftp site (see below), together with pictures of the scenes. Utilities --------- Recognising that we would like to load in as many different scene formats to our applications we have begun writing file format converters. At the moment we have several OFF to MSDL converters, which are available with the distribution. Further work ------------ Any scene description language intended for research will always fail to provide everything any user could want. (We can guarantee there someone reading this now thinking "Oh it can't do Coons-Gordon patches, its useless"). Consequently we are currently working on providing the ability to extend MSDL, by placing information in the MSDL scene which isn't interpreted by the parser, but it passed straight to the user application. By allowing this to work within MSDLs system of definition and instantiation, we ought to be able to allow a user to extend the language for his or her specific needs, without needing to be aware of the workings of Yacc! If you need this please email us, and we'll assign a bit more importance to getting this done! In addition we intend to provide converters from common scene formats to MSDL. Obviously this is an uphill struggle, and we'd welcome any converters written by you! Availability ------------ MSDL compiles as a C or C++ library, and is built using Lex, Yacc & a compiler. It has been used primarily on HP-UX & SUN platforms, though as it can be compiled using flex, bison and gcc we feel it could be ported to other machines with minimal effort. MSDL, and some example scenes to complement it, are available from the Manchester ftp site, ftp.mcc.ac.uk (130.88.200.7), in /pub/cgu/MSDL. This distribution is supplied 'as-is'. We make no claims about its suitability for any particular use, and don't guarantee to provide support. However we all use MSDL, and would be interested in your comments and criticisms. If you have any problems or enquiries email cgu-info@mcc.ac.uk, preferably with MSDL in the subject field!. M. Preston (m.preston@manchester.ac.uk) N. Gatenby (gatenby@v2.cgu.mcc.ac.uk) W.T. Hewitt (hewitt@mcc.ac.uk)