From: Bob Mason Subject: DESIGN: WorldBuilder Functional Spec. [LONG] Organization: Worcester Polytechnic Institute Summary: please review for comments hello! For my senior project we are designing a WorldBuilder, utilizing Rend386. There are four of us on the project, working up to the end of March to get it done. I would appreciate any comments, ideas, questions, etc on this proposed functional specification that we have put together. Please direct any replies to rmason@wpi.wpi.edu thanks, bob mason ----------------------------------------------------------------------------- WorldBuilder Functional Specification WorldBuilder ============ 1. MS-DOS application 2. Application has two environments: workSPACE and workSHOP * workSPACE is an environment to build and interact with Virtual Worlds * workSHOP is an environment to build and manipulate Virtual Objects 3. configuration set by config file (e.g. with demo4.exe: rend386.cfg) 4. command line options * temporary configuration (e.g. -g for glove enabled, -s for shutter glasses, etc.) * loading in world files, object files 5. a "Virtual World" consists of a world description file and an object file that holds all virtual objects 6. selection is done with a line-vector from "cursor" to intersect first "item" priority: 1 must be done 2- 2 nice to be done 2+ 3 might be done workSPACE ========= 1. Object Menu Tools -------------------- Object Movement priority: 1 representation: hand functionality: * allow user to select and move objects in virtual space using a 3D input device gestures: * select: point * move: fist Painting priority: 1 representation: paint brush functionality: * to give the ability to paint whole objects and individual polygons of an object gestures: * select object: point with 1 finger * select polygon: point with 2 fingers * color: fist Navigation - "flying" priority: 1 representation: directional-cone; points in the direction of movement functionality: * gives the user a quick method of moving within virtual space * selected objects will move with the user gestures: * stop: flat * speed 1: point with 1 finger * speed 2: point with 2 fingers * change view (no momentum): fist Scaling priority: 1 representation: miniature 3D axis, with arrows coming out functionality: * allow objects to be made any size * scaling is done in proportion to all axis at once gestures: * select: point * scale: in/out with rocker arrows on glove Rotating priority: 1 representation: ? - not decided functionality: * rotate objects easily and with precision * show angle of rotation by text output gestures: * select: point * on a select, rotate: ask what plane to rotate about (x,y,z) use rocker arrows to change rotation Cut Object priority: 1 (if copy and paste not implemented, cut will be renamed delete) representation: ? functionality: * copy an object's structure to a buffer (an object pointer) * once object is copied the object is removed from the virtual space gestures: * select: point * cut: fist Copy Object priority: 2 representation: ? functionality: * copy an object's structure to a buffer (an object pointer) * once object is copied the object stays in the virtual space gestures: * select: point * copy: fist Paste Object priority: 2 representation: clear or solid glue bottle (depending on state of buffer) functionality: * takes objects in buffer and places in the center of the user's viewport * once pasted, and while a fist is kept as a gesture, the object maybe moved around in virtual space gestures: * select: point * paste: fist 2. Text Menu Options -------------------- Anchor Object priority: 2 (only because not very important) representation: anchor functionality: * if object can be moved anchor it permanently; if anchored, unanchor it gestures: * select: point * anchor: fist (Un)Grouping Objects priority: 2 representation: ? functionality: * allow objects to be "grouped" and grouped objects to be "ungrouped" * grouped objects can be manipulated on as a single entity gestures on grouping: * select objects: point * group: fist gestures on ungrouping: * select group: point * ungroup: fist Change Ambient Light Attributes priority: 1 (becuase it's so easy) functionality: * set the level of light in the world pseudo-code: 1. prompt for new light value 2. give a description of range with numbers (e.g. 0 = darkness, 10 = midday) 3. update light attributes Undo priority: 2- functionality: * undo last action performed on object, or save state of objects * priority 3: allows undo undo pseudo-code: 1. before execution on any object (usually on a select) copy object structure to an object buffer 2. on an undo restore object from the buffer. On an undo for paste remove the object Hold State/Restore State priority: 1 functionality: * allow user to keep the present state of the environment in temporary holding * can be restored on user's command pseudo-code: * when user request's a "hold state", copy object list to a temporary file * on a restore state, load in temporary file and over-write object list Import Object from workSHOP priority: 1 functionality: * take object that has been worked on and place it into the virtual space of the world currently being edited pseudo-code: 1. take all objects in workSHOP and form into one object structure 2. pass the object structure to the workSPACE, and close workSHOP Go to workSHOP priority: 1 functionality: * take user to environment to build or modify objects * objects selected will be brought into workSHOP File Management priority: 1 functionality: * New, Open, Save, Merge Worlds _New World pseudo-code_: 1. check to see if world is empty, if not empty prompt to save world 2. set world filename to null 3. set world object list to null 4. reset viewport _Open World pseudo-code_: 1. check to see if world is empty, if not empty prompt to save world 2. prompt for world filename 3. load world from disk 4. reset viewport 5. render new world _Save World pseudo-code_: 1. prompt for world filename 2. if world filename is not null, give filename as default 3. if name exists on disk, ask to write over it or give new name 4. take all objects and write into one PLG file 5. write world attributes to disk Loading Objects functionality: * primitive objects, objects from disk Description - primitive objects: priority: 1 Unit objects will be provided from a library, including: sphere, cube, cone, torroid, cylinder, pyramid, polyhedron, etc. These objects will be stored in a pre-determined order in a file named UNIT.PLG. All objects will be normalized with respect to size and orientation. These objects are designed to be used as simple building blocks to build a world. This UNIT.PLG file will not be the only PLG file that is packaged with WorldBuilder, a suit of "clip objects" will be assembled for the final product. Description - objects from disk: priority: 1 Objects loaded from disk will be standard PLG files as formatted by Rend386. One may load an object file directly from the file name, or may use the ObjectBrowser to view PLG files and their objects to load in. We will also attempt to integrate source code for DXF and 3DS object file formats into our application to allow for importing. If this is not possible, we will provide DOS based converters to the PLG format. Description - ObjectBrowser: priority: 2 Given a PLG filename, a browser will open up on the screen, replacing the view of the virtual world. The object in the file will be scaled to fit the viewport and displayed. If there are more than one object in a PLG file, all objects will be loaded into memory, but only one object will be shown at a time. The rocker switch on the glove will be used to cycle through all the objects. The user will be allowed to exit or to return with the object (i.e. the object displayed on the screen). If the user returns with the object, it will be loaded in the middle of the user's viewport. workSHOP ======== 1. non-specific environment - no reference points 2. objects move or rotate, the user's viewport stays still 3. it must be stated that this application will allow people to build non-planer and "bad" objects. The Rend386 render can deal with these irregular objects, but faces may drop out due to the non-planarity of certain faces 4. to view objects, they will be rotated, as if the user was stationary. The rocker switch will be used at all times to change the view of the viewport; priority: 1 5. the numeric buttons on the glove will be programmed for predetermined views (e.g. left, right, up, down, etc.); priority: 2 6. zoomin/zoomout will move the objects closer and farther to the viewport, using the "arrow buttons" on the glove; priority: 1 7. wire frame/solid view of object is toggled with center button, except in PolygonDraw; priority: 1 8. Object Menu Tools -------------------- ObjectDraw priority: 1 representation: small "sphere" (vertex cursor), and ghost lines, bounding triangles functionality: * to give the user the ability to build 3D objects from scratch, or to modify pre-existing objects. All objects built with this tool will consist of triangles as polygons. Objects that are connected with new faces will become one new object. * steps: anchor a vertex in space; a ghost line will follow the vertex cursor to indicate direction; anchor second vertex; a bounding triangle will appear, moving with the vertex tool; anchor polygon * if two vertices are within a specified 3D bounds of each other, their color will change to red. This will signify that they will be "welded" together to form one vertex. If the user anchors the new vertex within the bounds of a "welding", the old vertex at that location will become a vertex of the new polygon. * each new triangle polygon is a new "object", if welding occurs between two or more objects, when the new polygon face is drawn all connected objects will be merged into one object structure. * possible additions to functionality include using the color of a vertex as an indicator of distance from the origin, "double-clicking" to have a polygon finished for you, and having a "snap-to-grid" feature gestures (vertex placer tool): * select vertex: point * create vertex (if vertext not selected): fist * move vertex (if vertex is selected): fist * move cursor: flat PolygonDraw priority: 1 representation: 2D interface, with a cross-hairs as pointer device functionality: * to build 2D polygons, seen as a step in extruding 3D objects * 2D polygons can be kept as objects in Rend386, though a surface is only defined on one side (by surface normals) * this effectively is a draw polyline routine, closed polygons must be made though * the center button on the glove will bring the polygon into the workSHOP with perspective looking toward the user. If the polygon is not completed when the center button is pressed, the last and first vertices will be connected to close the polygon. A to be determined glove button will cancel a PolygonDraw. gestures (vertex placer tool): * select vertex: point * anchor vertex: fist * move vertex (if vertex selected): flat * place new vertex (if no vertex selected): flat Extruding Polygons priority: 2 (priority 1, with at least keyboard entry) representation: ? functionality: * to allow one to take a polygon and move it through 3-space to form a 3D object * starting the extruding process, the polygons will jump out a distance (e.g. 50 units) * the user will be able to interactively, through 3-space, pick the direction and length of extrusion with the glove * once done with extrusion, the new object replaces the "polygon object" in the object list gestures: * select polygon: point * extrude: fist * create object: after extrusion, release fist Object Movement priority: 1 representation: hand functionality: * same as workSPACE, on objects gestures: * same as workSPACE Vertex Movement priority: 1 representation: small hand functionality: * similar to Object Movement, but on vertices gestures: * same Object Movement Vertex Deletion priority: 2 representation: ? - (ray gun ?) functionality: * ability to select a vertex and remove it from an object * this functionality is dependent upon being able to "re-assemble" an object after a vertex has been removed. The issue to deal with is the removing the faces of a polygon that had the vertex in common. gestures: * similar to Cut Object Painting priority: 1 representation: paint brush functionality: * same as workSPACE gestures: * same as workSPACE Scaling priority: 1 representation: ? functionality: * same as workSPACE gestures: * same as workSPACE 9. Text Menu Options -------------------- Unweld Vertex priority: 3 representation: ? - (sphere with crack?) functionality: * ability to select a vertex and separate the polygons that it has in common * for each polygon that uses that vertex, create a new vertex and separate past the welding bounding distance gestures: * similar to Cut Object Cut/Copy/Paste Object priority: 1/2/2 representation: ? functionality: * same as workSPACE, we will not cut/copy/paste polygons of an object gestures: * same as workSPACE Undo priority: 2 functionality: * undo last action performed on object, or save state of objects * priority 3: allows undo undo pseudo-code: 1. before execution on any object (usually on a select) copy object structure to an object buffer 2. on an undo restore object from the buffer. On an undo for paste remove the object Hold State/Restore State priority: 1 functionality: * allow user to keep the present state of the environment in temporary holding * can be restored on user's command pseudo-code: * when user request's a "hold state", copy object list to a temporary file * on a restore state, load in temporary file and over-write object list Go to workSPACE priority: 1 functionality: * take user to environment to build or modify worlds * objects selected will be brought into workSPACE File Management priority: 1 functionality: * New, Open, Save Objects _New Object pseudo-code_: 1. check to see if workSHOP is empty, if not empty prompt to save object 2. set object filename to null 3. set object list to null 4. reset viewport _Open Object pseudo-code_: 1. check to see if workSHOP is empty, if not empty prompt to save object 2. prompt for object filename 3. if there are multiple objects in the PLG file, ask if they want all the objects or just one of them 4. if they only want one object, then pass the object list of the PLG file to the ObjectBrowser and allow them to select their object 5. load object from disk 6. reset viewport 7. render objects _Save Object pseudo-code_: 1. prompt for object filename 2. if object filename is not null, give object as default 3. if name exists on disk, ask to write over it or give new name 4. if a single object was changed from a multiple object PLG file ask if they want to save the new object to a new file or into the old file 5. if they save the new object, from the multi-object PLG into the old PLG file, ask if they want to overwrite the old object or tack a new object onto the PLG file 6. take objects and write into PLG file Loading Objects priority: same as workSPACE functionality: * same as workSPACE Descriptions: * same as workSPACE WorldBuilder Menus ================== * when a menu is brought up, the current mode is suspended Objects Menus priority: 1 functionality: * "A" button on glove brings up menu * have an iconic representation of menu choices * must be able to do 2D selection with the 3D device * hide the tool cursor representations, and use a cross-hair cursor gestures: * select: point * execute: fist Text Menus priority: 1 functionality: * "B" button on glove brings up menu * must be able to do 2D selection with the 3D device * hide the tool cursor representations * have highlight bar move with glove (up/down) gestures: * select: move glove up/down * execute: fist Scrollable Text Menus priority: 2 functionality: * ability to scroll through list of choices, that goes beyond the bounds the of the menu window * mostly used for file manipulation, e.g. to see what PLG files are on disk * with glove moving cursor up/down off screen the screen list would be updated accordingly gestures: * select: move glove up/down * execute: fist Dreams... dependant wholly on time, or acquiring source code from others * portals * sound * networking, multi-user * defining regions in space * execution links with objects * defining ground * gravity attributes * run-time version