Location : ubic/projects/monkey3d
Monkey3D | Screenshots | Editor | Engine | Engine commands | Local stimulation | Remote stimulation | Contact

Engine


Configuration profiles

You can save various engine configuration profile. An engine configuration profile saves all stuff you can set in the engine panel.

If you click new, you create a new profile from the current one, it is automatically saved as-is to the disk.
If you click reset, you set the current profile to factory defaults.
If you click save, the profile is saved to the disk.
If you click delete, the profile is deleted from the list and from the disk.

Rules :

  • You can't delete nor save, nor reset, the default profile.
  • When you switch from a profile to another, values are always reloaded from the disk, so don't forget to save if you want to keep your changes for later use.
  • When you return to the engine panel after having pressed run or start server, the engine panel will be updated to reflect the last engine values (ex : if you have changed the fov, loaded another scene, etc...). However, unless you press the save button, the profile is never saved to the disk.
Warning : when dealing with configuration profile when running the engine via the editor, the current editor's scene file is always used (the potential profile's one is ignored). Thus, pay attention if you save a profile in the engine since the profile's scene file would be set to the editor's one (if you don't already have saved a new scene, it will be set to the default scene).

Display

Display mode :

Choose the display mode line you want to use. The list contains all the display resolutions that your system supports. If you leave this option to "System settings", the current system display mode is used.
Display mode lines can be read like this : width x height : bit per pixel @ screen refresh rate Note : display mode lines are ordered descending using the respective order : width, height, refresh rate, bit per pixel.
Note : if you save a profile while having "System settings" set, the profile will always use the current/future system display mode.
If you plan to use a profile on another system, it is also a good idea to keep "System settings" being set since you can't guess that the display mode line you choose is supported.
However, when you load a profile, if the embedded display mode is not supported, the "System settings" is automatically selected and you get a warning.

Vsync :

Usualy set to on, in this case the system will never run faster than the display mode refresh rate. This also guarantees that the frame are sent by the graphic card to the display in synchronization, ie : waits for the preceeding image for being drawn before sending the next one. The overall effect is that the animation look smoother, if deactivated the animation may look jerky.

Note : you may want to deactivate the vsync to allow the engine to run as fast as possible (in this case commands are processed quicker) but don't forget that the fps rate will be variable. Also note that when vsync is on, the FPS (Frame Per Second) is guaranteed to never go higher than the display mode refresh rate, but can go lower if the scene is too complex

Limit FPS (Frame Per Second) :

You may want to use the limit FPS feature for debugging purpose : with this option activated, you can voluntary slow the fps rate and also slow the whole engine (command processing, display, input, etc.). Note : since you can use it in cunjunction with Vsync, there is no reason to use a limit FPS value equal or higher than the display mode refresh rate if vsync is activated (since vsync already slows the fps (at most) to the display mode refresh rate, understood ? ;-))

However, if vsync is unactivated, you may want to limit the FPS to a specific value (above or below the screen refresh rate)

Note : it is a good idea to keep vsync activated if you limit the FPS to a value lower than the display mode refresh rate. You simulate a more complex scene or a slower machine : less frame are sent to the display (frame skip), however you don't loose the positive effect of being synchronization with the screen.

Note : if the fullscreen option is not set, the display mode refresh rate and the bit depth is always the current system display's one (can't technically be different !). However you can unlimit the FPS by unselecting Vsync.

Projection

There are 4 projection modes :
  • Mono
  • Stereo classic (eye separation, focal length)
  • Stereo constrained, good for quick human viewing (focal length, parallax balance, stereo magnitude)
  • Stereo real, good for orthostereoscopy, give the real physical parameters, 1.0 system unit = 1.0 meter (focal length = real distance from projection plane, real eye separation, real projection plane width, real projection plane height)

Important :

  • Stereo modes are designed for Quad-buffered OpenGL cards. Please ensure that you have activated Stero in your graphic driver configuration tab.
    On Nvidia : go to the system graphic display configuration, choose your graphic card driver advanced tab, go to "Performance & Quality Settings", set "enable stereo" to on and choose the appropriate "stereo display mode" (if you have shutter glasses, choose "Use on-board DIN connector").
  • Some drivers may propose a stereo calculation functionality that produces stereo in apps that are not originally stereo. Don't use this driver option in cunjunction with one of the Monkey3D stereo modes : either use the stereo calculation from Monkey3D and be sure to have this option deactivated or use the one of your graphic card driver and be sure to run Monkey3D in mono. Id you use your card's stereo calculation, check your driver manual to see how to parameter eye separation, etc.
  • In stereo mode, Monkey3D sends the left eye image at first, then the right eye image.

Note that the two stereo mode use off-axis (asymmetric frustum) stereo projection wich is the good way to do stereo.


Parallel axis asymmetric frustum perspective projection (correct)

Some application use the toe-in method wich is easier to implement but is incorrect (introduces vertical parallax).


Toe-in (incorrect)

