Anaglyph (3D): Difference between revisions

Jump to navigation Jump to search
m
Robot: Cosmetic changes
m (Add image of glasses, if you don't mind Torsten ;))
m (Robot: Cosmetic changes)
Line 1: Line 1:
[[Image:OV_10_in_Anaglyph.jpg|thumb|Anaglyph provides increased 3D realism.]]
[[File:OV_10_in_Anaglyph.jpg|thumb|Anaglyph provides increased 3D realism.]]
This wiki describes how to use the '''stereo vision''' or '''[http://en.wikipedia.org/wiki/Anaglyph_image anaglyph images]''' ability of [[OpenSceneGraph]] and let you experience the [[FlightGear]] world in 3D. Another excellent example and simple application of FlightGear's flexibility and realism.
This wiki describes how to use the '''stereo vision''' or '''[http://en.wikipedia.org/wiki/Anaglyph_image anaglyph images]''' ability of [[OpenSceneGraph]] and let you experience the [[FlightGear]] world in 3D. Another excellent example and simple application of FlightGear's flexibility and realism.


'''Important Notice:''' Even though it might not pose any danger, try avoiding excessive use of different color paired glasses, and after your flying sessions with the glasses or whatever, let your eyes and brain rest for a while before starting to sew, chop meat, drive 160mph, dig the garden etc.
'''Important Notice:''' Even though it might not pose any danger, try avoiding excessive use of different color paired glasses, and after your flying sessions with the glasses or whatever, let your eyes and brain rest for a while before starting to sew, chop meat, drive 160mph, dig the garden etc.


==Anaglyph, that weird looking glasses...==
== Anaglyph, that weird looking glasses... ==
As you might know or not, FlightGear migrated graphics functions from [[PLIB]] to [[OSG]]. [[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.
As you might know or not, FlightGear migrated graphics functions from [[PLIB]] to [[OSG]]. [[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.


Stereo vision 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 is how we keep visual separation from the traffic), make the following 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 it is supposed to see. There are not so many but quite 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!
Stereo vision 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 is how we keep visual separation from the traffic), make the following 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 it is supposed to see. There are not so many but quite 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==
== How to multiply your realism level by 10 ==
[[File:Anaglyph-glasses.jpg|thumb|Red-Cyan pair of 3D glasses.]]
[[File:Anaglyph-glasses.jpg|thumb|Red-Cyan pair of 3D glasses.]]
For this experience, you will need  
For this experience, you will need  
Line 18: Line 18:
The easiest and shortest way for users of FlightGear up to version 2.0.0 to experiment with this is to follow the procedure below (quick start). Later versions (including GIT sources) have native support for setting the relevant properties at runtime from a dialog box at View->Stereoscopic View Options.
The easiest and shortest way for users of FlightGear up to version 2.0.0 to experiment with this is to follow the procedure below (quick start). Later versions (including GIT sources) have native support for setting the relevant properties at runtime from a dialog box at View->Stereoscopic View Options.


===Windows===
=== Windows ===
*FlightGear launcher
* FlightGear launcher
[[Image:Anaglyph1.jpg|thumb|Accessing advanced options.]]
[[File:Anaglyph1.jpg|thumb|Accessing advanced options.]]
[[Image:Anaglyph2.jpg|thumb|Final result in Environment settings.]]
[[File:Anaglyph2.jpg|thumb|Final result in Environment settings.]]
# Start the [[FlightGear Launch Control|FlightGear launcher]], select your aircraft and select your location.
# Start the [[FlightGear Launch Control|FlightGear launcher]], select your aircraft and select your location.
# On the next screen, click "Advanced" just above the "Run" button.
# On the next screen, click "Advanced" just above the "Run" button.
# On the new window, titled "Advanced Options" highlight the "Environment" from the list on the left
# On the new window, titled "Advanced Options" highlight the "Environment" from the list on the left
# Now, you will create new environment variables, click "New" and type <tt>OSG_STEREO=ON</tt>, then again click "New". At this point you should be seeing "OSG_STEREO=ON" on environment list.
# Now, you will create new environment variables, click "New" and type <tt>OSG_STEREO=ON</tt>, then again click "New". At this point you should be seeing "OSG_STEREO=ON" on environment list.
#The commands (including the one we just created) that you have to pass to OSG consist of:
# The commands (including the one we just created) that you have to pass to OSG consist of:
#*<tt>OSG_STEREO=ON</tt>
#* <tt>OSG_STEREO=ON</tt>
#*<tt>OSG_STEREO_MODE=ANAGLYPHIC</tt>
#* <tt>OSG_STEREO_MODE=ANAGLYPHIC</tt>
#*<tt>OSG_SCREEN_DISTANCE=0.7</tt>
#* <tt>OSG_SCREEN_DISTANCE=0.7</tt>
#*<tt>OSG_EYE_SEPARATION=0.06</tt>
#* <tt>OSG_EYE_SEPARATION=0.06</tt>
#*<tt>OSG_SCREEN_HEIGHT=0.19</tt>
#* <tt>OSG_SCREEN_HEIGHT=0.19</tt>
#*<tt>OSG_SCREEN_WIDTH=0.33</tt>
#* <tt>OSG_SCREEN_WIDTH=0.33</tt>


The result should be something like shown on the right.  
The result should be something like shown on the right.  
Line 39: Line 39:




*Command line
* Command line
When launching FlightGear from the [[Command_line_options|Command line]], the environment variables should be set as follow, in the same Command Prompt window (same batch file if applicable) as the one used for FlightGear.
When launching FlightGear from the [[Command line options|Command line]], the environment variables should be set as follow, in the same Command Prompt window (same batch file if applicable) as the one used for FlightGear.


   SET OSG_STEREO=ON
   SET OSG_STEREO=ON
Line 51: Line 51:




===Mac OS X===
=== Mac OS X ===
[[Image:Anaglyphic2.jpg|thumb|Red-Green Anaglyph OSG Render in action]]
[[File:Anaglyphic2.jpg|thumb|Red-Green Anaglyph OSG Render in action]]
Thanks to [http://flightgear.org/forums/memberlist.php?mode=viewprofile&u=1650 someguy] (not some guy, a FlightGear forum member!) for providing Mac OS X instructions. And here is the related [http://www.flightgear.org/forums/viewtopic.php?f=19&t=9222&p=93141#p93141 post]with more screenshots.
Thanks to [http://flightgear.org/forums/memberlist.php?mode=viewprofile&u=1650 someguy] (not some guy, a FlightGear forum member!) for providing Mac OS X instructions. And here is the related [http://www.flightgear.org/forums/viewtopic.php?f=19&t=9222&p=93141#p93141 post]with more screenshots.


Line 90: Line 90:
   </plist>
   </plist>


===Tweaking The View/Stopping Nausea===
=== Tweaking The View/Stopping Nausea ===
A brief explanation of the values we gave for the environment variables goes like this. This info comes directly from the [http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/StereoSettings OSG Stereo Settings] page.
A brief explanation of the values we gave for the environment variables goes like this. This info comes directly from the [http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/StereoSettings OSG Stereo Settings] page.


Line 98: Line 98:




*<tt>ANAGLYPH           Use anaglyphic stereo when in stereo (default) (See green-red filtered images).</tt>  
* <tt>ANAGLYPH Use anaglyphic stereo when in stereo (default) (See green-red filtered images).</tt>  
*<tt>QUAD_BUFFER Use quad buffered stereo when in stereo.</tt>
* <tt>QUAD_BUFFER Use quad buffered stereo when in stereo.</tt>
*<tt>HORIZONTAL_SPLIT Use horizontal split stereo mode when in stereo [http://wiki.flightgear.org/index.php/File:OSG_Anaglyph_StartScreen.jpg Starting],[http://wiki.flightgear.org/index.php/File:Hor_Cockpit.jpg Running!], [http://wiki.flightgear.org/index.php/File:Stereo_B1900D_View.jpg External Stereo View]</tt>
* <tt>HORIZONTAL_SPLIT Use horizontal split stereo mode when in stereo [http://wiki.flightgear.org/index.php/File:OSG_Anaglyph_StartScreen.jpg Starting],[http://wiki.flightgear.org/index.php/File:Hor_Cockpit.jpg Running!], [http://wiki.flightgear.org/index.php/File:Stereo_B1900D_View.jpg External Stereo View]</tt>
*<tt>VERTICAL_SPLIT Use vertical split stereo mode when in stereo [http://wiki.flightgear.org/index.php/File:Vertical_Sep_Cockpit.jpg Vertical Separation Cockpit] and [http://wiki.flightgear.org/index.php/File:Vertical_Sep_External.jpg External View]</tt>
* <tt>VERTICAL_SPLIT Use vertical split stereo mode when in stereo [http://wiki.flightgear.org/index.php/File:Vertical_Sep_Cockpit.jpg Vertical Separation Cockpit] and [http://wiki.flightgear.org/index.php/File:Vertical_Sep_External.jpg External View]</tt>


(Any practical application sample of Vertical Split?)
(Any practical application sample of Vertical Split?)
Line 151: Line 151:
|}
|}


==Eye Separation and Horizontal Distance==
== Eye Separation and Horizontal Distance ==


The very final part of the OSG stereo view options consists of few variables that accommodate the device specific issues and finally allows you to set straight look or cross-eyed look (not advised) options.  
The very final part of the OSG stereo view options consists of few variables that accommodate the device specific issues and finally allows you to set straight look or cross-eyed look (not advised) options.  
Line 162: Line 162:
'''OSG_SPLIT_STEREO_VERTICAL_EYE_MAPPING''' works the same way as horizontal mapping, displaying upper and lower images respectively. The string variables are LEFT_EYE_TOP_VIEWPORT and LEFT_EYE_BOTTOM_VIEWPORT, which are quiet self-explanatory.
'''OSG_SPLIT_STEREO_VERTICAL_EYE_MAPPING''' works the same way as horizontal mapping, displaying upper and lower images respectively. The string variables are LEFT_EYE_TOP_VIEWPORT and LEFT_EYE_BOTTOM_VIEWPORT, which are quiet self-explanatory.


==Links==
== Links ==
*[http://www.openscenegraph.org OSG Website]
* [http://www.openscenegraph.org OSG Website]
*[http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/StereoSettings Stereo Settings]
* [http://www.openscenegraph.org/projects/osg/wiki/Support/UserGuides/StereoSettings Stereo Settings]
*[http://en.wikipedia.org/wiki/Anaglyph_image Anaglyph Image on Wikipedia]
* [http://en.wikipedia.org/wiki/Anaglyph_image Anaglyph Image on Wikipedia]
*[http://en.wikipedia.org/wiki/Retinal_rivalry An important warning about using highly filtering glasses]
* [http://en.wikipedia.org/wiki/Retinal_rivalry An important warning about using highly filtering glasses]

Navigation menu