OFAC tut 3dsmax ogremax viewer

From OpenFrag

Jump to: navigation, search

Contents

Introduction

In this tutorial we'll discover how to view our scene we exported in the previous tutorial using the Ogremax Viewer and how to adjust this viewer to our preferences.

View your scene

  • Navigate to C:\OgreMaxViewer\Samples
  • Double click on openfrag.bat

There you go, your first scene, ingame!

Controls

The view can be moved around the scene using the keyboard, mouse, or joystick.
Keyboard

  • Move - W,A,S,D and Arrow keys
  • Move Down, Up - Page Down, Page Up keys
  • Change Camera - 1-9 keys
  • Toggle View Camera Locking - Space bar
  • Capture Screenshot - Print Screen key
  • Exit Viewer - Escape key. Note: In windowed mode, while viewing a scene, the first escape allows the mouse cursor to become visible so that the window can be moved and resized. The second escape will exit the viewer.


Mouse

  • Move Down - Left button
  • Move Up - Right button
  • Move Forward - Middle button
  • Move Up, Down - Wheel up, down
  • Turn - Move the mouse


Joystick
The following mappings are for the Xbox 360 gamepad:

  • Move - Left stick
  • Turn - Right stick
  • Move Down, Up - Left, Right trigger
  • Change to Previous, Next Camera - Left, Right Directional pad
  • Toggle View Camera Locking - Left, Right shoulder buttons
  • Capture Screenshot - Start button
  • Exit Viewer - Back button

Adjusting the viewer

The viewer uses default settings, if you want to change these, follow the next steps.

  • Open up readme.html of the ogremax manual
  • Go to OgremaxViewer
  • Navigate to the commandline options, here are all the options explained
  • Edit openfrag.bat to your needs

Example:
cd ../Projects/VisualStudio
OgreMaxViewer -Width 1280 -Height 800 -FullScreen -VSync -D3D ../../Media/scenes/Openfrag/scene.scene
In this case we'll have a resolution of 1280*800, Vsync enabled and DirecX mode.

A neat trick

There is a shortcut which can make the viewing part of your scene much easier. It is possible to create events before or after exporting a scene. This can be used to call the viewer automatically on export to immediately view your scene.
How to do this

  • Navigate to the Ogremax menu and click Scene settings
  • Go to the events tab
  • Add in the second text box, which is called After export the following line:
  • $(ExportDir)..\..\..\Projects\VisualStudio\OgreMaxViewer.exe "$(ExportFilePath)"

Note that this only works for the default installation as used in this tutorial, otherwise you might have to adjust the path to correctly point to your OgreMaxViewer.exe.
Now try to export your scene, once it's done the viewer should start on it's own and immediatlely show your scene, enjoy!
For more info about these events, consult the official ogremax manual.

Conclusion

This is the end of the beginners part. Now we've taken all the basic steps from creating to viewing our scene. If you feel encouraged to continue, head up to #5 Ogremax materials to learn more about the Ogremax materials. Good luck in your journey!

Personal tools
OpenFrag