README for Open Inventor and WebSpace Demos ------------------------------------------- Updated 4-Aug-95 Copyright (C) Template Graphics Software Inc. Requirements These demos will run under Windows NT or Windows 95 (Intel only). All the necessary DLLs are provided with the demo installation. Using the standard Microsoft OpenGL, all screen resolutions and color depths are supported. Resolution of 1024x768 or higher and color depth of 256 or higher is recommended for best appearance. All 3D accelerator boards compatible with Microsoft OpenGL are supported, including boards based on GLint, Oki and AccelGraphics. OpenGL DLLs for Windows 95 NOTE: The TGS System directory contains the files opengl32.dll and and glu32.dll. These are the OpenGL DLLs for Windows 95 (Intel only). The TGS System directory is located under the directory you selected during installation of the Open Inventor Demonstration. DO NOT copy these files into the system32 directory under Windows NT! If you have installed a version of OpenGL under Windows 95 and experience problems running the Open Inventor Demonstration, try replacing the OpenGL DLLs in your Windows 95 System directory with the OpenGL DLLs in the TGS System directory. SceneViewer, Slotcar, and Maze Demonstration Programs The SceneViewer program demonstrates some of the capabilities of the Open Inventor class library. The various viewers, the material and color editor dialogs, direct manipulation of scene objects and many other features available in SceneViewer are built-in capabilities of the Open Inventor class library. This allows rapid prototyping of applications based on Open Inventor -- if you can describe your application's geometry in Open Inventor terms, you automatically have the ability to view and edit that geomtry. Here are some suggestions for running the demo: - Use the File/Open menu to open one or more of the example models provided in Inventor format. These files have a ".iv" extension. You can also use "drag and drop" to open Inventor files. Sceneviewer can also load most VRML (Virtual Reality Modeling Language) files, although it does not support the WWWInline, LOD or AsciiText nodes. These files have a ".wrl" extension. WebSpace is a VRML specific viewer that supports all the VRML 1.0 nodes. - The default mode is "Examiner Viewer". Hold down the left mouse button to spin the model using the "virtual trackball". Hold down the middle mouse button to translate the model. - Use the View menu to change to a "Walk Viewer" or "Fly Viewer". In the Walk Viewer, hold down the left mouse button and move the mouse to "walk" forward or backward and to turn. In the Fly Viewer, click the left mouse button to accelerate and the middle mouse button to slow down. Current speed is displayed by a bar graph at the bottom of the window. Move the mouse to change your direction of travel. - Use the Light menu to create a new light in the scene. A 3D icon will appear indicating the light's position (and direction if appropriate). Put the cursor on the light icon, then press and hold the left mouse button to move the light. For directional and spot lights you can also interactively change the direction by moving the light icon's arrowhead. - Press the ESC key to toggle between "viewing" (the default) and "selection" modes. In viewing mode the cursor is a red hand. In selection mode the cursor is an arrow. In selection mode you can select any object in the scene by clicking on it. A red highlight box will appear around the selected object. - With an object selected, use the Editors menu to bring up the Material Editor dialog or the Color Editor dialog. Notice that Inventor automatically changes the appearance of the selected object when you make changes in the dialog box. - With an object selected, use the Manips menu to attach an Inventor "manipulator" to the object. For example, the Trackball manipulator allows you to rotate the selected object (move the cursor onto the trackball, then press and hold the left mouse button). Slotcar is a simple "game" that demonstrates using Open Inventor to create a virtual world and simulating the physics of a slotcar race. When the first window appears, click in the rectangle labeled "Start". When your car appears in the race window: - Click the left and right mouse buttons to change lanes - Your speed is determined by the position of the mouse cursor in the window -- the closer to the top of the window, the faster you go. Watch out for those tight curves! - Use the arrow keys to adjust the position of the camera relative to your slotcar. - The car will automatically reset (back on the track) after a crash. Maze is a simple "game" that demonstrates using Open Inventor to create a virtual world and directly manipulate an object (the maze board) in 3D. Hold down the left mouse button and move the mouse to change the tilt of the maze board. Try to roll the ball to the exit in lower right corner. WebSpace WebSpace is a VRML (Virtual Reality Modeling Language) browser that works with your HTML browser (Netscape, Mosaic, etc) to display 3D scenes you find on the Internet. You will need to have an HTML browser installed in order to access VRML files on the Internet. WebSpace uses your HTML browser to fetch files. You do not need an HTML browser if you just use WebSpace to view local files. You will need an HTML browser to display the WebSpace help files (which are in HTML format). You will need to configure your HTML browser so it knows to use WebSpace as the viewer for files with the MIME type "x-world/x-vrml" (also "application/x-inventor" if you want to view Inventor files). WebSpace can also view Open Inventor files and/or VRML files containing Inventor nodes. Note: A copy of gzip.exe is provided with some versions of the demo installation (Intel and ?). When available, WebSpace uses gzip to automatically decompress VRML files that have been compressed (these files normally have the extension ".wrl.gz"). Inventor Wizard The Inventor Wizard will modify source code generated by the Microsoft AppWizard to create a skeleton Open Inventor application. The Inventor Wizard is automatically added to the Visual C++ 2.0 tools menu by the setup program (INTEL and ALPHA versions only). For MIPS it is necessary to manually add the Inventor Wizard to the tools menu. Also for MIPS, you must manually add the Inventor include and lib directories to the lib and include directory search paths in Visual C++ 2.0. This is done by selecting the Tools/Options menu and clicking on the directories tab. These are updated automatically in the INTEL and ALPHA versions if Visual C++ was installed when you ran the TGS Open Inventor Demonstration setup program. To use the Inventor Wizard create a new project using the AppWizard, and close the project. NOTE: It is important that you close the project before running the Inventor Wizard. If you modify a project with Inventor Wizard while Visual C++ has the project file open, Visual C++ will overwrite the changes made by Inventor Wizard. These problems will be solved when we integrate the Inventor Wizard with the AppWizard extensions under Visual C++ 4.0. This demonstration distribution includes all of the necessary header files and import libraries to build the viewers generated by the demonstration version of the Inventor Wizard. The demonstration version only generates code for Render Area, Walk, Fly, and Examiner viewers. The full TGS Open Inventor SDK is required to generate a SceneViewer application. In addition, this demonstration version does not provide the header files and import libraries for developing full Open Inventor programs. The complete TGS Open Inventor SDK is required to write code that uses the Open Inventor Class Library directly. Only the TGS Inventor Framework library is provided with this demonstration. NOTE: This version of the demo installation does not include the Open Inventor debugging DLLs -- so you cannot build the Debug target for your Inventor Wizard generated application. You must build the Release target. SceneViewer OCX (Intel and Alpha only) The SceneViewer OCX provides an OLE control wrapper for the Open Inventor SceneViewer application. The OCX provides all of the functionality of the SceneViewer through a set of OLE interfaces. It is not necessary to have the Open Inventor SDK to develop applications using the SceneViewer OCX, only the runtime Open Inventor DLL's are required. To use the SceneViewer OCX you must first register the control. Click on the Register SceneViewer Control icon to register the control. To experiment with the SceneViewer OCX start the Test Container, then: 1. Select Insert OLE Control from the Edit menu, and pick Ocxsv Control. 2. Resize the control to the desired dimensions. 3. Select Invoke Methods from the Edit menu. 4. From the Name drop box select the LoadFile method and click on Invoke. 5. Use the File Dialog to select an Inventor File (Barcelona.iv is a good model for experimenting with the Walk and Fly Viewers, bird.iv is good for the Examiner Viewer). 6. From the Name drop box select the showViewDialog method, and click on Invoke. 7. Select the desired viewer and click on Ok. 8. Click on Close to exit the Invoke Control Method Dialog. 9. For the Fly Viewer, click the left mouse button to accelerate, middle mouse button to decelerate, and left-middle to stop. For the Walk Viewer, press and hold the left mouse button while moving the mouse in the desired direction of motion. Use the up and down arrow keys to change elevation. Use the controls of the Fly or Walk viewer to move to a new viewing position, the bring up the Invoke Control Methods Dialog. Invoke the showNewCameraDialog method. Click on create, select View All, and click on Apply. Up to ten cameras can be created. Picking a camera from the Camera List will install that camera as the current camera. For the Examiner Viewer, press and hold the left mouse button to spin the camera around the object. Pressing the right mouse button brings up a popup menu that can be used to toggle viewing mode. Turn off viewing mode, place the mouse pointer over a piece of the model (i.e. the head of the bird) and click the left mouse button. A bounding box will appear around the selected component. Bring up the Invoke Control Methods dialog, invoke the manipTrackball method and close the dialog. Grab the trackball with the mouse pointer by pressing and holding the left mouse button. For a detailed description of the viewer controls see the Open Inventor Help File. 10. Invoke the lightAddDirect method to create a directional light. Turn of viewing mode and grab the light icon arrow head with the mouse. Use the mouse to change the direction of the light. Invoke the lightHideAll method to hide the light icon. To contact TGS about purchasing the Open Inventor SDK: Template Graphics Software Inc. 9920 Pacific Heights Blvd San Diego, CA 92121 Tel: 619-457-5359 Fax: 619-452-2547 Email: info@tgs.com WWW: http://www.sd.tgs.com/~template