When you move, the camera moves, so the z world coordinate of the zero parallax moves also to maintain the same focal length distance to the camera.
In the real world, the zero parallax represents the screen (ie : the focal length is the distance from the camera to the zero parallax or the distance from your virtual position to the virtual position of the screen). So by default, objects farther than the zero parallax appear behind the screen, closer objects appear in front of the screen.


<
Stereo parameters illustration

The constrained stereo mode allows you to reverse the focal length balance.
Usually it is a good idea to play with the near parameter that clips polygons that may look too close to you (hyper stereo).
You can also play with the fov if you are happy with the stereo projection and simply want to zoom (look closer to something). In this case, if you don't move nor change stereo params, the zero parallax also stays at the same world position while the projection plane size shrinks (and thus objects appear bigger).

The default stereo parameters say that the focal length is at a distance of 1.0 unit from the camera, this means that the zero parallax (or the virtual position of the real display) is assumed to be at 1.0 unit in front of us. Since the near value is at 0.1 unit by default, you will see objects coming out of the screen. Also, the near value is extremely small, you may have hyper stereo if you come very close to objects.
To avoid that :

  • You can increase the near value to match to focal length. In this case it would be like you are see the scene thrue a window.
  • You can also decrease the stereo magnitude or change the parallax balance in constrained mode.

If you want to see objects coming out of the screen with low hyper stereo (constrained mode) :

  • Increase the focal length (= screen distance = zero parallax distance).
  • Decrease the stero magnitude and maybe play with the parallax balance.

Note that in the classic mode, you can think all the stuff in cases of eye separation and focal length only.

Appearance

Shading :

You can choose between smooth and flat shading.
With smooth shading, facets colors are smoothed by interpolation between vertex colors. Usually, you want this.

Polygon :

Choose how polygons are rendered : filled, as lines or as points.
Usually you want them filled.

Show debug :

Shows on-screen debugging informations : position, rotation, stereo params, etc...
In the engine you can toggle debug display with the keyboard END key.

Show help :

Show on-screen help (keyboard, etc.).
In the engine you can toggle help display with the keyboard F1 key.
Note that when help is displayed, the UP and DOWN arrow are used to scroll.

Antialiasing :

Activates antialiasing.
Only applicable if polygon mode is set to point or line.
With antialiasing enabled, points and lines appear smoother.

In the engine...

To see wich keys are available in the engine, press the F1 button and use UP/DOWN arrow keys to scroll, it may be a good idea to hide the debug display with the END key if the help width don't fit the screen width (wich is the case below 1024 resolutions, under 800 their is no way to see the entire help at all)

However, here is what you may see in the engine, may not be up to date :

---General Keys---------------------------------------------------------------
 ESC       : quit engine / close console
 F1        : toggle help display
 p         : toggle pause (you can't toggle when the console is open)
 SPACE BAR : toggle show/hide mouse (when in free move, also catch/uncatch)
 HOME      : toggle command prompt (see Console), only available in remote 
             stimulation or free move
 END       : toggle debug display
 F11       : reset the engine (cam. pos., commands, etc., but keeps the scene)
 F12       : toggle between stereo modes (not available in mono mode)

---Projection Keys (mono & stereo)---------------------------------------------
 You can view the scene in mono and in 3 distinct stereo modes.
 Note that those keys do not work when the console is open.
 Here are the general keys that work an all 4 modes :
 F2/CTRL+F2 : +/- field of view
 F3/CTRL+F3 : +/- the near clipping plane
 F4/CTRL+F4 : +/- the far clipping plane

---Stereo Projection Specific Keys--------------------------------------------
 Those keys are active depending the stereo mode.
 Note that those keys do not work when the console is open.
 F5/CTRL+F5 : +/- the focal length     (stereo modes only)
 F6/CTRL+F6 : +/- the eye separation   (stereo classic & real only)
 F7/CTRL+F7 : +/- the stereo magnitude (stereo constrained only)
 F8/CTRL+F8 : +/- the parallax balance (stereo constrained only)        

---Camera Specific Keys (free move only)--------------------------------------
 The camera has two modes : 
   - the first is on a first-person-shooter basis : immersive,
   - the second is on an orbit basis : used if you want to rotate over the
     scene, this mode is typically in CAD to view objects.
 Note that you can at least pitch/yaw/roll when the console is open since 
 the other keys are caught by it.
 o                        : toggle between first-person-shooter and orbit mode
 UP/DOWN/LEFT/RIGHT       : move forward, backward, left, right
 PAGE_UP/PAGE_DOWN        : move up, down
 MOUSE LEFT/RIGHT         : yaw
 MOUSE UP/DOWN            : pitch
 MOUSE BUTTON1+LEFT/RIGHT : roll

---Console Keys---------------------------------------------------------------
 Only available in remote stimulation mode or in free move mode.
 Please check the Engine HTML help for available commands.
 If the console is open, the keyboard works (almost) like any console, note
 Note that general keys also work as normal when the console is open.
 ARROW_UP/DOWN    : cycle thru command history
 ARROW_LEFT/RIGHT : move the insertion cursor
 ENTER            : validates the command
 DELETE/BACKSPACE : deletes character at/before the cursor