Setting the camera

From JReality Wiki
Jump to: navigation, search

The jReality camera is a part of the scene graph. In this way it is given a position and orientation in the scene. The camera settings can be accessed in the navigator panel.

When using the JRViewer application, the camera can be found by selecting the path "avatar->cameraNode->camera". Some of the fields are not useful for this tutorial. These include onAxis, FStop and focalLength. The other parameters are described below.

Before inspecting the camera, invoke the encompass tool (type the e key). This tool sets some of the camera parameters to display the scene optimally.

Camera parameters

  • near and far control the distance of the near and far clipping plane.
  • fieldOfView controls how wide an angle the camera sees (input is in degrees, not radians!).
  • perspective toggles whether the camera uses a perspective (closer objects appear larger) or an orthographic (parallel) projection.
    • The orthographic view works best if the focus value has been set to be the distance of the middle of the scene from the eye. The encompass tool attempts to set this to a reasonable value. Otherwise the scene can suddently appear much smaller or larger than the perspective view.
  • focus and eyeSeparation control the behavior of the camera in stereo mode.
    • focus determines the distance of the plane in which the left and right eye lines cross. If an object lies in this plane, the two eyes see identical images.
    • eyeSeparation determines how far apart (in world coordinates) the eyes are. For best results, this should be a fraction of the focus (between 1/12 and 1/24 are reasonable values).
    • The encompass tool (e) attempts to set these values reasonably.

Stereo operation

If you set the field stereo to true, you should see two copies of the scene. This is so-called cross-eyed stereo display mode. To fuse the two images, let your eyes cross gently until the middle two images (of the total 4) are aligned with each other. This overlapping image should appear in 3D. For this to function properly, the focus and eyeSeparation fields must be properly set.

Cross-eyed stereo

Certain operations (like picking) don't work properly in stereo mode.

 [The encompass tool doesn't work as promised in the current version but will soon 11.7.08].
Previous: Introduction to transparency User Tutorial: Contents Next: Exporting