Anaglyph (3D)

From FlightGear wiki
Jump to navigation Jump to search

Stereo Vision on FlightGear

Another excellent example and simple application of FlightGear's flexibility and realism.

As you might know or not, FlightGear migrated graphics functions from PLIB to OpenSceneGraph. FlightGear 1.9.0, released Decemeber 22, 2008, marked the release of the OSG version of FlightGear. As of August 2010, most recent stable version of Flightgear uses OSG. For those who are unaware of OSG, it is an open source high performance 3D graphics toolkit.

Anaglyph-That weird looking glasses...

This wiki describes how to use the stereo vision ability of the OSG. Stereo vision, or Anaglyph Images exploit the human perception by showing a 3 Dimensional image on a 2 Dimensional surface. To understand stereo vision and human judgement of visual distance (that's how we keep visual separation from the traffic), make this small experiment. While reading this text, close your left eye and then right eye, open left. When you alternate your view, it'll feel like the monitor is moving to little left when you observe with right eye, and vice versa. This situation gives us two different images. Now imagine you took this two "slightly" different images and match it such that each eye sees what they're supposed to see. There are not so many but quiet a few ways to achieve this separation. And OSG is capable of doing all of this...Now apply this to your short final 28R at KSFO!

How To Multiply Your Realism Level by 10

For this experience, you will need

  1. Working copy of FlightGear
  2. A pair of Red-Green or Red-Cyan pair of 3D glasses, you might have one at home or if you are a DIY type, check this link Nasa way of doing glasses OR Liquid Crystal Shutter Glasses and probably suitable hardware. (Anyone experienced with or owns one pair of this thing might help developing this page)

The easiest and shortest way to experiment with this is to follow the procedure below (quick start); For Windows users;

  1. Start FlightGear, select your aircraft and select your location (e.g. KSFO)
  2. On the next screen, click "Advanced" just above "Run"
  3. On the new window, titled "Advanced Options" highlight the "Environment" from the list on the left
  4. Now, you will create new environment variables, click "New" and type "OSG_STEREO=ON" without quotes, then again click "New". At this point you should be seeing "OSG_STEREO=ON" on environment list.
  5. The commands that you have to pass to OSG consists of,
OSG_STEREO=ON
OSG_STEREO_MODE=ANAGLYPHIC
OSG_SCREEN_DISTANCE=1
OSG_EYE_SEPARATION=0.025

The result should be something like

Accessing advanced options.
Final result in Environment settings.

After you enter the last value, click "OK" to quit from the Advanced Options window. Remove your pilot raybans, put your fancy 3D glasses and click run.


Tweaking The View/Stopping Nausea

(on the way...)--Ozgur 17:57, 30 August 2010 (UTC)