--------------------------------------------------- MORAY V1.302 POV Monty the Modeller (c) SoftTronics Lutz + Kretzschmar '92 '93 Date : 1 July '93 CIS:100023,2006 --------------------------------------------------- This is a short and basic (read: quick and dirty) tutorial to get you started with MORAY. ---------------------------------------------------------------- Why? It's for those of you that don't like reading manuals. Just the very basics are covered here. Please refer to MORAY.DOC for more detail and all the features of the program. ---------------------------------------------------------------- Due to the packed form that the information is presented here, you should print this out and look at the program while reading. Also, don't skip paragraphs of this tutorial, they all contain important info. I've put some keywords onto the left margin to make it easier to localize them later. Disclaimer Please read the disclaimer in MORAY.DOC before starting. Overview The modeller is an interactive scenery designer. It is not a CAD package. It will let you do nearly everything graphically with the mouse. You can create a number of primitives that can then be manipulated (you can scale, rotate, translate, assign textures, bounding boxes to them). Installation This is fairly simple. You just unzip the package using the -d option. Far more important is to do the ... Configuration ... by setting the PrintPath variables in the MORAYPOV.CFG file in the [CONFIG] section (at the end of the file). Set this to the directory where you normally have your POV files. Also set the POVVersion variable to 1.0 if you are using POV 1.0 and to 2.0 if you are using POV 2.0. For this tutorial we'll add a sky and grass floor to our renders, so that they'll look a bit more interesting. To do this change the line saying IncludeFile10 to 'MRYDFLT1.INC' and the line saying IncludeFile20 to 'MRYDFLT2.INC'. All the other settings should work with their default values, you may want to tune them after reading the MORAY.DOC file later. Files I've included a few scene files that you can manipulate or play with. You can render these straight away. After starting MORAY, load one of these scenes, export them to POV, and trace them. AXIS.MDL is a scene with three arrows and labels. PAWNS.MDL is a Q&D copy of the pawn GIF in the GRAPHDEV lib, except that it uses rotational sweeps. ALLOBJS.MDL is a scene that contains all object types that MORAY handles. HEIGTFLD.MDL demonstrates how a heightfield is done. It has an image map applied to it that uses the same file as the height- field itself, POVMAP.GIF. SPOTLGT.MDL contains a spotlight shining on a sphere. Demonstrates the new spotlight primitive. KETTLE.MDL is one of those fancy designer kettles, done with sweeps. This is a dog to render. KETTLE2.MDL is nearly the same kettle, except that it's constructed with POV-Ray primitives using csg. This renders much quicker. CSGKNOB.MDL this file contains a knob done in CSG. Look at the object hierarchy in the Object Browser (wait till later) to get an idea of how to go about making this sort of object. TEAPOT.MDL contains my rendition of the classic Utah teapot. MAYFLY.MDL this file contains a mayfly. Created by Dan Farmer and used in his Beethoven Bust picture (CIS, GraphDev). MRYSTART.MDL is the default startup file for MORAY. If you don't specify a filename, this file will be loaded. It contains a camera and a light. We'll render one of these straight away. Make sure MORAy is configured as described above. Type MORAY and then enter. Wait a bit then click on the right mouse button until the shareware screen goes away. Now click on FILES. Click on the AXIS.MDL file shown in the listbox. Click on LOAD. When asked whether you want to delete the scene in memory, click on YES. You'll now see the axes. Click on EXPORT2POV. Click on DONE, click on QUIT. Now change to your POV directory and render AXIS.POV. That was you first render with MORAY and POV. Okay, let's take it a bit more slowly. Input MORAY uses the mouse and keyboard as input. The keyboard mainly serves as shortcuts for mouse ops, e.g. you can press 'E' instead of clicking on EDIT. But heavy use is made of the CTRL, ALT and SHIFT keys *together* with the mouse (more later). Startup To start the program type MORAY -G5. You can specify -gx as an argument to select another resolution apart from 640x480x16. If you don't, MORAY will see what mode is defined in MORAYPOV.CFG and use that. If this is not found it will start up in 640x480x16 normal VGA mode. To see what modes are supported type 'MORAY -?'. This will show what modes can be called. MORAY needs *lots* of memory! 525K and more is OK for not too large models. The modeller currently supports EMS and it *needs* about 1.5MB. Coordinate System Bad news for POV users: MORAY uses the right-handed coordinates, where Z is up, not Y. Think of it as seeing a piece of graph paper that uses X and Y for it's axes lying flat on a table. The Z then naturally comes out of this piece of graph paper, going up. So the 'floor' of the MORAY world is the XY plane. The camera will always be aligned along this plane just like you would hold a real camera. Main screen You should then see the main screen. It has four windows and two menu regions. In the lower right corner are six buttons that show cursor position and system resource usage. The top three show the cursor position in 3D world space when in one of the view windows (wait 'n see, just read on!) The fourth one shows the amount of free conventional and EMS memory. The fifth one shows how full the point list is. It shows how many vertices and the percentage of the buffer used. The fifth one shows how full the edge list is. Views The four windows in the upper left portion of the screen show 3 two-dimensional views and one 3D view. You will see the axis in these windows. Don't look at the writing on the axis, it might confuse you! Just kidding, the modeller uses a right-handed coordinate system, where Z points up. It should be quite intuitive however, as you'll see in a moment. The three 2D-windows are editing windows. The world in each window can be panned and zoomed with the mouse. ***** NOTE ***** These windows are only active when the main menu is active. Move the cursor to the top left window. Panning Press and hold the CTRL key. Now press and hold the left mouse button *and* (this needs coordination, huh?!?) move the mouse about in the window. The axis will move with the cursor. When you have placed the axis back in the center release everything. Zooming Press and hold the ALT key. Now again press the left mouse button and move the mouse up or down, *slowly* at first. This zooms into (move up) or out of (move down) the window. Enlarging Each of the 4 views can be made to fill up the screen. To do this move the cursor to the appropriate window and press *both* mouse buttons, or, if you have a three-button mouse, press the middle button. The view will now fill the whole screen. To revert to the normal views, repeat the procedure. Disabling Each view can also be disabled, i.e. no refresh will take place in that view, it's just drawn black. Do this by pressing '-' on the keyboard, while over the view. Press '+' to turn it back on. Useful if you're working on a complex scene, but find you only need two views. You can then disable one 2D view and the 3D view. Grid You can have each 2D-View display a grid over the scene. To toggle the grid for each view, move the cursor to the grid you want to change and press Alt-G. The grid will appear/disappear. Menus The main menu and some other general menus are found on the right, next to the four views. The menu region under the 4 views is used for object-specific menus. The buttons of menus are operated by first depressing and then releasing the mouse button while over the button (you knew that, right). ***** NOTE ***** To leave a submenu the right mouse button should be pressed. To make this a bit more interesting we'll load a sample file. Loading On the main menu click on FILES. Another menu appears with a file selector. You'll notice that all buttons are disabled. This is because no filename has been chosen or entered (you can just start typing the filename if you want). Select the SAMPL1.MDL file in the file selector window. The name now appears above the file selector and below the path. All buttons will now be active. Click on LOAD. Confirm the deletion of the scene in memory with YES. After loading you are back in the main menu and the 3 windows show the test scene. You will notice the the 3D window is empty. This is because we haven't defined or loaded a camera. (I specifically left the camera out the SAMPL1.MDL file, normally it's saved too.) We will do this now. Defining a Camera There are two ways of creating a camera. Everything can be created from the CREATE submenu. Cameras and textures can also be created from special submenus. We will use the second method. Click on CAMERAS in the main menu. Now you will see a submenu at the bottom open. All buttons except CREATE CAM are disabled. So, press CREATE CAM. You will be asked for a Camera name (You can specify up to 8 cameras). Enter a name, such as STDCAM. The camera will appear in the list of cameras, in the three 2D views and the 3D view window will show you what the camera is seeing. The camera can be seen as a line from the viewer position (where a viewing pyramid is also visible) and the look- at point. Moving Objects I Objects can be moved, scaled and rotated in the 3 2D views. Results can be observed in all four windows at the same time. To move an object, it needs to be selected. All objects are visible as grey when not selected. When you select an object it turns yellow. The cameras, bounding boxes and bezier patches have different colors, the cameras are orange, the bounding boxes are red and the beziers are green. Selecting objects There are two ways to select an object: graphically and by name. If you know the name click on SELECT to bring up the object browser and choose the object by clicking on its name. If you can't spot it on the screen, you may have to use the scrollbars to pan the object tree. Its button will be highlighted. If the correct object has been selected, click the right mouse . You can choose it graphically by moving the cursor near a line in one of the 3 2D views that belongs to the object. Then press and hold the SHIFT key. Press the left mouse button and drag the mouse to open a rectangle that crosses the line. Then release the mouse button. The first object that has an edge that crosses the rectangle will be selected, i.e. turn yellow. The selected objects name can be seen in the top right corner of the main menu. Move the cursor over the camera in any of the 2D windows, press and hold SHIFT, press the left mouse button, drag the mouse to open a rectangle over the camera, release the mouse button and release SHIFT. The camera should be selected. It won't turn yellow, though, because cameras are drawn orange. Check the top button of the main menu. It should read "OBJ:STDCAM". Sometimes the wrong object of overlapping objects will be selected. Either repeat the selection procedure in another view, where they don't overlap or zoom into a view to increase the resolution and the space around the edges of the object you're interested in. Moving Objects II Move the cursor to the 'top' view of the scene, i.e. the bottom left window. Now press and hold the left mouse button and move the mouse. The camera position will follow the movement of the mouse and the 3D window will show the resulting projection. You will notice the line extending from the camera position to the 'look at' point is anchored at the 'look at' side. To move the LookAt point press 'L' on the keyboard. You will now move the lookat point. Press 'P' for moving the position point. Transformations What you are effectively doing when moving the camera, is changing the translation parameters. You will notice the first 12 or so menu items are headings and numbers. All objects are transformed according to the parameters shown there. - First they are scaled, - then rotated, - and finally translated. This may seem a limitation as opposed to the ability to concatenate any number of scale, roatate, translate transformations, but we'll see later that it's not. If you want to put the camera at a certain place, just click on the X, Y or Z coordinate shown under the TRANSLATION header and enter the number. The same goes for scaling and rotation parameters. You can press TAB or Alt-TAB to go from editing one parameter to editing another, without having a screen redraw in between. ***** NOTE ***** Scaling and rotating the camera, however, is different than doing that to other objects. The camera uses the ScaleX value to extend the viewing pyramid and ScaleZ to change the aperture (which is currently set to 30 degrees). Rotation is not used for the camera. Click on the X translation, type '17', press TAB, type -17, again press TAB, again type 17 (last time, I promise), and finally press Enter. The camera now shows this scene quite nicely. Exporting to POV We'll try rendering this scene. Click on FILES and then click on the EXPORT 2 POV button. The scene is now exported to POV. Click on SAVE to save the scene. Click on DONE, then from the main menu, click on QUIT. Change to the directory where MORAY wrote the POV-file. You'll notice two files: one named SAMPL1.INC and a SAMPL1.POV. Invoke POV and let it trace SAMPL1.POV. You can now go into SAMPL1.INC and change a texture, MORAY won't overwrite this change during a later session. If you *want* MORAY to change, or rather re-export the texture, just delete it from this file, including the comment line containing the $MRY$: token. The next time you export to SAMPL1, MORAY will append the definition of all textures that are used in the scene but are not already exported, to the INC file. Restart MORAY like this: C:\MORAY> MORAY sampl1 Cursor View-Mode We just used the cursor in the 3 2D-Windows to *move* the camera. The cursor can, however also be used to scale and rotate objects. [ Since this works differently for cameras we'll try this with a cube. Select the big cube.] The button showing the transformation that will be changed when you move the cursor about in the 3 2D-Windows is 'pushed in' on the main menu. At the moment the TRANSLATION button should be 'in'. Either click on the SCALING button or press 'S'. 'T', 'S' and 'R' select the translation, scaling and rotation mode, respectively. Now the TRANSLATION button has popped out and SCALING has been pushed in. Thus cursor movements will now affect scaling. Scaling Objects Scaling objects is a bit difficult because the mouse has to be in the correct quadrant of the view in order for the scaling to follow the mouse and not go off in opposite directions. Move the cursor into the top left 2D-View. In *that* view move the cursor into the top right quadrant. Now press and hold the left button and move the cursor towards the top right corner. The cubes scaling should follow the cursor (if it doesn't *call* me). Experiment in the other windows too. With scaling always use the top right quadrant. Typing in Values Of course, you can just type in the values at the appropriate buttons, if you know them. Do this by clicking on the button showing the value you want to change. Try this by clicking on the first value under TRANSFORM. A line editor will pop up offering you the current value as a default and you can then type or edit the new value. Press ESC to cancel or TAB or ENTER to confirm. Pressing the right mouse button (CANCEL) or the left mouse button (CONFIRM) also works, allowing you to keep your hand near the numbers and not having to dash for RETURN everytime. Pressing TAB (or Alt-TAB) will also confirm your entry, but will allow you to enter the parameter immediately below (TAB) or above (Alt-TAB) the last changed parameter. Rotating Objects Rotating objects is just like scaling them. Move to the same quadrant, drag the object in a circular motion. Try it. These are the very basics of object manipulation. Try the other menu points to see what they do. Of interest may be the CREATE submenu. Here you will see the primitives that are supported. Specifically have a look at the Sweeps, and the Patches. Both of these editors will be described later. Editing Objects You can edit the selected object by pressing 'E' on the keyboard or clicking on EDIT. You will see an edit submenu appear in the bottom bar. Try it. Select a cube and press 'E'. You'll see two listboxes, showing defined textures and bounding boxes. Some lists may be empty. With other objects, buttons and/or listboxes are added to this menu, according to the object. You leave this submenu by pressing the right mouse button or clicking on DONE. Object Names You'll also see a few other buttons. One is the NAME button. You can click on this to change the name of the object, which is displayed in the depressed button right next to it. The name is limited to 16 characters (or was it 15?). Object Visibility. Also, you'll see a '+' button, a number and a '-' button. This is used to assign a level to an object. You can blend out objects that have a level higher than one you specify. This means you can assign a high level, say 9, to small details of a scene and 1 to rough, big objects. Then when you set the visibility level, by pressing Alt-1 to Alt-9 or from the options menu, you can blend out things you don't currently need to see, so that the screen refresh speeds up. This is especially the case when moving the camera in a complex scene. You press Alt-1 to blend out unimportant objects, move the camera about, then blend in more by pressing Alt-8 (or whatever). Objects can have absolute or relative visibility levels. This means you can specify that a object has a certain visibility, say 4. Or you can say that the object has a visibility one lower than its parent. Then when the visibility of its parent gets changed, this objects visibility will automatically be changed, too. We strongly recommend that you use the relative switch (selected by depressing the 'R' button) for objects that are part of a larger object, ie. for objects that are sub-objects. Extended Edit Some objects have an extended editor. These are the bezier patches and the sweeps. These two editors are activated by pressing the EXT. EDIT button and will be explained later. Texture creation The modeller directly supports a few textures, and the ones in the INC files. When you create a texture (from the Main menu, press CREATE, then TEXTURE, or from the Main Menu press TEXTURES, then CREATE), you will be presented with a list of pre-defined textures and 4 more options. If you want to use Textures you have defined in an include file, you can simply click on the texture in the list box. You cannot change any parameters of this texture. If you select another option, such as OPAQUE, you can edit all of the parameters. The ImageMap type may be of interest, since it can be manipulated in 3D- space. Currently only planar projection is implemented. You can select an imagemap texture just like an object and move, scale and rotate it. It will only appear when assigned to an object though. Grouping Objects The modeller has the ability to group objects together. This is like a composite in POV. Since the transformation of each object is 'limited' to first scaling, then rotation, then translation, grouping offers a way to concatenate transformations. You define objects in their own coordinate system, with respect to each other. Then you group them and scale, rotate or move the group. You can select groups either in the Object Browser or by selecting one of the children object with the mouse and then pressing Alt-P (Parent). The editor now has an extra listbox containing all the 'subobjects' or children of that object. Press right mouse to leave the edit submenu. If a group is selected you can move the whole group. All subobjects that belong to it stay put in relation to the others. CSG Objects The modeller does support CSG objects, but does not (currently?) display the wireframe accordingly. ***** NOTE ***** The sweep primitives cannot currently be used in CSG. This is because they are output as unions of triangles and not as primitives. There are extra buttons in the CSG Edit menu, allowing you to specify the operation between the objects. Texture Assignment You will see in the Editing submenu of the objects that there are two buttons above the listboxes. The top one says 'NO blabla' and the one beneath has a name in it (or is blank). To assign a texture click on the texture name in the left listbox. It will appear in the button. Hierarchial values This name *can* have an asterisk ('*') in front of it. If it does, this means that the texture comes from the *Parent* object. This also means that you don't have to select each primitive and assign a texture to it. You select the whole object, assign a texture to that 'Group' and all subobjects that have *no* texture assigned to them will become white! The subobjects that need to have another texture will have that texture assigned to them and will not use the parent texture. If you've previously assigned a texture to a subobject and wish to rather make it inherit its parents texture, click on the NO TEXTURE button in the subobjects editing menu. The same goes for Bounding Boxes and Levels. If the level of a subobject is 0, it will assume the level of its parent, if it has one (if not, then of *its* parent etc.), and put an asterisk in front of the level. Other editors The modeller incorporates a bezier patch editor and a sweep editor. Sweep Editor Load PAWNS.MDL. This is a quick and dirty copy of an image that was on CIS some time ago. Select a pawn. Press 'E' or click on EDIT. From the presented submenu select the EXTENDED EDIT button. Go wild. You will see a single coordinate system replace the 4 views. This is where the sweep is defined. All sweeps (rotational, translational and conical) are edited here. For rotational sweeps, keep the outline to the right of (or on) the vertical axis. You can move knots (control points, or rather end points) just like in the 4 views. Same goes for panning and zooming. You don't select the points however, just press and hold the mouse button near to the point you want to move. The 'handles' can be rotated to create curves. Normally the two handles are locked together, but if you press and hold SHIFT before moving a handle, only the one handle will be moved. The slider in the menu determines how many subdivisions will be created for the wireframe and for the output to POV. This, of course, has a direct effect on the memory requirements. After selecting INSERT KNOT, DELETE KNOT or SAME ANGLES the program will wait for you to click near a control point and will then do that operation on the point you click nearest to. Patch editor Go to the files menu and press NEW to clear the scene. Click on CREATE. Click on BEZIER PATCH. You will be presented with three choices, specifying the kind of patch. Sheet patches SHEETS are, as the name implies, flat sheets, like paper. You can specify how many Bezier patches you want to join together (each patch being the POV primitive, i.e. 16 control points). MORAY handles the smoothing between adjoining patches, so that there are no 'ridge seams' (it doesn't let you directly influence those shared points). Cylinder (2-Patch) This is a cylinder-type patch. Two 'sheets' (bezier patch primitives) are joined at two edges, forming a cylinder-like form. HEIGHT specifies how many of these 2-sheet combos to create. Cylinder (4-Patch) This is basically the same as the two patch type except that four patches are now joined to form a cylinder. The classic Utah teapot (body and lid) is made of this type of patch. The file TEAPOT.MDL contains my version of the Utah teapot. Select the SHEET option and make sure it says 1x1. Editing Once you have specified the type of patch you want to create click on the OK TO CREATE button. You will see the patch appear in the views and will be placed in its editor. Select the EXTENDED EDIT button. Aaaahhh, the patch editing mode! Lotsa lines, huh? The three views stay, but a labeled grid or coordinate system is overlayed. All zooming and panning functions remain active. The menu at the bottom: the slider selects, similar to the sweeps, the number of subdivisions each patch undergoes while drawing. There are five modes while editing patches. 1) You can move control points in the TRANSLATE mode. 2) You can scale control points relative to the origin. 3) You can scale control points relative to one another. 4) You can rotate control points relative to the origin. 5) You can rotate control points relative to each other. You will see the patch is green and the control grid is cyan. You can move one or more points of the control grid to alter the shape of the patch. You can also hide the control grid (even while moving control points) or the mesh (then you just work with the control grid). Selecting/Deselecting and moving points Again, there are a few ways. One point To move one point, make sure no points are marked. This is shown in the middle of the menu, it has a 'MARKED' button and next to it a number, showing the amount of points marked. Move the cursor near to the point you want to move (to within 1/20th of the screen widthto be exact). Now press, hold and move the cursor. This may not always work, especially with the cylinder patches. This is because MORAY looks how many points are 'near' enough to your cursor. If it's more than one, you can't use this mode of moving points. More points To move multiple points (or one if more than one overlap) you need to select them. This is done similarly to the method used in the main views. You can move near to the point press LEFT-SHIFT, press and release the left mouse button. All points that qualify for a 'near' will be marked (check the indicator to make sure). You can also define a rectangle in which to select all points. Do this by moving the cursor to one corner of the rectangle in which you want to select points. Press and hold LEFT-SHIFT, press and hold the left mouse button and drag the mouse. You will see a rectangle open, when all the points you want to select are in the rectangle, let go of the mouse button. Exactly the same method can be used to deselect points. If the points in the rectangle you just defined are *all* selected, they will all be deselected, else they will all be selected. Here the main operation is selection. If you want the main operation to be deselection you proceed as above, but press RIGHT-SHIFT instead. If the points in the rectangle you just defined are *all* deselected, they will all be selected, else they will all be deselected. You'll need to experiment! Basically this selection thing is a toggle operation, but you can influence the outcome of a selection operation that is ambiguous. Once the points are selected move the mouse into the view, press and hold the left mouse button and move the points. When you release the button the patch will be updated, unless you turn off the control point display. When done editing the patch, press the right mouse button to leave the extended editor and then again to leave the editing submenu. HOTKEYS There are quite a number of hotkeys that are accessible from the main menu, from the object browser and in the bezier editor. For a complete list, please refer to Appendix A of the Users manual. Some of the keys recognized in the Main Menu Alt-B Selects the bounding box of the currently selected object. Alt-C Makes Copie(s) the currently selected object. Alt-D Deletes the currently selected object, without confirmation. Alt-E Calls the Edit screen of the currently selected object. Alt-F Same as clicking on FILES. Alt-G Toggles the grid of the view the cursor is currently over. Alt-N Same as clicking on CREATE. Alt-P Selects the parent of the currently selected object. Alt-T Selects the texture of the currently selected object. Alt-R Redraws the screen. Alt-O Brings up the Options screen (like clicking on OPTIONS) Alt-S Calls the Object Browser (like clicking on SELECT) Alt-U Deselects all objects. Alt-V Verifies the objects (checks that all have textures) Alt-X Quits the program. Alt-1 Set the visibility level to 1. Alt-2 Set the visibility level to 2. ... Alt-9 Set the visibility level to 9. Alt-0 Set the visibility level to 10. L When selected object is a camera, changes the thing being translated to the LookAt point. P When selected object is a camera, changes the thing being translated to the Camera location. U Changes the cursors View-mode to proportional Scaling. S Changes the cursors View-mode to non-proportional Scaling. R Changes the cursors View-mode to Rotation. T Changes the cursors View-mode to Translation. X Toggles the cursor movement locking along the X-axis. Y Toggles the cursor movement locking along the Y-axis. Z Toggles the cursor movement locking along the Z-axis. - Disables updates of the view the cursor is currently over. + Enables updates of the view the cursor is currently over. ---------------------------------------------------------------------------- That's it! That's a quick walk-through. If there was not enough detail here, please refer to the MORAY.DOC file, it details all the features. Any ideas, suggestions, criticisms, however wild, let me know. Ways to contact us can be found in SUPPORT.TXT. Lutz Kretzschmar The SoftTronics Team.