Many applications and games using 3D graphics are currently based on OpenGL.
This specification from SGI
describes a number of functions to display 3D graphics on a flat screen.
Implementations exist for Windows, MacOS, Linux and other Unix systems.
This project aims at the ability to make "3D screenshots" from OpenGL applications, i.e.
to save the currently displayed scene (including textures) in a common 3D file format.
The current version of the grabber is implemented as a Windows DLL. It offers a complete
set of OpenGL functions to the application. Every function call is evaluated and then passed
to the actual OpenGL DLL. By means of a simple key press, the current scene
(or rather the directly following one) can be saved as a VRML world.
Please note: The grabber hasn't been updated since 2001, and it doesn't work with
modern operating systems and games! This page stays online only so that anyone can look at
how it works and download the source code.
Hint: Use the last viewpoint in every scene to get started. A "fit" function
(e.g. present in Cortona) is also useful.
Let me start with a few remarks: The grabber is still in alpha state, and several applications
will probably crash or display strange things when started with Ogre installed. Also, the
resulting VRML files, textures and log files may consume several dozen MBs!
Before installing Ogre please check if the file "msvcrt.dll" is present on your system.
If it's not you first have to download the Visual C++ runtime
environment and install it.
To install Ogre just copy the file "ogre.dll" in the directory/directories of the target
application(s) (e.g. "c:\games\homeworld") and rename it to "opengl32.dll".
Attention: Be careful to never overwrite the file "opengl32.dll" in your
Windows system directory!
While the application (e.g. "homeworld.exe") is running, you can now grab the current scene
using the F11 key. The path where the scene is saved can be changed in the file "ogre.ini" (see
below). Below this path a new directory with the pattern "grab????" is created for each scene. "????" is
a counter that gets incremented with every scene (even if the application is restarted), so that no
files will be overwritten. To deinstall Ogre, simply delete the file "opengl32.dll" from the application
directory (e.g. "c:\games\homeworld"). Again, be careful not no delete the file "opengl32.dll" from
the Windows system directory!
To change the grabber's behaviour you can create a file called "ogre.ini" in "c:\temp". This
file has the following structure:
; 0: textures are saved with alpha channel
; (if they contain one)
; 1: textures are saved without alpha channel
; 0: viewpoint transformations may contain scaling
; (may lead to distortions)
; 1: viewpoint transformations don't contain scaling
; (may lead to incorrect viewpoints)
; 0: geometry data is saved including normals
; 1: geometry data is saved without normals
; path to save the grabbed scenes in
; log file containing OpenGL function calls
; 0: don't log function calls
; (but still a log file with 0 bytes is created)
; 1: only log OpenGL calls during grabbing individual scenes
; 2: same as 1, but also log all calls occuring before the
; first scene (saved or not)
; 3: log all calls
; (Attention: results in files up to several hundred MBs in size!)
A sample file is contained within the Ogre archive. If you leave out an option the respective
default value takes effect. In the example above all options are set to their default values.
Use the grabber at your own risk!
- Instead of a combined view, the extracted VRML scenes contain several
viewpoints (fundamental OpenGL/VRML conversion problem).
- no support for lightmaps yet
(the scene is correctly extracted but appears overexposed)
- possibly problems with OpenGL extensions
- restricted to MS Windows (yet)
Last update: 05/29/2005